# Can't run cardano-node.service

**URL:** <https://forum.cardano.org/t/cant-run-cardano-node-service/113310>\
**Category:** Setup a Stake Pool\
**Created:** [21 January 2023 22:46 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310 "2023-01-21T22:46:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [21 January 2023 22:46 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/1 "2023-01-21T22:46:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [21 January 2023 22:56 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/2 "2023-01-21T22:56:43Z")

</div>

> [@effincomputers](#):
>
> Failed to determine user credentials

> <https://superuser.com/questions/1156676/what-causes-systemd-failed-at-step-user-spawning-usr-sbin-opendkim-no-such-p>

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

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [21 January 2023 23:28 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/3 "2023-01-21T23:28:41Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [21 January 2023 23:41 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/4 "2023-01-21T23:41:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [21 January 2023 23:44 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/5 "2023-01-21T23:44:29Z")

</div>

# 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’

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [22 January 2023 00:12 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/6 "2023-01-22T00:12:03Z")

</div>

> [@effincomputers](#):
>
> 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`?

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [22 January 2023 00:15 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/7 "2023-01-22T00:15:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [22 January 2023 00:18 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/8 "2023-01-22T00:18:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [22 January 2023 00:32 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/9 "2023-01-22T00:32:40Z")

</div>

Seems like the configuration file is missing.

You are following the CoinCashew guide?

> **[Downloading Configuration Files](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-ii-configuration/downloading-configuration-files)**

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [22 January 2023 00:35 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/10 "2023-01-22T00:35:07Z")

</div>

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:

```auto
{
  "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
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [22 January 2023 00:45 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/11 "2023-01-22T00:45:46Z")

</div>

> [@effincomputers](#):
>
> Yaml file not found: home/adminx/cardano-my-node/config.json

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`?

---

<div class="post-metadata">

**Author:** ![effincomputers](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@effincomputers](https://forum.cardano.org/u/effincomputers)\
**Post date:** [22 January 2023 00:51 UTC](https://forum.cardano.org/t/cant-run-cardano-node-service/113310/12 "2023-01-22T00:51:50Z")

</div>

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!!!
