gradlew deploynodes在cordapp-example和cordapp-training-solutions上发生节点启动错误期间发生异常

时间:2018-10-10 06:20:54

标签: corda

在运行cordapp-example和cordapp-training-solutions时,我们正在使用我们的公司笔记本电脑。一切都可以进行,包括运行单元测试,但是当尝试通过任一仓库上的gradlew deployNodes构建节点时,我们将得到如下所示的相同错误。我正在使用intellij 2018.2和Java 8_181。在家用PC上尝试了相同的设置,并且可以正常工作-没有错误。

enter 
Logs can be found in                    : C:\corda-training-solutions-master\java-source\build\nodes\Notary\logs
[1;31mE 17:09:26+0700 [main] internal.Node.run - Exception during node startup {}
[m java.lang.IllegalArgumentException: Failed requirement.
at net.corda.nodeapi.internal.crypto.X509Utilities.createCertificate(X509Utilities.kt:250) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.crypto.X509Utilities.createCertificate(X509Utilities.kt:193) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.crypto.X509Utilities.createCertificate$default(X509Utilities.kt:191) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.KeyStoreConfigHelpersKt$createDevKeyStores$2.invoke(KeyStoreConfigHelpers.kt:39) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.KeyStoreConfigHelpersKt$createDevKeyStores$2.invoke(KeyStoreConfigHelpers.kt) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.crypto.X509KeyStore.update(X509KeyStore.kt:71) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.KeyStoreConfigHelpersKt.createDevKeyStores(KeyStoreConfigHelpers.kt:37) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.nodeapi.internal.KeyStoreConfigHelpersKt.createDevKeyStores$default(KeyStoreConfigHelpers.kt:25) ~[corda-node-api-3.2-corda.jar:?]
at net.corda.node.services.config.ConfigUtilitiesKt.configureDevKeyAndTrustStores(ConfigUtilities.kt:57) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.services.config.ConfigUtilitiesKt.configureWithDevSSLCertificate(ConfigUtilities.kt:48) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.AbstractNode.initCertificate(AbstractNode.kt:168) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.AbstractNode.generateAndSaveNodeInfo(AbstractNode.kt:176) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.Node.generateAndSaveNodeInfo(Node.kt:353) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:142) ~[corda-node-3.2-corda.jar:?]
at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:115) [corda-node-3.2-corda.jar:?]
at net.corda.node.Corda.main(Corda.kt:13) [corda-node-3.2-corda.jar:?]code 

任何想法可能出了什么问题?是否缺少环境设置?

1 个答案:

答案 0 :(得分:0)

有问题的failed requirement是对节点证书日期有效性的检查。此要求不应失败,因为证书刚刚生成并且位于日期有效期窗口中。

但是,此问题很可能是由不同的JRE处理证书日期有效性检查的方式不同引起的。我们希望使用以下方法检查证书日期的有效性:

start <= now <= end

如果相反,JRE使用以下方法检查了证书日期有效性:

start < now < end

然后,如果自生成证书以来机器时钟没有移动,则证书日期有效性检查将失败。这是完全可能的,因为机器时间以离散的滴答声而不是连续地移动。例如,在Windows上,时钟的粒度只有15毫秒。