input-output-hk / daedalus

The open source cryptocurrency wallet for ada, built to grow with the community
https://daedaluswallet.io/
Apache License 2.0
1.23k stars 296 forks source link

5.4.0: Node crashes on startup #3199

Closed Fjodor42 closed 1 month ago

Fjodor42 commented 1 month ago

Startup screen keeps showing that the node crashes.

Relevant log entry seems to be:

cardano-node.real: FatalError {fatalErrorMessage = "Cardano.Node.Run.handleSimpleNodeP2P.readTopologyFile: Is your topology file formatted correctly? Expecting P2P Topology file format. The port and valency fields should be numerical. If you specified the correct topology file make sure that you correctly setup EnableP2P configuration flag. Error in $: key \"LocalRoots\" not found"}/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)
Node configuration: NodeConfiguration {ncSocketConfig = SocketConfig {ncNodeIPv4Addr = Last {getLast = Nothing}, ncNodeIPv6Addr = Last {getLast = Nothing}, ncNodePortNumber = Last {getLast = Just 45643}, ncSocketPath = Last {getLast = Just (SocketPath {unSocketPath = "cardano-node.socket"})}}, ncConfigFile = "/nix/store/b12hn8qli64gqdbsyahzaxlcibxqxwrx-node-cfg-files/config.yaml", ncTopologyFile = "/nix/store/b12hn8qli64gqdbsyahzaxlcibxqxwrx-node-cfg-files/topology.yaml", ncDatabaseFile = "chain", ncProtocolFiles = ProtocolFilepaths {byronCertFile = Nothing, byronKeyFile = Nothing, shelleyKESFile = Nothing, shelleyVRFFile = Nothing, shelleyCertFile = Nothing, shelleyBulkCredsFile = Nothing}, ncValidateDB = False, ncShutdownConfig = ShutdownConfig {scIPC = Just 3, scOnSyncLimit = Just NoShutdown}, ncProtocolConfig = NodeProtocolConfigurationCardano (NodeByronProtocolConfiguration {npcByronGenesisFile = "/nix/store/hm3j37zcsz73k4lbs163472lfshcdzmx-cardano-playground-config-mainnet/byron-genesis.json", npcByronGenesisFileHash = Just "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb", npcByronReqNetworkMagic = RequiresNoMagic, npcByronPbftSignatureThresh = Nothing, npcByronApplicationName = ApplicationName {unApplicationName = "cardano-sl"}, npcByronApplicationVersion = 1, npcByronSupportedProtocolVersionMajor = 3, npcByronSupportedProtocolVersionMinor = 0, npcByronSupportedProtocolVersionAlt = 0}) (NodeShelleyProtocolConfiguration {npcShelleyGenesisFile = "/nix/store/hm3j37zcsz73k4lbs163472lfshcdzmx-cardano-playground-config-mainnet/shelley-genesis.json", npcShelleyGenesisFileHash = Just "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81"}) (NodeAlonzoProtocolConfiguration {npcAlonzoGenesisFile = "/nix/store/hm3j37zcsz73k4lbs163472lfshcdzmx-cardano-playground-config-mainnet/alonzo-genesis.json", npcAlonzoGenesisFileHash = Just "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874"}) (NodeHardForkProtocolConfiguration {npcTestEnableDevelopmentHardForkEras = False, npcTestShelleyHardForkAtEpoch = Nothing, npcTestShelleyHardForkAtVersion = Nothing, npcTestAllegraHardForkAtEpoch = Nothing, npcTestAllegraHardForkAtVersion = Nothing, npcTestMaryHardForkAtEpoch = Nothing, npcTestMaryHardForkAtVersion = Nothing, npcTestAlonzoHardForkAtEpoch = Nothing, npcTestAlonzoHardForkAtVersion = Nothing, npcTestBabbageHardForkAtEpoch = Nothing, npcTestBabbageHardForkAtVersion = Nothing}), ncDiffusionMode = InitiatorAndResponderDiffusionMode, ncSnapshotInterval = DefaultSnapshotInterval, ncTestEnableDevelopmentNetworkProtocols = False, ncMaxConcurrencyBulkSync = Nothing, ncMaxConcurrencyDeadline = Nothing, ncLoggingSwitch = True, ncLogMetrics = True, ncTraceConfig = TracingOnLegacy (TraceSelection {traceVerbosity = NormalVerbosity, traceAcceptPolicy = OnOff {isOn = True}, traceBlockFetchClient = OnOff {isOn = False}, traceBlockFetchDecisions = OnOff {isOn = False}, traceBlockFetchProtocol = OnOff {isOn = False}, traceBlockFetchProtocolSerialised = OnOff {isOn = False}, traceBlockFetchServer = OnOff {isOn = False}, traceBlockchainTime = OnOff {isOn = False}, traceChainDB = OnOff {isOn = True}, traceChainSyncBlockServer = OnOff {isOn = False}, traceChainSyncClient = OnOff {isOn = False}, traceChainSyncHeaderServer = OnOff {isOn = False}, traceChainSyncProtocol = OnOff {isOn = False}, traceConnectionManager = OnOff {isOn = True}, traceConnectionManagerCounters = OnOff {isOn = True}, traceConnectionManagerTransitions = OnOff {isOn = False}, traceDebugPeerSelectionInitiatorTracer = OnOff {isOn = False}, traceDebugPeerSelectionInitiatorResponderTracer = OnOff {isOn = False}, traceDiffusionInitialization = OnOff {isOn = True}, traceDnsResolver = OnOff {isOn = False}, traceDnsSubscription = OnOff {isOn = True}, traceErrorPolicy = OnOff {isOn = True}, traceForge = OnOff {isOn = True}, traceForgeStateInfo = OnOff {isOn = True}, traceHandshake = OnOff {isOn = True}, traceInboundGovernor = OnOff {isOn = True}, traceInboundGovernorCounters = OnOff {isOn = True}, traceInboundGovernorTransitions = OnOff {isOn = True}, traceIpSubscription = OnOff {isOn = True}, traceKeepAliveClient = OnOff {isOn = False}, traceLedgerPeers = OnOff {isOn = True}, traceLocalChainSyncProtocol = OnOff {isOn = False}, traceLocalConnectionManager = OnOff {isOn = True}, traceLocalErrorPolicy = OnOff {isOn = True}, traceLocalHandshake = OnOff {isOn = True}, traceLocalInboundGovernor = OnOff {isOn = False}, traceLocalMux = OnOff {isOn = False}, traceLocalRootPeers = OnOff {isOn = True}, traceLocalServer = OnOff {isOn = False}, traceLocalStateQueryProtocol = OnOff {isOn = False}, traceLocalTxMonitorProtocol = OnOff {isOn = False}, traceLocalTxSubmissionProtocol = OnOff {isOn = False}, traceLocalTxSubmissionServer = OnOff {isOn = False}, traceMempool = OnOff {isOn = False}, traceMux = OnOff {isOn = False}, tracePeerSelection = OnOff {isOn = True}, tracePeerSelectionCounters = OnOff {isOn = True}, tracePeerSelectionActions = OnOff {isOn = True}, tracePublicRootPeers = OnOff {isOn = True}, traceServer = OnOff {isOn = True}, traceTxInbound = OnOff {isOn = False}, traceTxOutbound = OnOff {isOn = False}, traceTxSubmissionProtocol = OnOff {isOn = False}, traceTxSubmission2Protocol = OnOff {isOn = False}}), ncTraceForwardSocket = Nothing, ncMaybeMempoolCapacityOverride = Nothing, ncProtocolIdleTimeout = 5s, ncTimeWaitTimeout = 60s, ncAcceptedConnectionsLimit = AcceptedConnectionsLimit {acceptedConnectionsHardLimit = 512, acceptedConnectionsSoftLimit = 384, acceptedConnectionsDelay = 5s}, ncTargetNumberOfRootPeers = 100, ncTargetNumberOfKnownPeers = 100, ncTargetNumberOfEstablishedPeers = 50, ncTargetNumberOfActivePeers = 20, ncEnableP2P = EnabledP2PMode}

Please advise.

danielmain commented 1 month ago

Hi @Fjodor42 would you pls tell me more details? Are you on Linux? Did you update manually or using the auto-update?

What is this cardano-node.real ?

Fjodor42 commented 1 month ago

Sure, and those are reasonable questions!

  1. Linux
  2. Auto-update
  3. As detailed in #3154, I wanted to utilize more of my CPU cores. I shall outline the method below, which explains the cardano-node.real

As per 3., what I have done for the past few releases, is to, after update, find out where cardano-node resides, go to that dir, rename it to cardano-node.real, and make cardano-node an executable bash script shown below.

This has worked well, and to my mind, the error message seems unrelated, although I could be wrong.

cardano-node bash script:

#!/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

exec ${HOME}/.daedalus/nix/store/icdpkzfa19f54xsr1wlrszfym75igf10-daedalus-cardano-bridge/bin/cardano-node.real +RTS -N8 -RTS "$@"

EDIT just before posting: As I wanted to post the script above, I looked at source, and I realised the the exec line should make use of the SCRIPT_DIR variable that I set in it, instead of the hard-coded (and now outdated) full path, leading me to facepalm myself.

Rewriting that line to read the following makes it run - the error seemingly stems from calling the old version and, as such, this is to be regarded as a PEBKAC, leading me to close the issue.

exec ${SCRIPT_DIR}/cardano-node.real +RTS -N8 -RTS "$@"

Thank you for asking, leading me to realise my error by trying to answer :-)