任务“runExampleClientRPCJava”的执行失败

时间:2018-05-15 13:03:38

标签: corda

我正在关注主网站上的CorDapp示例教程,并且在尝试通过Linux上的命令行运行示例RPC客户端时遇到问题

运行gradle任务 ./ gradlew runExampleClientRPCJava 时,出现以下错误。

> Task :java-source:runExampleClientRPCJava 
I 13:47:55 1 RPCClient.logElapsedTime - Startup took 7722 msec
Exception in thread "main" ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
        at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787)
        at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:191)
        at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:123)
        at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:86)
        at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:191)
        at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:183)
        at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:109)
        at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:135)
        at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:120)
        at com.example.client.ExampleClientRPC.main(ExampleClientRPC.java:38)


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':java-source:runExampleClientRPCJava'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

我可以看到它无法连接到任何服务器。有谁知道这是为什么以及如何解决它?有没有人遇到同样的问题?

1 个答案:

答案 0 :(得分:0)

该错误消息表明客户端无法连接到有问题的节点。这很可能是因为它尝试连接的节点无法启动。

尝试重新启动节点,然后尝试再次连接。