type cd /etc/systemd/system/
ls -l
type cd /etc/systemd/system/
ls -l
ok now type
sudo chmod 644 cardano-node.service and check again with ls -l
It’s still the same. -rw-r–r–
ok, and now let’s check the script
nano cardano-node.service
not ok, delete everything and paste
nano cardano-node.service
# 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= ${NODE_HOME}
ExecStart = /bin/bash -c '${NODE_HOME}/startBlockProducingNode.sh'
KillSignal=SIGINT
RestartKillSignal=SIGINT
TimeoutStopSec=2
LimitNOFILE=32768
Restart=always
RestartSec=5
SyslogIdentifier=cardano-node
[Install]
WantedBy = multi-user.target
save the file and type again
sudo systemctl restart cardano-node
sudo systemctl status cardano-node
journalctl -e -f -u cardano-node
and you can check also with top if you see the CPU 100% for cardano-node service
should I run this first?
yes, use also
sudo systemctl daemon-reload
sudo systemctl enable cardano-node
hmm you have a lot of changes there…
ok, let’s try to start the node manually
go to cardano-my-node folder and run the script
./startBlockProducingNode.sh
done, ran the script
ok, what is the output?
nothing haha
ok,
nano startBlockProducingNode.sh and edit your paths… as you had but keep the \ after =
for topology db_path socket_path and config
Could I copy this in and delete everything out?
cat > $NODE_HOME/startBlockProducingNode.sh << EOF
#!/bin/bash
DIRECTORY=$NODE_HOME
PORT=6000
HOSTADDR=0.0.0.0
TOPOLOGY=${DIRECTORY}/${NODE_CONFIG}-topology.json
DB_PATH=${DIRECTORY}/db
SOCKET_PATH=${DIRECTORY}/db/socket
CONFIG=${DIRECTORY}/${NODE_CONFIG}-config.json
/usr/local/bin/cardano-node run --topology ${TOPOLOGY} --database-path ${DB_PATH} --socket-path ${SOCKET_PATH} --host-addr ${HOSTADDR} --port ${PORT} --config ${CONFIG}
EOF
yeah you can
the whole or without the cat <<EOF and the EOF at the end?
without the EOF… you are in nano editor
okey, done