I've successfully setup and running cardano node from terminal. Now I've setup cardano node to run as service(systemd, Ubuntu) so that I don't have to run the command all the time and have a terminal always open. From journalctl log all looks good, and I have check tip is reached using explorer.cardano.org. However, I now get error when using cardano-cli and I cannot figure out why...
Details
Cardano-cli error message
Network.Socket.connect: <socket: 11>: permission denied (Permission denied)
ls command
- srwxr-xr-x 1 root root 0 juni 26 23:45 node.socket=
.service file
[Unit] Description=Runs cardano-node mainnet After=network-online.target StartLimitIntervalSec=0
[Service] Type=simple Restart=always RuntimeMaxSec=432000 User=root ExecStart=/home/toby/cardano-scripts/run-cnode-main.sh
[Install] WantedBy=multi-user.target
run-cnode-main.sh
#!/bin/bash #Start cardano-node on mainnet /home/toby/.local/bin/cardano-node run --config /home/toby/cardano-main/mainnet-config.json --database-path /home/toby/cardano-main/db/ --socket-path /home/toby/cardano-main/db/node.socket --host-addr 127.0.0.1 --port 1337 --topology /home/toby/cardano-main/mainnet-topology.json