0
votes

We were using our corporate laptops when running the cordapp-example and cordapp-training-solutions. Everything worked including running unit tests, but when trying to build the node through gradlew deployNodeson either repo, we get the same error as shown below. I am using intellij 2018.2 and java 8_181. Tried the same setup on my home PC and it worked - no error.

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 

Any ideas what could have gone wrong? Are there missing environment settings?

1

1 Answers

0
votes

The failed requirement in question is the check on the date validity of the node's certificate. This requirement should not fail, as the certificate has just been generated and is in the date validity window.

However, it's possible that this issue could be caused by differences in how different JREs handle the checking of certificate date validity. We'd expect certificate date validity to be checked using:

start <= now <= end

If instead a JRE checked certificate date validity using:

start < now < end

Then if the machine's clock has not moved since the certificate was generated, the certificate date validity check would fail. This is completely possible, as machine time moves in discrete ticks, rather than continuously. For example, on Windows the clock only has a 15msec granularity.