We're updating the issue view to help you get more done. 

Not handled excpetion when certificates directory is missing

Description

Starting node with missing certificates is not so uncommon scenario. Should be handled better:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 [ERROR] 2019-03-15T16:39:22,850Z [main] internal.Node.getCertificateStores - IO exception while trying to validate keystores and truststore [errorCode=vz4adc, moreInformationAt=https://errors.corda.net/ENT/4.0-RC05/vz4adc] java.nio.file.NoSuchFileException: /opt/corda/node/4.0-RC05/certificates/sslkeystore.jks at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[?:1.8.0_191] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_191] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_191] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:1.8.0_191] at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_191] at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_191] at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_191] at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_191] at net.corda.core.internal.PathUtilsKt.inputStream(PathUtils.kt:132) ~[corda-core-4.0-RC05.jar:?] at net.corda.nodeapi.internal.crypto.KeyStoreUtilities.loadKeyStore(KeyStoreUtilities.kt:163) ~[corda-node-api-4.0-RC05.jar:?] at net.corda.nodeapi.internal.crypto.X509KeyStore$Companion.fromFile(X509KeyStore.kt:32) ~[corda-node-api-4.0-RC05.jar:?] at net.corda.nodeapi.internal.config.CertificateStore$Companion.fromFile(CertificateStore.kt:21) ~[corda-node-api-4.0-RC05.jar:?] at net.corda.nodeapi.internal.config.FileBasedCertificateStoreSupplier.get(CertificateStoreSupplier.kt:22) ~[corda-node-api-4.0-RC05.jar:?] at net.corda.nodeapi.internal.config.CertificateStoreSupplier$DefaultImpls.get$default(CertificateStoreSupplier.kt:8) ~[corda-node-api-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.getCertificateStores(AbstractNode.kt:742) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.validateKeyStores(AbstractNode.kt:758) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.initKeyStores(AbstractNode.kt:282) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:318) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.Node.start(Node.kt:476) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.EnterpriseNode.start(EnterpriseNode.kt:180) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:187) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupCli$runProgram$2.run(NodeStartup.kt:112) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:164) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:119) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupLogging$DefaultImpls.attempt(NodeStartup.kt:463) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.attempt(NodeStartup.kt:119) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:162) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:110) ~[corda-node-4.0-RC05.jar:?] at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184) ~[corda-tools-cliutils-4.0-RC05.jar:?] at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152) ~[corda-tools-cliutils-4.0-RC05.jar:?] at picocli.CommandLine.execute(CommandLine.java:1056) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine.access$900(CommandLine.java:142) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$RunLast.handle(CommandLine.java:1246) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$RunLast.handle(CommandLine.java:1214) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405) ~[picocli-3.8.0.jar:3.8.0] at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72) ~[corda-tools-cliutils-4.0-RC05.jar:?] at net.corda.node.Corda.main(Corda.kt:13) ~[corda-node-4.0-RC05.jar:?] [ERROR] 2019-03-15T16:39:22,873Z [main] internal.NodeStartupLogging.invoke - Exception during node startup: One or more keyStores (identity or TLS) or trustStore not found. Please either copy your existing keys and certificates from another node, or if you don't have one yet, fill out the config file and run corda.jar initial-registration. Read more at: https://docs.corda.net/permissioning.html [errorCode=16fn52g, moreInformationAt=https://errors.corda.net/ENT/4.0-RC05/16fn52g] java.lang.IllegalArgumentException: One or more keyStores (identity or TLS) or trustStore not found. Please either copy your existing keys and certificates from another node, or if you don't have one yet, fill out the config file and run corda.jar initial-registration. Read more at: https://docs.corda.net/permissioning.html at net.corda.node.internal.AbstractNode.validateKeyStores(AbstractNode.kt:758) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.initKeyStores(AbstractNode.kt:282) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:318) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.Node.start(Node.kt:476) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.EnterpriseNode.start(EnterpriseNode.kt:180) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:187) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupCli$runProgram$2.run(NodeStartup.kt:112) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:164) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup$initialiseAndRun$5.invoke(NodeStartup.kt:119) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupLogging$DefaultImpls.attempt(NodeStartup.kt:463) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.attempt(NodeStartup.kt:119) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartup.initialiseAndRun(NodeStartup.kt:162) ~[corda-node-4.0-RC05.jar:?] at net.corda.node.internal.NodeStartupCli.runProgram(NodeStartup.kt:110) ~[corda-node-4.0-RC05.jar:?] at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:184) ~[corda-tools-cliutils-4.0-RC05.jar:?] at net.corda.cliutils.CordaCliWrapper.call(CordaCliWrapper.kt:152) ~[corda-tools-cliutils-4.0-RC05.jar:?] at picocli.CommandLine.execute(CommandLine.java:1056) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine.access$900(CommandLine.java:142) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$RunLast.handle(CommandLine.java:1246) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$RunLast.handle(CommandLine.java:1214) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1122) ~[picocli-3.8.0.jar:3.8.0] at picocli.CommandLine.parseWithHandlers(CommandLine.java:1405) ~[picocli-3.8.0.jar:3.8.0] at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:72) ~[corda-tools-cliutils-4.0-RC05.jar:?] at net.corda.node.Corda.main(Corda.kt:13) ~[corda-node-4.0-RC05.jar:?]

Status

Assignee

Jonathan Locke

Reporter

Wawrzek Niewodniczański

Priority

Medium

Labels

None

Severity

Low

Fix versions

Ported to...

None

Feature Team

Operational Experience

Affected OS

Linux

Affects versions

Corda 4
Corda Enterprise 4 RC05
Corda Enterprise 4