Cardano-node.service (failed to load environment files) (failed to run 'start' t ask) (failed with result 'resources'(failed to start Cardano node service)

What environment file?

I changed my /etc/systemd/system/cardano-node.service (to the default in the guide)

image

image

Still wrong working directory
In guide is NODE_HOME

What do you mean wrong working directory?

yes in the guide its $NODE_HOME (when I do the cat command it changes it to my /home/user/cardano-node path

Ive changed working directory to $NODE_HOME my /home/user/cardano_node

both give error

I think it might be this inside "/startBlockProducing.sh

/usr/local/bin/cardano-node run

this path wasn’t in front of my cardano-node

1 Like

sudo systemctl reload-or-restart cardano-node
Failed to reload-or-restart cardano-node.service: Unit cardano-node.service has a bad unit file setting.
See system logs and ‘systemctl status cardano-node.service’ for details.

systemctl status cardano-node.service
● cardano-node.service - Cardano node service
Loaded: bad-setting (Reason: Unit cardano-node.service has a bad unit file setting.)
Active: failed (Result: resources) since Sun 2021-02-28 12:13:40 UTC; 23min ago

[Unit]
Description = Cardano node service
Wants = network-online.target
After = network-online.target

[Service]
User = {USER} Type = simple WorkingDirectory= {NODE_HOME}
ExecStart = /bin/bash -c ‘${NODE_HOME}/startBlockProducingNode.sh’
KillSignal=SIGINT
RestartKillSignal=SIGINT
TimeoutStopSec=2
LimitNOFILE=32768
Restart=always
RestartSec=5

[Install]
WantedBy= multi-user.target

$ journalctl -xe
Hint: You are currently not seeing messages from other users and the system.
Users in groups ‘adm’, ‘systemd-journal’ can see all messages.
Pass -q to turn off this notice.

– The process /bin/bash could not be executed and failed.

– The error number returned by this process is ERRNO.
Feb 28 12:07:42 x systemd[139646]: cnode.service: Changing to the requested working directory failed: No such file or directory
Feb 28 12:07:42 x systemd[139646]: cnode.service: Failed at step CHDIR spawning /bin/bash: No such file or directory

I don’t know why it’s saying cnode.service do u have cnode.service also as systemd?

Cheers

I dont see it in there, I deleted it.

this config is missing keys i just noticed i need to add, since i remade it.

It’s something related with paths

Well i just noticed my cardano-cli is missing from my .local/bin for some reason…

wait never mind its in there

I redid my startBlocking script

systemctl status cardano-node.service
● cardano-node.service - Cardano node service
Loaded: loaded (/etc/systemd/system/cardano-node.service; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Sun 2021-02-28 12:13:40 UTC; 41min ago

journalctl --unit=cardano-node --follow
Hint: You are currently not seeing messages from other users and the system.
Users in groups ‘adm’, ‘systemd-journal’ can see all messages.
Pass -q to turn off this notice.
– Logs begin at Sat 2021-02-20 19:52:04 UTC. –
Feb 25 18:18:01 ip-x bash[574959]: /home/x/cardano-my-node/startBlockProducingNode.sh: line 11: cardano-node: command not found

I just rebooted my server, and restarted the ./startBlock

ill start a new thread

i found this folder $CNODE_HOME

im ging to delete it:

cd CNODE_HOME xxx@:/opt/cardano/cnode ls
db files guild-db logs priv scripts sockets

think this was from another tutorial, must be conflicting

my .bashrc file had a path to that CNODE_HOME