Bitcoin-ABC / bitcoin-abc

Bitcoin ABC develops node software and infrastructure for the eCash project. This a mirror of the official Bitcoin-ABC repository. Please see README.md

Home Page:https://reviews.bitcoinabc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When calling rpc-api on Windows version 0.22.6, a "Node context not found" error occurs.

leeheejoo opened this issue · comments

When calling rpc-api on Windows version 0.22.6, a "Node context not found" error occurs.
Occurs on EnsureNodeContext in the rcp function.
For example, it happens in getconnectioncount, sendrawtransaction, etc.
However, the error does not occur on the Linux version.

Thanks for the report.
I can't reproduce the issue, can you please give more details ?:

  • Where did you get the software version from (website, build, ...) ?
  • Can you paste the output of bitcoind.exe -version ?
  • What is your Windows version ?
  • How are the RPC calls done, using bitcoin-cli.exe ? Can you provide a full command line ?
  • Can you paste the output of bitcoin-cli.exe getrpcinfo ?
  • Where did you get the software version from (website, build, ...) ?
    => https://download.bitcoinabc.org/0.22.6/win/bitcoin-abc-0.22.6-win64-setup-unsigned.exe

  • Can you paste the output of bitcoind.exe -version ?
    => v0.22.6-fb3ee2224 (ABC network)

  • What is your Windows version ?
    => Windows Server 2012 R2 Standard on aws

  • How are the RPC calls done, using bitcoin-cli.exe ? Can you provide a full command line ?
    => only occurs error on rpc call. however, the error does not occur on cli in gui console

  • Can you paste the output of bitcoin-cli.exe getrpcinfo ?
    => $ curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getnetworkinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/
    => {"result":null,"error":{"code":-32603,"message":"Node context not found"},"id":"curltext"}

    => curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getrpcinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/
    => {"result":{"active_commands":[{"method":"getrpcinfo","duration":0}],"logpath":"C:\Users\Administrator\AppData\Roaming\Bitcoin\debug.log"},"error":null,"id":"curltext"}

Thanks for all the data, this is very helpful.

I think I managed to reproduce, but I want to make sure I am running under the same condition as you. Are you running bitcoind.exe or bitcoin-qt.exe as a server ? Can you paste your bitcoin.conf file ?

  1. I ran it with bitcoin-qt.
    => bitcoin-qt.exe -rpcbind=0.0.0.0:8332 -rpcport=8332

  2. bitcoin.conf

config

Thanks. The issue only occurs with bitcoin-qt, so if running bitcoind is possible for you this might provide a workaround until this bug is fixed.

I am having this same issue but on Linux with Bitcoin ABC version v0.22.6-fb3ee2224 (ABC network).

If I type getconnectioncount in bitcoin-qt's debug window's console tab it works. But if I run bitcoin-cli getconnectioncount I see:

error code: -32603
error message:
Node context not found

If I run bitcoind instead of bitcoin-qt then it's fine and the RPCs work as expected.

I am able to reproduce the problem deleting and recreating ~/.bitcoin/, and putting a single line bitcoin.conf in it saying just server=1. Then running bitcoin-cli getconnectioncount complains Node context not found as above.

Thanks for the additional info. As you figured out this is a bug with bitcoin-qt and not Windows related. We are working on a fix.

A fix has been committed to current master, and will be part of the next release.

good. thank you~

Closing since the fix has been released (0.22.9)