dqzlqfqeh845799833
dqzlqfqeh845799833
2013-11-22 21:29

与比特币RPC连接的问题

I was setting up a faucet to give away some btc at nobanchan.com/faucet

The problem I am having is Fatal error: Uncaught BitcoinClientException: [0]: Connect error: Connection refused (111) thrown in on line 0

I have the RPC username/password/port in bitcoin.conf exactly the same as I do on config.php for the faucet.

I have forwarded the port from my WAN to my private IP in my router.

I have reopened bitcoin a few times. Also, I have set rpcallowip= my local IP, and my websites IP.

What else should I check?!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • drgd73844 drgd73844 8年前

    I have the same problem with two servers trying to let them communicate.

    It seems like you have to set up "JSON-RPC Over SSL" as described here if you don't run client and server on the same machine (e.g. if you do not use "localhost"):

    https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon

    点赞 评论 复制链接分享
  • duangewu5234 duangewu5234 6年前

    I agree with @lagopixel here, I don't think this is a network error.

    First, if you want to use RPC commands with the bitcoin core you should add the "server" option (-server on command line or server=1 in bitcoin.conf).

    Then, I'm pretty sure this has nothing to do with SSL conections but here are the options related to SSL for the bitcoin core (just in case):

    • rpcssl: Use OpenSSL (https) for JSON-RPC connections
    • rpcsslcertificatechainfile=file.cert: Server certificate file (default: server.cert)
    • rpcsslprivatekeyfile=file.pem: Server private key (default:server.pem)
    • rpcsslciphers=ciphers: Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)

    Moreover, note that using JSON-RPC over SSL is strongly discouraged.

    点赞 评论 复制链接分享

为你推荐