bitcoind uses wrong interface to send commands #2028

issue roquette opened this issue on November 19, 2012
  1. roquette commented at 7:29 PM on November 19, 2012: none

    The problem: fresh install start the daemon like ./bitcoind -rpcuser=foo -rpcpassword=bar using other terminal, try to send command: ./bitcoind -rpcuser=foo -rpcpassword=bar help I get the following message: error: server returned HTTP error 403

    Versions: bitcoin-0.7.1-linux $ uname -a Linux server 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux

    What is going on: the daemon is using the loopback to receive connections, my machine has the loopback (127.0.0.0) and two other interfaces eth0 and eth1, when I use the bitcoind to send commands, the process gets the IP from the eth0 and not from the loopback!

    What I did to get it working: after some debuging I realised what was the problem, so I started the daemon like ./bitcoind -rpcuser=foo -rpcpassword=bar -rpcallowip=10.0.0.1 that IP is from my eth0, now when I send the commands the daemon answer correctly.

    If you need more info, let me know.

    Thank you very much, this bitcoin thing is a great idea!

  2. laanwj commented at 3:27 PM on November 11, 2013: member

    The parameter that determines where the RPC client should connect to, -rpcconnect, has hardcoded default to 127.0.0.1:(rpcport) (see https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.cpp#L1122), so I don't understand how it could have been using a different interface on your system. Maybe you have some different rpcconnect setting around in bitcoin.conf?

    In any case you can provide the IP to connect to using that parameter, no need to change the rpcallowip.

  3. laanwj closed this on Nov 11, 2013

  4. MarcoFalke deleted a comment on Mar 29, 2018
  5. KolbyML referenced this in commit 007359a632 on Dec 5, 2020
  6. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me