Can't run cardano-node.service

I’ve edited the service file, due to a different error. That error’s gone. Now I see this outcome after running this command: journalctl --unit=cardano-node --follow

cardano-node.service: Failed to determine user credentials: No such process
cardano-node.service: Failed at step USER spawning /bin/bash: No such process

Is there a spawning service that needs to be created?

Either you have a totally wrong username in the service file or you have quotes around it or something like that.

Turns out the problem was further down in the service file.
ExecStart = /bin/bash -c ‘</home/username/cardano-my-node/startCardanoNode.sh’
removed single quotes

Now when I run the command I see:

Jan 21 18:25:57 HP5 systemd[1]: Stopped Cardano Node Service.
Jan 21 18:25:57 HP5 systemd[1]: Started Cardano Node Service.
Jan 21 18:25:57 HP5 systemd[1]: cardano-node.service: Deactivated successfully.
Jan 21 18:26:02 HP5 systemd[1]: cardano-node.service: Scheduled restart job, restart counter is at 567.
Jan 21 18:26:02 HP5 systemd[1]: Stopped Cardano Node Service.
Jan 21 18:26:02 HP5 systemd[1]: Started Cardano Node Service.
Jan 21 18:26:02 HP5 systemd[1]: cardano-node.service: Deactivated successfully.
Jan 21 18:26:08 HP5 systemd[1]: cardano-node.service: Scheduled restart job, restart counter is at 568.
Jan 21 18:26:08 HP5 systemd[1]: Stopped Cardano Node Service.
Jan 21 18:26:08 HP5 systemd[1]: Started Cardano Node Service.
Jan 21 18:26:08 HP5 systemd[1]: cardano-node.service: Deactivated successfully.
Jan 21 18:26:13 HP5 systemd[1]: cardano-node.service: Scheduled restart job, restart counter is at 569.

Is it working?

No, it’s immediately exiting again (or at least systemd thinks it is), no idea why, especially without seeing the service file that you modified.

The Cardano Node service (part of systemd)

file: /etc/systemd/system/cardano-node.service

[Unit]
Description = Cardano Node Service
Wants = network-online.target
After = network-online.target

[Service]
User = user
Type = simple
WorkingDirectory = /home/user/cardano-my-node
ExecStart = /bin/bash -c /home/user/cardano-my-node/startCardanoNode.sh
KillSignal = SIGINT
RestartKillSignal = SIGINT
TimeoutStopSec = 300
LimitNOFILE = 32768
Restart = always
RestartSec = 5
SyslogIdentifier = cardano-node

[Install]
WantedBy = multi-user.target

I ended up editing the startCardanoNode.sh file in the cardano-my-node directory
Had some unnecessary characters in it.
Now when I run that command I get:
cardano-node.service: Main process exited, code=exited, status=1/FAILURE
cardano-node.service: Failed with result ‘exit-code’

That doesn’t say much about why it exited.

Do you see more errors in the journalctl before that?

Or can you try to manually run startCardanoNode.sh?

I’ve looked further and found similar things as before. Now when I run it I get:
Jan 21 19:14:35 HP5 systemd[1]: cardano-node.service: Scheduled restart job, restart counter is at 200.
Jan 21 19:14:35 HP5 systemd[1]: Stopped Cardano Node Service.
Jan 21 19:14:35 HP5 systemd[1]: Started Cardano Node Service.
Jan 21 19:14:35 HP5 cardano-node[16989]: InvalidYaml (Just (YamlException “Yaml file not found: home/adminx/cardano-my-node/config.json”))
Jan 21 19:14:35 HP5 cardano-node[16989]: cardano-node: YAML exception:
Jan 21 19:14:35 HP5 cardano-node[16989]: Yaml file not found: home/adminx/cardano-my-node/config.json

Whem I run startCardanoNode.sh I get:

./startCardanoNode.sh
InvalidYaml (Just (YamlException “Yaml file not found: home/adminx/cardano-my-node/config.json”))

cardano-node: YAML exception:
Yaml file not found: home/adminx/cardano-my-node/config.json

Seems like the configuration file is missing.

You are following the CoinCashew guide?

Yes, I downloaded all of the files listed in that section and moved them to $NODE_HOME

Here’s the config.json file in the cardano-my-node folder:

{
  "AlonzoGenesisFile": "alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
  "ApplicationName": "cardano-sl",
  "ApplicationVersion": 1,
  "ByronGenesisFile": "byron-genesis.json",
  "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
  "LastKnownBlockVersion-Alt": 0,
  "LastKnownBlockVersion-Major": 3,
  "LastKnownBlockVersion-Minor": 0,
  "MaxKnownMajorProtocolVersion": 2,
  "Protocol": "Cardano",
  "RequiresNetworkMagic": "RequiresNoMagic",
  "ShelleyGenesisFile": "shelley-genesis.json",
  "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
  "TraceAcceptPolicy": true,
  "TraceBlockFetchClient": false,
  "TraceBlockFetchDecisions": false,
  "TraceBlockFetchProtocol": false,
  "TraceBlockFetchProtocolSerialised": false,
  "TraceBlockFetchServer": false,
  "TraceChainDb": true,
  "TraceChainSyncBlockServer": false,
  "TraceChainSyncClient": false,
  "TraceChainSyncHeaderServer": false,
  "TraceChainSyncProtocol": false,
  "TraceConnectionManager": true,
  "TraceDNSResolver": true,
  "TraceDNSSubscription": true,
  "TraceDiffusionInitialization": true,
  "TraceErrorPolicy": true,
  "TraceForge": true,
  "TraceHandshake": false,
  "TraceInboundGovernor": true,
  "TraceIpSubscription": true,
  "TraceLedgerPeers": true,
  "TraceLocalChainSyncProtocol": false,
  "TraceLocalErrorPolicy": true,
  "TraceLocalHandshake": false,
  "TraceLocalRootPeers": true,
  "TraceLocalTxSubmissionProtocol": false,
  "TraceLocalTxSubmissionServer": false,
  "TraceMempool": true,
  "TraceMux": false,
  "TracePeerSelection": true,
  "TracePeerSelectionActions": true,
  "TracePublicRootPeers": true,
  "TraceServer": true,
  "TraceTxInbound": false,
  "TraceTxOutbound": false,
  "TraceTxSubmissionProtocol": false,
  "TracingVerbosity": "NormalVerbosity",
  "TurnOnLogMetrics": true,
  "TurnOnLogging": true,
  "defaultBackends": [
    "KatipBK"
  ],
  "defaultScribes": [
    [
      "StdoutSK",
      "stdout"
    ]
  ],
  "hasEKG": 12788,
  "hasPrometheus": [
    "127.0.0.1",
    12798
  ],
  "minSeverity": "Info",
  "options": {
    "mapBackends": {
      "cardano.node.metrics": [
        "EKGViewBK"
      ],
      "cardano.node.resources": [
        "EKGViewBK"
      ]
    },
    "mapSubtrace": {
      "cardano.node.metrics": {
        "subtrace": "Neutral"
      }
    }
  },
  "rotation": {
    "rpKeepFilesNum": 10,
    "rpLogLimitBytes": 5000000,
    "rpMaxAgeHours": 24
  },
  "setupBackends": [
    "KatipBK"
  ],
  "setupScribes": [
    {
      "scFormat": "ScText",
      "scKind": "StdoutSK",
      "scName": "stdout",
      "scRotation": null
    }
  ]
}

Other possibility: There should be a slash at the beginning: /home/adminx/cardano-my-node/config.json
Did you delete that when editing startCardanoNode.sh?

That was it! Thank you. I am not getting any unexpected errors now. I just have to work on the relay tomorrow. Thank you so much!!!

1 Like