我有我的Bitcoind服务器在Ubuntu 14.04
上运行。块计数已更新且运行良好。我的问题是当我使用这个Bitcoin RPC
命令访问curl
时
curl --user user_bitcoin:pass_bitcoin --data-binary
'{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo",
"params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
什么也没有回报。当我检查debug.log时,它说:
ThreadRPCServer incorrect password attempt from 127.0.0.1
我的bitcoin.conf设置是这样的
server=1
daemon=1
rpcuser=<username>
rpcpassword=<password>
我通过启动bitcoind
解决了这个问题,如下所示:
$bitcoind -rpcuser=USERNAME -rpcpassword=PASSWORD
当我开始时,我之前收到错误:
$bitcoind
我弄清楚..问题是bitcoin.conf
文件位于根本位置,而bitcoind
文件位于ubuntu
处。所以我们需要做的就是使用chown
来改变所有者。
这就是我执行命令的方式
sudo chown ubuntu:ubuntu [file..]
我希望这有帮助。