当前位置: 首页 > 知识库问答 >
问题:

Corda ActiveMQConnectionTimedOutExctive同时运行服务器

公西兴业
2023-03-14

我试图在修改给定模板后运行Corda应用程序。在运行节点之后,我尝试运行一个模板服务器。以下是详细信息

  • Corda版本:4.0
  • 在端口8161上运行的ActiveMQ
task runTemplateServer(type: JavaExec) {
    classpath = sourceSets.main.runtimeClasspath
    main = 'com.template.webserver.ServerKt'
    args '--server.port=10050', '--config.rpc.host=localhost', '--config.rpc.port=8161', '--config.rpc.username=admin', '--config.rpc.password=admin'
}

在运行上述任务后,我得到以下异常。我看了笔记,把Corda升级到v4。0,但仍然无法运行服务器。

E 17:15:13 1 SpringApplication.reportFailure - Application run failed
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controller' defined in file [template/webserver/Controller.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ119013: Timed out waiting to receive cluster topology. Group:null]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1274) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1131) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    at com.template.webserver.ServerKt.main(Server.kt:23) [main/:?]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ119013: Timed out waiting to receive cluster topology. Group:null]
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    ... 17 more
Caused by: org.apache.activemq.artemis.api.core.ActiveMQConnectionTimedOutException: AMQ119013: Timed out waiting to receive cluster topology. Group:null
    at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:814) ~[artemis-core-client-2.6.2.jar:2.6.2]
    at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:216) ~[corda-rpc-4.0.jar:?]
    at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:93) ~[corda-rpc-4.0.jar:?]
    at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:32) ~[corda-rpc-4.0.jar:?]
    at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:193) ~[corda-core-4.0.jar:?]
    at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:183) ~[corda-core-4.0.jar:?]
    at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:72) ~[corda-rpc-4.0.jar:?]
    at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:392) ~[corda-rpc-4.0.jar:?]
    at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:375) ~[corda-rpc-4.0.jar:?]
    at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:344) ~[corda-rpc-4.0.jar:?]
    at com.template.webserver.NodeRPCConnection.initialiseNodeRPCConnection(NodeRPCConnection.kt:44) ~[main/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:308) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    ... 17 more

> Task :clients:runTemplateServer FAILED

我尝试过:

>

  • 在一个github问题中指定将corda升级到v4.0

    添加jolokia作为jvm代理

    什么都没用。谁能帮忙吗?

  • 共有2个答案

    盖泽宇
    2023-03-14

    对我来说,这样的命令是成功的

    val processWeb = ProcessBuilder(listOf("java", "-jar",
                    (nodePath / "corda-spring-webserver.jar").toString(),
                    "--server.port=$serverPort", "--config.rpc.username=username", "--config.rpc.password=password",
                    "--config.rpc.host=host", "--config.rpc.port=port"))
                    .directory((nodePath).toFile())
                    .redirectErrorStream(true)
                    .redirectOutput((nodePath / "logs" / "web-server-info-run.log").toFile())
                    .apply { environment()["CAPSULE_CACHE_DIR"] = "../.cache" }
                    .start()
    
    袁雅逸
    2023-03-14

    在客户端能够连接到节点之前,必须先启动节点。

    1. 执行gradlew clean deployNodes创建节点

    这样,客户端就可以连接到节点。从日志中可以看出nodeRPCConnectioninit失败,因为它无法连接到节点。

     类似资料:
    • 问题内容: 我正在使用python更新一些LED。我一直在这样做: 我想用Flask充当一些我可以在我的浏览器中运行的ReactJS前端(以更改当前模式等)与Python中的LED控制代码之间的桥梁。 我的Flask工作正常,可以处理HTTP请求,等等。我想知道如何设置我的flask应用程序同时连续运行(或快速运行),同时仍然能够相互通信,就像这样: 我遇到了,这似乎可以解决问题,但对于我的问题有

    • 简述 Swoft 拥有便捷的命令行工具和相应的服务管理命令,参阅 Swoft Devtool 了解更多。 HTTP 服务 # 启动 HTTP 服务 $ php ./bin/swoft http:start # 以守护进程模式启动 $ php ./bin/swoft http:start -d # 重启 HTTP 服务 $ php ./bin/swoft http:restart # 重新加载

    • 我创建了一个dash应用程序来显示另一个代码正在收集的信息,我希望使用Python中的asyncio模块同时运行这两个应用程序。 我的代码使用异步函数,Dash应用程序(基于Flask)在服务时阻止其他任何东西执行。 我不确定这是否需要打开更多的线程。 这是我当前的代码,它只运行主协程。 如何同时运行main和_dashboard?

    • 当我尝试在NetBeans中运行servlet程序时,我在第1045行的中得到以下错误,该错误不允许Tomcat服务器启动。 而且,apache服务器日志正在发出消息,因为IP未被识别为内部或外部命令、可操作程序或批处理文件。 我不知道我哪里做错了,也不知道我在哪里配置了servlet映射中提供的环境变量。 欢迎任何帮助。

    • 问题内容: 当我尝试检入机器B时,我正在从机器A运行python manage.py runserver。我键入的URL是http:// A:8000 / 我收到类似系统返回的错误:(111)连接被拒绝 问题答案: 你可以通过以下方式为网络中的计算机运行它 这样一来,你就可以从网络中的任何计算机访问服务器。只需在浏览器中的其他机器上键入你服务器的IP地址…就可以开始使用…了。 或者在你的情况下:

    • 问题内容: 我设置了一个主服务器(linux)和一个Windows从属服务器,并且想在主服务器和从属服务器上构建一个作业。“限制在哪里可以运行该项目”选项允许我们将作业绑定到特定的从站,但是是否可以将一个作业绑定到主站和从站?如何配置“构建步骤”,因为在Windows上运行它需要使用Windows批处理命令进行构建,而Linux需要使用shell命令。例如,即使作业尝试在主服务器和从服务器上运行,