如果devmode为false,则无法连接到corda节点

时间:2018-03-12 14:02:41

标签: corda

我从这里https://docs.corda.net/permissioning.html发布了节点证书,我将创建密钥&证书和签名根 - >中间体 - >节点 - > SSL,并在其中链接证书以获取三个(.jks)文件。

当网络处于开发模式时,我能够正常启动节点,但由于证书无法启动,因为网络映射无法识别我认为的节点。

考虑到这一点,我正在尝试将网络映射和整个网络更改为非devmode环境,当我启动网络映射时,我似乎在日志中遇到java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors,但是在接口上我可以看到网络地图已启动。

当我使用相同的root&用于将另一个节点注册到网络中的中间键,我面临错误:org.apache.activemq.artemis.api.core.ActiveMQSecurityException: AMQ119031: Unable to validate user

PS:我也尝试过:

有关如何在非开发环境中启动网络的任何提示?

编辑:我正在使用keytool来执行这些功能 stacktrace networkmap

  

警告] 2018-03-12T09:55:54,358Z [Thread-2(ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4d22265c)] core.client.createTransportConnection - AMQ212007:connector.create或connectorFactory.createConnector应该永远不会抛出异常,实现表现不佳,但无论如何我们都会处理它。   java.security.cert.CertPathValidatorException:Path不与任何信任锚链接       在sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:153)〜[?:1.8.0_144]       at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)〜[?:1.8.0_144]       在java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)〜[?:1.8.0_144]       at net.corda.node.utilities.X509Utilities.validateCertificateChain(X509Utilities.kt:153)〜[corda-node-2.0.0.jar:?]       在net.corda.node.services.messaging.VerifyingNettyConnector.createConnection(ArtemisMessagingServer.kt:506)〜[corda-node-2.0.0.jar:?]       在org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1036)〜[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1076)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1254)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:891)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:795)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:238)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:772)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.createSessionFactory(BridgeImpl.java:803)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.connect(BridgeImpl.java:860)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl $ ConnectRunnable.run(BridgeImpl.java:1045)[artemis-server-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.utils.OrderedExecutorFactory $ OrderedExecutor $ ExecutorTask.run(OrderedExecutorFactory.java:101)[artemis-commons-2.1.0.jar:2.1.0]       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[?:1.8.0_144]       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)[?:1.8.0_144]       在java.lang.Thread.run(Thread.java:748)[?:1.8.0_144]   [WARN] 2018-03-12T09:55:54,408Z [Thread-1(ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4d22265c)] core.client.createTransportConnection - AMQ212007: connector.create或connectorFactory.createConnector永远不应抛出异常,实现表现不佳,但无论如何我们都会处理它。   java.security.cert.CertPathValidatorException:Path不与任何信任锚链接       在sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:153)〜[?:1.8.0_144]       at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)〜[?:1.8.0_144]       在java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)〜[?:1.8.0_144]       at net.corda.node.utilities.X509Utilities.validateCertificateChain(X509Utilities.kt:153)〜[corda-node-2.0.0.jar:?]       在net.corda.node.services.messaging.VerifyingNettyConnector.createConnection(ArtemisMessagingServer.kt:506)〜[corda-node-2.0.0.jar:?]       在org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1036)〜[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1076)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1254)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:891)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:795)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:238)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:772)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.createSessionFactory(BridgeImpl.java:803)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.connect(BridgeImpl.java:860)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl $ ConnectRunnable.run(BridgeImpl.java:1045)[artemis-server-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.utils.OrderedExecutorFactory $ OrderedExecutor $ ExecutorTask.run(OrderedExecutorFactory.java:101)[artemis-commons-2.1.0.jar:2.1.0]       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[?:1.8.0_144]       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)[?:1.8.0_144]       在java.lang.Thread.run(Thread.java:748)[?:1.8.0_144]   [INFO] 2018-03-12T09:55:54,470Z [main] internal.Node.registerWithNetworkMapIfConfigured - 节点从数据库成功加载网络地图数据。   [INFO] 2018-03-12T09:55:54,471Z [main] messaging.NodeMessagingClient.invoke - 网络地图已完成,因此从P2P使用者中删除过滤器。   [INFO] 2018-03-12T09:55:54,490Z [main] BasicInfo.printBasicNodeInfo - 提供网络服务:corda.notary.simple   [INFO] 2018-03-12T09:55:54,490Z [main] BasicInfo.printBasicNodeInfo - 加载CorDapps:corda-finance-2.0.0,mokochu-p2p-0.1,corda-core-2.0.0   [INFO] 2018-03-12T09:55:54,492Z [main] BasicInfo.printBasicNodeInfo - " NetworkMap"启动并在8.09秒注册   [INFO] 2018-03-12T09:55:54,495Z [main] messaging.RPCServer.start - 使用配置RPCServerConfiguration启动RPC服务器(rpcThreadPoolSize = 4,consumerPoolSize = 2,producerPoolBound = 4,reapInterval = PT1S)   [INFO] 2018-03-12T09:55:54333Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = CRaSHShellFactory,interface = ShellFactory]   [INFO] 2018-03-12T09:55:54,634Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = GroovyLanguageProxy,interface = Language]   [INFO] 2018-03-12T09:55:54,635Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = JavaLanguage,interface = Language]   [INFO] 2018-03-12T09:55:54,635Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = ScriptLanguage,interface = Language]   [INFO] 2018-03-12T09:55:54636Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = JaasAuthenticationPlugin,interface = AuthenticationPlugin]   [INFO] 2018-03-12T09:55:54636Z [节点线程] plugin.PluginManager.getPlugins - 加载插件插件[type = SimpleAuthenticationPlugin,interface = AuthenticationPlugin]   [INFO] 2018-03-12T09:55:54,645Z [节点线程] plugin.PluginManager.getPlugins - 初始化插件插件[type = GroovyLanguageProxy,interface = Language]   [INFO] 2018-03-12T09:55:54,645Z [节点线程] plugin.PluginManager.getPlugins - 初始化插件插件[type = ScriptLanguage,interface = Language]   [INFO] 2018-03-12T09:55:54,648Z [节点线程] plugin.PluginManager.getPlugins - 初始化插件插件[type = CRaSHShellFactory,interface = ShellFactory]   [INFO] 2018-03-12T09:55:54,648Z [节点线程] plugin.PluginManager.getPlugins - 初始化插件插件[type = JaasAuthenticationPlugin,interface = AuthenticationPlugin]   [INFO] 2018-03-12T09:55:54,649Z [节点线程] plugin.PluginManager.getPlugins - 初始化插件插件[type = SimpleAuthenticationPlugin,interface = AuthenticationPlugin]   [WARN] 2018-03-12T09:56:01,942Z [Thread-0(ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4d22265c)] core.client.createTransportConnection - AMQ212007: connector.create或connectorFactory.createConnector永远不应抛出异常,实现表现不佳,但无论如何我们都会处理它。   java.security.cert.CertPathValidatorException:Path不与任何信任锚链接       在sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:153)〜[?:1.8.0_144]       at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)〜[?:1.8.0_144]       在java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)〜[?:1.8.0_144]       at net.corda.node.utilities.X509Utilities.validateCertificateChain(X509Utilities.kt:153)〜[corda-node-2.0.0.jar:?]       在net.corda.node.services.messaging.VerifyingNettyConnector.createConnection(ArtemisMessagingServer.kt:506)〜[corda-node-2.0.0.jar:?]       在org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1036)〜[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1076)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1254)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:891)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:795)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:238)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:772)[artemis-core-client-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.createSessionFactory(BridgeImpl.java:803)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.connect(BridgeImpl.java:860)[artemis-server-2.1.0.jar:2.1.0]       在org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl $ ConnectRunnable.run(BridgeImpl.java:1045)[artemis-server-2.1.0.jar:2.1.0]       at org.apache.activemq.artemis.utils.OrderedExecutorFactory $ OrderedExecutor $ ExecutorTask.run(OrderedExecutorFactory.java:101)[artemis-commons-2.1.0.jar:2.1.0]       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[?:1.8.0_144]       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)[?:1.8.0_144]       在java.lang.Thread.run(Thread.java:748)[?:1.8.0_144]

1 个答案:

答案 0 :(得分:0)

错误消息来自ArtemisMessagingServer,它使用节点的TLS证书。该消息表明TLS证书链设置不正确,或者节点的信任库中的根证书错误。不幸的是,这是java.security错误,而不是Corda错误,并且它不提供有关问题的确切原因的信息。

您的TLS证书应具有以下链:

TLS证书 - >节点CA证书 - >中间CA证书 - >根CA证书

所有这些证书的密钥都应使用兼容TLS的算法(而不是EdDSA)。