Nano /etc/systemd/system/cardano-node.service (systemctl / line 11 error)

cardano-node version
cardano-node 1.25.1 - linux-x86_64 - ghc-8.10
git rev 9a7331cce5e8bc0ea9c6bfa1c28773f4c5a7000f

journalctl -e -f -u cardano-node.service

Feb 23 18:27:59xxxx bash[142655]: /home/zzz/cardano-my-node/startBlockProducingNode.sh: line 11: cardano-node: c ommand not found
Feb 23 18:28:05 xxxx bash[142670]: /home/zzz/cardano-my-node/startBlockProducingNode.sh: line 11: cardano-node: c ommand not found
Feb 23 18:28:10xxxx bash[142701]: /home/zzz/cardano-my-node/startBlockProducingNode.sh: line 11: cardano-node: c ommand not found

Line 11 in /etc/systemd/system/cardano-node.service (command=

WorkingDirectory= xxxx/cardano-my-node
ExecStart = /bin/bash -c ‘xxxx/cardano-my-node/startBlockProducingNode.sh’

the bin bash should be the line 11, not sure what is wrong tho

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 Tue 2021-02-23 19:03:01 UTC; 838ms ago
Process: 150238 ExecStart=/bin/bash -c /home/xxx/cardano-my-node/startBlockProducingNode.sh (code=exited, status=127)
Main PID: 150238 (code=exited, status=127)

Are you able to run the command manually? In your case, the command would be:

/bin/bash -c ‘xxxx/cardano-my-node/startBlockProducingNode.sh

1 Like

I used to be able to

cardano-node: FatalError {fatalErrorMessage = "Cardano.Node.Run.handleSimpleNode .readTopologyFile: Is your topology file formatted correctly? The port and valen cy fields should be numerical. Error in $: not enough input. Expecting object va

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 Tue 2021-02-23 20:41:40 UTC; 4s ago
Process: 2746 ExecStart=/bin/bash -c /home/xxx/cardano-my-node/startBlockProducingNode.sh (code=exited, status=127)

Could you paste the contents of your starting script? Status code 127 some part of your command was not found in your PATH. Most likely, cardano-node or when you run manually, your topology file.

1 Like

DIRECTORY=/home/xxx/cardano-my-node
PORT=xxxx
HOSTADDR=0.0.0.0
TOPOLOGY={DIRECTORY}/mainnet-topology.json DB_PATH={DIRECTORY}/db
SOCKET_PATH={DIRECTORY}/db/socket CONFIG={DIRECTORY}/mainnet-config.json
KES={DIRECTORY}/kes.skey VRF={DIRECTORY}/vrf.skey
CERT={DIRECTORY}/node.cert cardano-node run --topology {TOPOLOGY} --database-path {DB_PATH} --socket-path {SOCKET_PATH} --host-addr {HOSTADDR} --port {PORT} --config {CONFIG} --shelley-kes-key {KES} --shelley-vrf-key {VRF} --shelley-operational-certificate {CERT}

Maybe adding it as a block text in the forum would help the formatting? If I assume your newlines etc are in order, I take it your main command is:

cardano-node run --topology {TOPOLOGY} --database-path {DB_PATH} --socket-path {SOCKET_PATH} --host-addr {HOSTADDR} --port {PORT} --config {CONFIG} --shelley-kes-key {KES} --shelley-vrf-key {VRF} --shelley-operational-certificate {CERT}

An easy way out is probably to add the full path to cardano-node, as it seems systemd is unable to find it. In your case (if you’ve followed the coincashew guide?) that should be:

/home/xxx/.local/bin/cardano-node run your arguments goes here

my cardano folder is actually in git
home/xxx/git/cardano-node

where does that path go?

You replace the last line of your startup script. If I interpret the file correctly, it should look something like this:

DIRECTORY=/home/xxx/cardano-my-node
PORT=xxxx
HOSTADDR=0.0.0.0
TOPOLOGY={DIRECTORY}/mainnet-topology.json DB_PATH={DIRECTORY}/db
SOCKET_PATH={DIRECTORY}/db/socket CONFIG={DIRECTORY}/mainnet-config.json
KES={DIRECTORY}/kes.skey VRF={DIRECTORY}/vrf.skey
CERT={DIRECTORY}/node.cert
/home/xxx/git/cardano-node run --topology {TOPOLOGY} --database-path {DB_PATH} --socket-path {SOCKET_PATH} --host-addr {HOSTADDR} --port {PORT} --config {CONFIG} --shelley-kes-key {KES} --shelley-vrf-key {VRF} --shelley-operational-certificate {CERT}

So we’ve added the entire path to your cardano-node binary in your startup script. Can’t promise it’ll work, but it won’t hurt either :slight_smile:

And obviously you’ll need to change the PORT variable to whatever you configure your port to :slight_smile:

./startBlockProducingNode.sh: line 11: /home/xxx/home/xxx/cardano-node: No such file or directory

Hmm, thats not the PATH from my paste? There’s one /home/xxx to much?

./startBlockProducingNode.sh: line 11: /home/xx/git/cardano-node/cardano-node: Is a directory

i tried it with out the cardano-node folder also

now its doing this for some reason : after resetting back to normal

./startBlockProducingNode.sh
InvalidYaml (Just (YamlException “Yaml file not found: /home/xxx/cardano-node/mainnet-config.json”))

cardano-node: YAML exception:
Yaml file not found: /home/sss/cardano-node/mainnet-config.jsondii@:~/cardano-my-node$

Oh, I thought that was were you kept your binary? Is it available for your regular user? Does

which cardano-node

give you any output?

I’m not sure what you mean by “resetting back to normal”? And not sure why you’re getting Yaml parsing errors when you’re inputting json… :slight_smile: Are you getting this error when you’re trying to run the script manually? Or when systemd is trying to run it?

/home/xxx/.local/bin/cardano-node

that was just a manual execution of the command . /cardano-my-node$ ./startBlockProducingNode.sh

Yeah, thats the path I gave you first. Replace the path from my example above with this path. So instead of /home/xxx/git/cardano-node you write /home/xxx/.local/bin/cardano-node