Bitcoind

cpuminer: 執行兩個節點 - The requested URL returned error: 500 Internal Server Error, json_rpc_call failed, 30秒後重試

  • August 20, 2020

我正在嘗試使用 cpuminer 探勘新塊。我的區塊鍊網路在具有兩個節點的 testnet 網路上的 localhost 上執行。當我嘗試探勘塊時,我收到以下錯誤:

* TCP_NODELAY set
[2020-08-19 10:46:01] Binding thread 6 to cpu 6
[2020-08-19 10:46:01] Binding thread 4 to cpu 4
* Connected to 127.0.0.1 (127.0.0.1) port 18001 (#0)
* Server auth using Basic with user 'liork'
[2020-08-19 10:46:01] Binding thread 2 to cpu 2
> POST / HTTP/1.1
Host: 127.0.0.1:18001
Authorization: Basic bGlvcms6aXJvY2s=
Accept-Encoding: deflate, gzip, br
Content-Type: application/json
User-Agent: cpuminer/2.5.1
X-Mining-Extensions: midstate
Content-Length: 147

* upload completely sent off: 147 out of 147 bytes
[2020-08-19 10:46:01] Binding thread 0 to cpu 0
* Mark bundle as not supporting multiuse
* The requested URL returned error: 500 Internal Server Error
* Closing connection 0
[2020-08-19 10:46:01] HTTP request failed: The requested URL returned error: 500 Internal Server Error
[2020-08-19 10:46:01] json_rpc_call failed, retry after 30 seconds

我的節點配置:

節點1:

...
# Options only for testnet
[test]
connect=127.0.0.1:17002
rpcport=18001
listen=1
port=17001
rpcuser=myuser
rpcpassword=mypassword
...

節點2:

...
# Options only for testnet
[test]
connect=127.0.0.1:17001
rpcport=18002
listen=1
port=17002
rpcuser=myuser
rpcpassword=mypassword
...

我正在使用以下命令執行 cpuminer:./minerd --url=http://127.0.0.1:18001 --user=myuser --pass=mypassword --coinbase-addr=my_address --protocol-dump

因為幾天沒有生成新塊,所以我收到了這個錯誤。

為了解決這個問題,我使用比特幣 cli 生成了一個新塊:

./bitcoin-cli --datadir=<dir_to_wallet> generatetoaddress 1 <wallet_address>

引用自:https://bitcoin.stackexchange.com/questions/98609