1

After long time of not running Bitcoin Core I ran it and got:

enter image description here

Config file was:

 # server=1 tells Bitcoin-QT to accept JSON-RPC commands.
server=1

 # You must set rpcuser and rpcpassword to secure the JSON-RPC api
rpcuser=user
rpcpassword=password

According to recommendations from other post, I have added this to config file

# added
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
rpcbind=bitcoind

but it didn't help.

Log file is following

2022-10-28T21:02:52Z Binding RPC on address 127.0.0.1 port 8332 failed.
2022-10-28T21:02:54Z libevent: getaddrinfo: nodename nor servname provided, or not known
2022-10-28T21:02:54Z Binding RPC on address bitcoind port 8332 failed.
2022-10-28T21:02:54Z Unable to bind any endpoint for RPC server
2022-10-28T21:02:54Z Error: Unable to start HTTP server. See debug log for details.
2022-10-28T21:02:58Z Shutdown: In progress...
2022-10-28T21:02:58Z scheduler thread exit
2022-10-28T21:02:58Z Shutdown: done

What else can be done?

1 Answer 1

0
rpcbind=bitcoind

In the question you referred to, "bitcoind" is supposed to be the network-name of the computer on which bitcoin is running.

# local DNS name (container name used in my Docker Compose file)
rpcbind=bitcoind

Open a command prompt window and type the command hostname to find out the network name of your computer. If the hostname shown is squonk, double check it by using the command nslookup squonk or equivalent (e.g. dig squonk or host squonk on Linux)

The clue in your log file is this pair of lines

libevent: getaddrinfo: nodename nor servname provided, or not known
Binding RPC on address bitcoind port 8332 failed.

If you run bitcoind with the -help option it tells you

  -rpcbind=<addr>[:port]
       Bind to given address to listen for JSON-RPC connections. Do not expose
       the RPC server to untrusted networks such as the public internet!
       This option is ignored unless -rpcallowip is also passed. Port is
       optional and overrides -rpcport. Use [host]:port notation for
       IPv6. This option can be specified multiple times (default:
       127.0.0.1 and ::1 i.e., localhost)

You could then change the line in the configurartion file

rpcbind=squonk

Your extract from the log file omits the line before

Binding RPC on address 127.0.0.1 port 8332 failed.

But those few lines before the above may tell you about a more important problem that is the root cause of your difficulties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.