# Cardano-node.service code=exited, status=127

**URL:** <https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638>\
**Category:** Operate a Stake Pool\
**Created:** [28 February 2021 13:06 UTC](https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638 "2021-02-28T13:06:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![godofrefuse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/godofrefuse/32/26979_2.png) [@godofrefuse](https://forum.cardano.org/u/godofrefuse)\
**Post date:** [28 February 2021 13:06 UTC](https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638/1 "2021-02-28T13:06:18Z")

</div>

![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/d/f/dfd07e71fc9d2e8eb727acc15d211d2dab81ed74.png)

cardano-node.service: Main process exited, code=exited, status=127/n/a

I googled this exit status for other scripts and it says it has to do with this line:

ExecStart = /bin/bash -c ‘${NODE\_HOME}/startBlockProducingNode.sh’

my current line is:

ExecStart = /bin/bash -c ‘/home/xxx/cardano-my-node/startBlockProducingNode.sh’

---

<div class="post-metadata">

**Author:** ![godofrefuse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/godofrefuse/32/26979_2.png) [@godofrefuse](https://forum.cardano.org/u/godofrefuse)\
**Post date:** [28 February 2021 14:37 UTC](https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638/2 "2021-02-28T14:37:07Z")

</div>

My .bashrc file had a link to the wrong $NODE\_HOME was pointing to $CNODE\_HOME that was in /opt/cardano/cnode/

I deleted the line in the .bashrc

Now its working:

sudo systemctl status cardano-node  
● cardano-node.service - Cardano node service  
Loaded: loaded (/etc/systemd/system/cardano-node.service; enabled; vendor preset: enabled)  
Active: active (running) since Sun 2021-02-28 14:35:18 UTC; 7ms ago  
Main PID: 41604 (bash)  
Tasks: 1 (limit: 4638)  
Memory: 152.0K  
CGroup: /system.slice/cardano-node.service  
└─41604 /bin/bash -c /home/xx/cardano-my-node/startBlockProducingNode.sh

---

<div class="post-metadata">

**Author:** ![godofrefuse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/godofrefuse/32/26979_2.png) [@godofrefuse](https://forum.cardano.org/u/godofrefuse)\
**Post date:** [28 February 2021 15:32 UTC](https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638/5 "2021-02-28T15:32:26Z")

</div>

$ sudo systemctl status cardano-node  
● cardano-node.service - Cardano node service  
Loaded: loaded (/etc/systemd/system/cardano-node.service; enabled; vendor preset: enabled)  
Active: activating (auto-restart) (Result: exit-code) since Sun 2021-02-28 15:31:18 UTC; 2s ago  
Main PID: 11851 (code=exited, status=127)  
Tasks: 0 (limit: 4638)  
Memory: 0B  
CGroup: /system.slice/cardano-node.service

So I deleted some extra ./local/bin/user lines in my PATH= in my .bashrc file

So now the error code is no longer red. But still having the exit code.

---

<div class="post-metadata">

**Author:** ![godofrefuse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/godofrefuse/32/26979_2.png) [@godofrefuse](https://forum.cardano.org/u/godofrefuse)\
**Post date:** [28 February 2021 15:46 UTC](https://forum.cardano.org/t/cardano-node-service-code-exited-status-127/50638/6 "2021-02-28T15:46:36Z")

</div>

Okay I solved it, here are the steps I took to fix it if anyone is having a problem with the “COIN CASHEW GUIDE” getting your systemctl status cardano-node working.

I copied my cardano-node / cardano-cli to /usr/local/bin/

I updated my ./startBlockProducer.sh and add the path " /usr/local/bin/cardano-node run" in front of that command

I remove all the lines from my .bashrc at the bottom and redid this step:

> Blockquoteecho PATH=“$HOME/.local/bin:$PATH” \>\> $HOME/.bashrc  
> echo export LD\_LIBRARY\_PATH=“/usr/local/lib:$LD\_LIBRARY\_PATH” \>\> $HOME/.bashrc  
> echo export NODE\_HOME=$HOME/cardano-my-node \>\> $HOME/.bashrc  
> echo export NODE\_CONFIG=mainnet\>\> $HOME/.bashrc  
> echo export NODE\_BUILD\_NUM=$(curl [https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/index.html](https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/index.html) | grep -e “build” | sed ‘s/._build/([0-9]_)/download.\*/\1/g’) \>\> $HOME/.bashrc  
> source $HOME/.bashrc

Dont forget this extra line in .bashrc

> Blockquote echo export CARDANO\_NODE\_SOCKET\_PATH=“$NODE\_HOME/db/socket” \>\> $HOME/.bashrc  
> source $HOME/.bashrc

> Blockquote cardano-node.service - Cardano node service  
> Loaded: loaded (/etc/systemd/system/cardano-node.service; enabled; vendor preset: enabled)  
> Active: active (running) since Sun 2021-02-28 15:49:59 UTC; 206ms ago  
> Main PID: 16183 (bash)  
> Tasks: 7 (limit: 4638)  
> Memory: 36.0M  
> CGroup: /system.slice/cardano-node.service  
> ├─16183 /bin/bash -c /home/xxx/cardano-my-node/startBlockProducingNode.sh  
> └─16184 /usr/local/bin/cardano-node run --topology /home/dii/cardano-my-node/mainnet-topology.json --database-path /home/xxx/card\>

Feb 28 15:49:59 ip-xxx systemd[1]: Started Cardano node service.

> Blockquote  
> Also check your ENV file and make sure this path is:  
> CCLI=“/usr/local/bin/cardano-cli”
