I have set up monerod
to run as a service so it is easier to manage.
Service file:
[Unit]
Description=Monero Full Node
After=network.target
[Service]
User=monero
Group=monero
WorkingDirectory=/mnt/ext/monero/monerod/
RuntimeDirectory=monero/
Type=forking
PIDFile=/run/monero/monerod.pid
ExecStart=/mnt/ext/monero/monerod/monerod --config-file /etc/monerod.conf \
--detach --pidfile /run/monero/monerod.pid
Restart=always
[Install]
WantedBy=multi-user.target
Config file:
data-dir=/mnt/ext/monero/
log-file=/var/log/monero/monerod.log
log-level=0
no-igd=true
rpc-bind-ip=0.0.0.0
rpc-bind-port=18089
rpc-bind-ipv6-address=IPv6AddrHere
rpc-use-ipv6=true
restricted-rpc=true
confirm-external-bind=true
public-node=true
The service runs as expected, however I am unable to run commands against the daemon.
Example:
Running
./monerod status --rpc-bind-port 18089
Returns
Error: Problem fetching info-- rpc_request:
Height: 2039302/2039302 (100.0%) on mainnet, mining info unavailable, net hash 1.49 GH/s, v12, up to date, 0(out)+0(in) connections
I can't tell whether monerod
is actually not connecting to other peers, or if the info can't be fetched.
Did I set up the service incorrectly?
How can I go about running commands against monerod
when it is running as a service, and get a response similar to when it is running interactively?