<p>Can you right now put txindex=1 in your bitcoin.conf on both, and restart your node? That will cause a failure if the database was not created with txindex. If it continues, and there are still transactions that can't be found by getrawtransaction, file a bug report on <a href="https://github.com/bitcoin/bitcoin/issues" rel="nofollow">https://github.com/bitcoin/bitcoin/issues</a>.</p>

CC BY-SA 3.0
2016-07-08T19:35:07.703Z
2016-07-08T19:35:07.703Z
Pieter Wuille
<p>I've have a fully tx index node in v.11 and I can do the following below just fine, </p>

<p><code>bitcoin-cli getrawtransaction c6556ca7e143d108f5ef594057ff83a78bceb4b5fdc565ae160b4783cddad00f</code></p>

<p>but with a fully tx index node in v.12, I cannot and I get an error </p>

<pre><code>error code: -5
error message:
No information available about transaction
</code></pre>

<p>So what has change in v.12 that broke this and what can do to get this functionality back. I already have <code>txindex=1</code> in my conf file and I already tried <code>bitcoind -daemon -reindex</code></p>

CC BY-SA 3.0
2016-07-07T14:08:32.520Z
Are you sure you're fully synced with the 0.12 node?
Pieter Wuille
CC BY-SA 3.0
2016-07-08T08:08:02.030Z
Ah, I know the issue. I was not upgrading from .11 to .12, but was running on a fresh install. So it seems like doing "bitcoind -daemon -reindex" without ever having started the daemon before wont do the tx indexing. I must first download the blockchain then do restart bitcoind  with "bitcoind -daemon -reindex". That was a bit confusing. It would be cool if bitcoin core can do tx indexing on the first run. Or at least throw an error when running bitcoin core for the first time with the command "bitcoind -daemon -reindex"
user299648
CC BY-SA 3.0
2016-07-08T09:44:33.163Z
It can do txindex on the first run. You need to pass -txindex or txindex=1 in bitcoin.conf at first run to do so.
Pieter Wuille
CC BY-SA 3.0
2016-07-08T18:41:33.083Z
Hmm. That was exactly what I did though. I did both of those things.
user299648
CC BY-SA 3.0
2016-07-08T18:54:45.570Z
On a side note. When I do have a fully tx index chain, it means that I can get any tx if I give it the txid right? Because I'm having some issues with that. I have 2 nodes (one v.11 and one v.12) at head (block 419860) and I can get the raw coinbase transaction in block 419859 with (bitcoin-cli getrawtransaction f59d720254b3059db5b397b25312d5e8edb7d7112464f87bf366a593a0b97dc2), but I cannot get the any other tx in the block. For example the 2nd tx in block 419859 with "bitcoin-cli getrawtransaction 437be0c5b1f18c8e87a7b11c91269cf71467165d6a9023b039f909785039e9972016".
user299648
CC BY-SA 4.0
2018-05-03T11:21:02.423Z
the reindexing takes some time, I was able to follow the progress by `tail -f ~/.bitcoin/debug.log`
Jiri Kremser
<bitcoind><bitcoin-core>
How to get transaction with Bitcoin Core?
user299648
# How to get transaction with Bitcoin Core?

(Asked by: username_0 on 2016-07-06)

I've have a fully tx index node in v.11 and I can do the following below just fine,

`bitcoin-cli getrawtransaction c6556ca7e143d108f5ef594057ff83a78bceb4b5fdc565ae160b4783cddad00f`

but with a fully tx index node in v.12, I cannot and I get an error

```
error code: -5
error message:
No information available about transaction

```

So what has change in v.12 that broke this and what can do to get this functionality back. I already have `txindex=1` in my conf file and I already tried `bitcoind -daemon -reindex`

**Tags:** bitcoind, bitcoin-core

> **Comments:**
> **username_1**: Are you sure you're fully synced with the 0.12 node?  
> **username_0**: Ah, I know the issue. I was not upgrading from .11 to .12, but was running on a fresh install. So it seems like doing "bitcoind -daemon -reindex" without ever having started the daemon before wont do the tx indexing. I must first download the blockchain then do restart bitcoind  with "bitcoind -daemon -reindex". That was a bit confusing. It would be cool if bitcoin core can do tx indexing on the first run. Or at least throw an error when running bitcoin core for the first time with the command "bitcoind -daemon -reindex"  
> **username_1**: It can do txindex on the first run. You need to pass -txindex or txindex=1 in bitcoin.conf at first run to do so.  
> **username_0**: Hmm. That was exactly what I did though. I did both of those things.  
> **username_0**: On a side note. When I do have a fully tx index chain, it means that I can get any tx if I give it the txid right? Because I'm having some issues with that. I have 2 nodes (one v.11 and one v.12) at head (block 419860) and I can get the raw coinbase transaction in block 419859 with (bitcoin-cli getrawtransaction f59d720254b3059db5b397b25312d5e8edb7d7112464f87bf366a593a0b97dc2), but I cannot get the any other tx in the block. For example the 2nd tx in block 419859 with "bitcoin-cli getrawtransaction 437be0c5b1f18c8e87a7b11c91269cf71467165d6a9023b039f909785039e9972016".  
> **username_2**: the reindexing takes some time, I was able to follow the progress by `tail -f ~/.bitcoin/debug.log`  

---

## 1 answers

### Answer by username_1 on 2016-07-08. Score: 1 | Accepted answer

Can you right now put txindex=1 in your bitcoin.conf on both, and restart your node? That will cause a failure if the database was not created with txindex. If it continues, and there are still transactions that can't be found by getrawtransaction, file a bug report on <https://github.com/bitcoin/bitcoin/issues>.


---

