繁体   English   中英

比特币 RPC 连接不断失败

[英]Bitcoin RPC connection keeps failing

我试图让我的比特币核心的 RPC 连接正常工作,但无论我尝试什么,它总是失败。

我正在运行 Win 10 并运行比特币核心 qt V0.21。 我尝试了几个选项来使 RPC 连接正常工作。 我尝试了几个 docker 容器,例如 btc-rpc-explorer,但这些容器继续失败并出现 ECONNREFUSED 错误。 Worried about some IP problem with docker, I also tried running different python scripts (like this on: https://pypi.org/project/bitcoinrpc/ ) but that also gives an exception indicating that no rpc connection is possible.

那么,它一定是我的比特核节点,对吧? 所以我尝试了许多不同的 bitcoin.conf 配置,但没有运气。 我的最新:

server=1
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
rpcbind=0.0.0.0
rpcport=8332
rpcuser=myuser
rpcpass=mypass
txindex=1

只是想尽可能地打开它。

我还尝试在命令行上运行 bitcoind 而不是 bitcoin-qt gui。 命令行 output 告诉我它需要正确的 bitcoin.conf 文件。 所以没关系。 但是怎么了???

server=1
rpcallowip=127.0.0.1
rpcport=8332
rpcuser=myuser
rpcpass=mypass
txindex=1

如果你在 localhost 中进行 rpc 调用,这个 conf 文件就足够了。 仅当您需要从外部 ip 查询时,我才会绑定到 0.0.0.0。 rpcallowip=0.0.0.0/0 也是不安全的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM