Uploaded image for project: 'Corda'
  1. CORDA-2786

Not handled excpetion when certificates directory is missing

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects versions: Corda 4, Corda Enterprise 4 RC05, Corda Enterprise 4
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None
    • Affected OS:
      Linux
    • Severity:
      Low
    • Feature Team:
      Operational Experience
    • Sprint:

      Description

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

      [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:?]
      

        Attachments

          Activity

            People

            • Assignee:
              jonathan.locke Jonathan Locke
              Reporter:
              wawrzek.n Wawrzek NiewodniczaƄski
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: