mirror of
https://github.com/corda/corda.git
synced 2025-06-06 01:11:45 +00:00
CORDA-869: Stop silently dropping node configuration errors (#2267)
This commit is contained in:
parent
00a5e3db6b
commit
166918c62c
@ -38,7 +38,6 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
* @return true if the node startup was successful. This value is intended to be the exit code of the process.
|
* @return true if the node startup was successful. This value is intended to be the exit code of the process.
|
||||||
*/
|
*/
|
||||||
open fun run(): Boolean {
|
open fun run(): Boolean {
|
||||||
try {
|
|
||||||
val startTime = System.currentTimeMillis()
|
val startTime = System.currentTimeMillis()
|
||||||
assertCanNormalizeEmptyPath()
|
assertCanNormalizeEmptyPath()
|
||||||
val (argsParser, cmdlineOptions) = parseArguments()
|
val (argsParser, cmdlineOptions) = parseArguments()
|
||||||
@ -66,9 +65,9 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
|
|
||||||
drawBanner(versionInfo)
|
drawBanner(versionInfo)
|
||||||
Node.printBasicNodeInfo(LOGS_CAN_BE_FOUND_IN_STRING, System.getProperty("log-path"))
|
Node.printBasicNodeInfo(LOGS_CAN_BE_FOUND_IN_STRING, System.getProperty("log-path"))
|
||||||
|
val conf = try {
|
||||||
val conf0 = loadConfigFile(cmdlineOptions)
|
val conf0 = loadConfigFile(cmdlineOptions)
|
||||||
|
if (cmdlineOptions.bootstrapRaftCluster) {
|
||||||
val conf = if (cmdlineOptions.bootstrapRaftCluster) {
|
|
||||||
if (conf0 is NodeConfigurationImpl) {
|
if (conf0 is NodeConfigurationImpl) {
|
||||||
println("Bootstrapping raft cluster (starting up as seed node).")
|
println("Bootstrapping raft cluster (starting up as seed node).")
|
||||||
// Ignore the configured clusterAddresses to make the node bootstrap a cluster instead of joining.
|
// Ignore the configured clusterAddresses to make the node bootstrap a cluster instead of joining.
|
||||||
@ -80,7 +79,12 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
} else {
|
} else {
|
||||||
conf0
|
conf0
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logger.error("Exception during node configuration", e)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
banJavaSerialisation(conf)
|
banJavaSerialisation(conf)
|
||||||
preNetworkRegistration(conf)
|
preNetworkRegistration(conf)
|
||||||
if (shouldRegisterWithNetwork(cmdlineOptions, conf)) {
|
if (shouldRegisterWithNetwork(cmdlineOptions, conf)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user