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

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’

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

$ 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.

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