diff --git a/docs/source/corda-configuration-file.rst b/docs/source/corda-configuration-file.rst index 3a2aab3827..ce4ea72763 100644 --- a/docs/source/corda-configuration-file.rst +++ b/docs/source/corda-configuration-file.rst @@ -36,6 +36,10 @@ This prevents configuration errors when mixing keys containing ``.`` wrapped wit By default the node will fail to start in presence of unknown property keys. To alter this behaviour, the ``on-unknown-config-keys`` command-line argument can be set to ``IGNORE`` (default is ``FAIL``). +.. note:: As noted in the HOCON documentation, the default behaviour for resources referenced within a config file is to silently + ignore them if missing. Therefore it is strongly recommended to utilise the ``required`` syntax for includes. See HOCON documentation + for more information. + Overriding configuration values ------------------------------- diff --git a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt index d3016b08a6..e3fff7d216 100644 --- a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt +++ b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt @@ -74,15 +74,16 @@ open class SharedNodeCmdLineOptions { } errors.forEach { error -> when (error) { - is ConfigException.IO -> logger.error(configFileNotFoundMessage(configFile)) + is ConfigException.IO -> logger.error(configFileNotFoundMessage(configFile, error.cause)) else -> logger.error(error.message) } } } - private fun configFileNotFoundMessage(configFile: Path): String { + private fun configFileNotFoundMessage(configFile: Path, cause: Throwable?): String { return """ Unable to load the node config file from '$configFile'. + ${cause?.message?.let { "Cause: $it" } ?: ""} Try setting the --base-directory flag to change which directory the node is looking in, or use the --config-file flag to specify it explicitly.