getrawtransaction fails/behaves differently on command line and rpc #3298

issue arnuschky opened this issue on November 21, 2013
  1. arnuschky commented at 5:55 PM on November 21, 2013: contributor

    Hey,

    what I am trying to do it pretty simple: poll for new, unconfirmed transactions and stick them into a database. My problem is that sometimes, I can't get the raw transaction using the getrawtransaction RPC call. This is the error:

    {u'message': u'No information available about transaction', u'code': -5}
    

    I am running bitcoind 0.8.5 with txindex=1 set, and I used reindex for rebulding the db long time ago. I also verified this on two different machines, one mainnet, one testnet.

    This happens a few times a day. When it does, it fails continuously for a few minutes for one specific transaction. Some of these transactions have been created by myself, so no chance that they are orphaned. (or is a transaction that uses the input of an orphaned transaction orphaned itself?)

    Even if they are orphaned, I do not understand why (sometimes) I cannot retrieve the transaction using the RPC call, while I can get the raw transaction from the command line. Shouldn't use this the same internal calls?

  2. laanwj commented at 2:37 PM on November 25, 2013: member
    I cannot retrieve the transaction using the RPC call, while I can get the raw transaction from the command line
    

    With command line you mean bitcoind / bitcoin-cli? Yes, that uses the RPC interface, and should give exactly the same result for the same command.

  3. arnuschky commented at 2:43 PM on November 25, 2013: contributor

    I meant the bitcoind command line. Should not give different results, but it does for me. Hence this report. :)

  4. laanwj commented at 4:37 PM on November 25, 2013: member

    The only possible explanation for that would be that you're not sending exactly the same RPC command as the command-line client is. Or maybe some problem with your JSON RPC implementation.

    Either that or some randomness/race condition is involved in the server, but that wouldn't result in a consistent behavior difference.

  5. laanwj added the label RPC on Jul 31, 2014
  6. laanwj commented at 8:00 AM on September 28, 2016: member

    There is not enough information to troubleshoot this, also the report relates to an ancient version, so closing.

  7. laanwj closed this on Sep 28, 2016

  8. Bushstar referenced this in commit 1dd2b11000 on Apr 8, 2020
  9. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me