I have compiled and installed Bitcoin Core for the first time on Debian 11. Everything is up and running except that RPC port 8332 is not accessible after a reboot.
I get the following error running bitcoin-cli getblockcount
:
error: timeout on transient error: Could not connect to the server 127.0.0.1:8332
If I then run systemctl restart bitcoind
then everything works fine.
What could be wrong?
systemctl status bitcoind
shows that it is up and running just fine after a reboot.
Look at this after the reboot:
$ netstat -nap | grep bitcoin | grep LISTEN
tcp 0 0 0.0.0.0:8333 0.0.0.0:* LISTEN 456/bitcoind
tcp 0 0 127.0.0.1:8334 0.0.0.0:* LISTEN 456/bitcoind
tcp6 0 0 ::1:8332 :::* LISTEN 456/bitcoind
tcp6 0 0 :::8333 :::* LISTEN 456/bitcoind
And then after systemctl restart bitcoind
:
tcp 0 0 127.0.0.1:8332 0.0.0.0:* LISTEN 532/bitcoind
tcp 0 0 0.0.0.0:8333 0.0.0.0:* LISTEN 532/bitcoind
tcp 0 0 127.0.0.1:8334 0.0.0.0:* LISTEN 532/bitcoind
tcp6 0 0 ::1:8332 :::* LISTEN 532/bitcoind
tcp6 0 0 :::8333 :::* LISTEN 532/bitcoind
For some reason the 8332 port is not opened on reboot.