<p>According to your debug.log file, <code>txindex</code> is not enabled:</p>

<pre><code>2018-04-22 20:40:34 LoadBlockIndexDB: transaction index disabled
</code></pre>

<p>This indicates that your bitcoin.conf is incorrect. Make sure that your bitcoin.conf file's full filename is actually bitcoin.conf (not bitcoin.conf.txt or with some other extension).</p>

CC BY-SA 3.0
2018-04-23T01:17:02.673Z
You're right, it seems as though the paths confused me a little. I specified `~/Library/Application Support/Bitcoin/bitcoin.conf` instead of `~/Library/Application\ Support/Bitcoin/bitcoin.conf` which ended up saving the file as `~/Library/Application`. However I'm still a little confused as to what went down during the almost full day it spent reindexing when I ran `bitcoind -txindex=1` and subsequently `bitcoind -reindex`. I have however created the correct `bitcoin.conf` file now and will reindex and try again.
Aleksander
CC BY-SA 3.0
2018-04-23T01:43:22.193Z
Whenever you start with `-reindex`, the blockchain will be read off disk and all of the block and chainstate databases will be rebuilt. This will happen for all `-reindex`s regardless of `-txindex`. With `-txindex`, the reindex will do the same but include more data in the databases it builds. Specifying `-reindex` will reindex even if one is not required.
Ava Chow
CC BY-SA 3.0
2018-04-23T02:53:05.747Z
Great, thank you so much for that information. It was very helpful!
Aleksander
CC BY-SA 3.0
2018-04-23T00:45:50.790Z
2018-04-23T00:45:50.790Z
Ava Chow
<p>I'm reading through <a href="https://github.com/bitcoinbook/bitcoinbook" rel="nofollow noreferrer">Mastering Bitcoin</a> and trying to follow along the examples. </p>

<p>When I first initialized <code>bitcoind</code>, I set <code>txindex=1</code> in my <code>bitcoin.conf</code> file. In a later example I was unable to <code>getrawtransaction</code> which failed with the error <em>No such mempool transaction</em>. I re-ran <code>bitcoind</code> with the <code>-txindex=1</code> and <code>-reindex</code> flags, which took a few hours. </p>

<p>However I'm still unable to <code>getrawtransaction</code>, which again fails with the same error. </p>

<p>Have anyone experienced the same issues? Perhaps there is something else that needs to be done for this to work in <code>v0.16.0</code>?</p>

<p>Any advice would be appreciated. Thanks.</p>

<p><strong>Edit 1:</strong></p>

<p><code>~/Library/Application Support/Bitcoin/bitcoin.conf</code>:</p>

<pre><code>txindex=1
</code></pre>

<p><code>~/Library/Application Support/Bitcoin/debug.log</code>:</p>

<p><a href="https://www.dropbox.com/s/103owus8psddw6t/debug.log?dl=0" rel="nofollow noreferrer">Dropbox link</a></p>

CC BY-SA 3.0
2018-04-22T19:45:21.243Z
Can you give an example of a txid that fails like this?
Nate Eldredge
CC BY-SA 3.0
2018-04-22T20:40:45.073Z
@NateEldredge any transaction without an unspent output really, just as expected if `txindex` was set to `0`. For an example, the below transactions give me that error:

`3fd3431462b46b4adc8e3da663582993ecbfebf62ef7de4d81115b235a5020de`
`331dd436aebeb22c9b629d6a769fd3f679e18ca4c6c34b15d6b3ab9ce936cd05`
`45ea0a3f6016d2bb90ab92c34a7aac9767671a8a84b9bcce6c019e60197c134b`
Aleksander
CC BY-SA 3.0
2018-04-22T21:47:26.973Z
Is bitcoind fully reindexed? Can you post the contents of your bitcoin.conf and debug.log files?
Ava Chow
CC BY-SA 3.0
2018-04-22T22:39:32.200Z
@AndrewChow added to the original question
Aleksander
<bitcoind><bitcoin-cli><mastering-bitcoin>
Bitcoind with -txindex=1 still no mempool transactions
Aleksander
# Bitcoind with -txindex=1 still no mempool transactions

(Asked by: username_0 on 2018-04-22)

I'm reading through [Mastering Bitcoin](https://github.com/bitcoinbook/bitcoinbook) and trying to follow along the examples.

When I first initialized `bitcoind`, I set `txindex=1` in my `bitcoin.conf` file. In a later example I was unable to `getrawtransaction` which failed with the error *No such mempool transaction*. I re-ran `bitcoind` with the `-txindex=1` and `-reindex` flags, which took a few hours.

However I'm still unable to `getrawtransaction`, which again fails with the same error.

Have anyone experienced the same issues? Perhaps there is something else that needs to be done for this to work in `v0.16.0`?

Any advice would be appreciated. Thanks.

**Edit 1:**

`~/Library/Application Support/Bitcoin/bitcoin.conf`:

```
txindex=1

```

`~/Library/Application Support/Bitcoin/debug.log`:

[Dropbox link](https://www.dropbox.com/s/103owus8psddw6t/debug.log?dl=0)

**Tags:** bitcoind, bitcoin-cli, mastering-bitcoin

> **Comments:**
> **username_1**: Can you give an example of a txid that fails like this?  
> **username_0**: @username_1 any transaction without an unspent output really, just as expected if `txindex` was set to `0`. For an example, the below transactions give me that error:  `3fd3431462b46b4adc8e3da663582993ecbfebf62ef7de4d81115b235a5020de` `331dd436aebeb22c9b629d6a769fd3f679e18ca4c6c34b15d6b3ab9ce936cd05` `45ea0a3f6016d2bb90ab92c34a7aac9767671a8a84b9bcce6c019e60197c134b`  
> **username_2**: Is bitcoind fully reindexed? Can you post the contents of your bitcoin.conf and debug.log files?  
> **username_0**: @AndrewChow added to the original question  

---

## 1 answers

### Answer by username_2 on 2018-04-23. Score: 3 | Accepted answer

According to your debug.log file, `txindex` is not enabled:

```
2018-04-22 20:40:34 LoadBlockIndexDB: transaction index disabled

```

This indicates that your bitcoin.conf is incorrect. Make sure that your bitcoin.conf file's full filename is actually bitcoin.conf (not bitcoin.conf.txt or with some other extension).

> **Comments:**
> **username_0**: You're right, it seems as though the paths confused me a little. I specified `~/Library/Application Support/Bitcoin/bitcoin.conf` instead of `~/Library/Application\ Support/Bitcoin/bitcoin.conf` which ended up saving the file as `~/Library/Application`. However I'm still a little confused as to what went down during the almost full day it spent reindexing when I ran `bitcoind -txindex=1` and subsequently `bitcoind -reindex`. I have however created the correct `bitcoin.conf` file now and will reindex and try again.  
> **username_2**: Whenever you start with `-reindex`, the blockchain will be read off disk and all of the block and chainstate databases will be rebuilt. This will happen for all `-reindex`s regardless of `-txindex`. With `-txindex`, the reindex will do the same but include more data in the databases it builds. Specifying `-reindex` will reindex even if one is not required.  
> **username_0**: Great, thank you so much for that information. It was very helpful!  

---

