我在Kotlin完美地使用Corda应用程序 - 它从IDE启动时启动并正常工作
但是当我尝试将其构建为jar文件时,它会因以下错误而崩溃
INFO: Booting SSHD INFO 11, 2019 8:28:27 PM org.crsh.ssh.SSHPlugin init INFO: Booting SSHD INFO 11, 2019 8:28:28 PM org.crsh.ssh.term.SSHLifeCycle init INFO: About to start CRaSSHD INFO 11, 2019 8:28:28 PM org.crsh.ssh.term.SSHLifeCycle init INFO: About to start CRaSSHD INFO 11, 2019 8:28:28 PM org.crsh.ssh.term.SSHLifeCycle init SEVERE: Could not start CRaSSHD java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.AsynchronousServerSocketChannelImpl.bind(Unknown Source) at org.apache.sshd.common.io.nio2.Nio2Acceptor.bind(Nio2Acceptor.java:63) at org.apache.sshd.common.io.nio2.Nio2Acceptor.bind(Nio2Acceptor.java:87) at org.apache.sshd.server.SshServer.start(SshServer.java:325) at org.crsh.ssh.term.SSHLifeCycle.init(SSHLifeCycle.java:182) at org.crsh.ssh.SSHPlugin.init(SSHPlugin.java:192) at org.crsh.plugin.PluginManager.getPlugins(PluginManager.java:83) at org.crsh.plugin.PluginContext.start(PluginContext.java:327) at org.crsh.plugin.PluginLifeCycle.start(PluginLifeCycle.java:104) at net.corda.node.shell.InteractiveShell$ShellLifecycle.start(InteractiveShell.kt:181) at net.corda.node.shell.InteractiveShell.startShell(InteractiveShell.kt:118) at net.corda.node.internal.AbstractNode.startShell(AbstractNode.kt:297) at net.corda.node.internal.AbstractNode$start$4.invoke(AbstractNode.kt:262) at net.corda.node.internal.AbstractNode$start$4.invoke(AbstractNode.kt:105) at net.corda.node.internal.AbstractNode$initialiseDatabasePersistence$2.invoke(AbstractNode.kt:700) at net.corda.node.internal.AbstractNode$initialiseDatabasePersistence$2.invoke(AbstractNode.kt:105) at net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:152) at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:138) at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:124) at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:131) at net.corda.node.internal.AbstractNode.initialiseDatabasePersistence(AbstractNode.kt:699) at net.corda.node.internal.Node.initialiseDatabasePersistence(Node.kt:347) at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:207) at net.corda.node.internal.Node.start(Node.kt:361) at net.corda.testing.node.internal.DriverDSLImpl$Companion$startInProcessNode$1.invoke(DriverDSLImpl.kt:805) at net.corda.testing.node.internal.DriverDSLImpl$Companion$startInProcessNode$1.invoke(DriverDSLImpl.kt:767) at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:107) at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt) at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:119) at net.corda.core.internal.concurrent.CordaFutureImplKt$fork$$inlined$also$lambda$1.run(CordaFutureImpl.kt:22) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$Sche..(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
我只启动了一个节点,似乎没有任何进程可以干扰程序的执行(再次,从IDE启动时工作正常)
Address already in use
可能意味着另一个程序正在使用此端口。确保只有一个代码实例同时运行。此外,尝试更改正在使用的端口或使用此端口查找程序