0

Previously discussed here: LoadBlockIndexDB: transaction index disabled but thread was abandoned. Started a new thread here.

Twice I have gotten the same error:

2018-11-20 15:43:41 LoadBlockIndexDB: transaction index disabled 2018-11-20 15:43:41 : You need to rebuild the database using -reindex to change -txindex. Please restart with -reindex or -reindex-chainstate to recover. 2018-11-20 15:43:41 Aborted block database rebuild. Exiting.

Here is my procedure that results in the error:

  • Shutdown bitcoind on server #1
  • ran rsync -Lru --info=progress2 /path/to/blockchain /path/to/external/usb (note: /path/to/external/usb is a BLANK directory on the external drive)
  • unmounted external USB
  • plug into Raspberry Pi, boot
  • Made sure blockchain was visible in /home/USER/.bitcoin
  • Ran bitcoind at the terminal.

Notes:

  • txindex is turned on in bitcoin.conf on server #1
  • txindex is also on in bitcoin.conf in /home/user/.bitcoin. on the raspberry pi I can verify bitcoind on the raspberry pi is loading that exact .conf, see the log below.
  • commenting out #txindex in the bitcoin.conf file and simply running bitcoind with no flags results in a successful startup.

Here's the output of my log file when it failed:

    2018-11-20 15:43:13 Bitcoin Core version v0.16.3 (release build)
    2018-11-20 15:43:13 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
    2018-11-20 15:43:13 Assuming ancestors of block 0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0 have valid signatures.
    2018-11-20 15:43:13 Setting nMinimumChainWork=000000000000000000000000000000000000000000f91c579d57cad4bc5278cc
    2018-11-20 15:43:13 Using the 'standard' SHA256 implementation
    2018-11-20 15:43:14 Default data directory /home/satoshi/.bitcoin
    2018-11-20 15:43:14 Using data directory /home/satoshi/.bitcoin
    2018-11-20 15:43:14 Using config file /home/satoshi/.bitcoin/bitcoin.conf
    2018-11-20 15:43:14 Using at most 64 automatic connections (1024 file descriptors available)
    2018-11-20 15:43:14 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    2018-11-20 15:43:14 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    2018-11-20 15:43:14 Using 4 threads for script verification
    2018-11-20 15:43:14 scheduler thread start
    2018-11-20 15:43:14 HTTP: creating work queue of depth 16
    2018-11-20 15:43:14 No rpcpassword set - using random cookie authentication
    2018-11-20 15:43:14 Generated RPC authentication cookie /home/satoshi/.bitcoin/.cookie
    2018-11-20 15:43:14 HTTP: starting 4 worker threads
    2018-11-20 15:43:14 Cache configuration:
    2018-11-20 15:43:14 * Using 50.0MiB for block index database
    2018-11-20 15:43:14 * Using 8.0MiB for chain state database
    2018-11-20 15:43:14 * Using 342.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
    2018-11-20 15:43:14 init message: Loading block index...
    2018-11-20 15:43:14 Opening LevelDB in /home/satoshi/.bitcoin/blocks/index
    2018-11-20 15:43:15 Opened LevelDB successfully
    2018-11-20 15:43:15 Using obfuscation key for /home/satoshi/.bitcoin/blocks/index: 0000000000000000
    2018-11-20 15:43:40 LoadBlockIndexDB: last block file = 1437
    2018-11-20 15:43:40 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=57, size=71779403, heights=550735...550791, time=2018-11-19...2018-11-20)
    2018-11-20 15:43:40 Checking all blk files are present...
    2018-11-20 15:43:41 LoadBlockIndexDB: transaction index disabled
    2018-11-20 15:43:41 : You need to rebuild the database using -reindex to change -txindex. Please restart with -reindex or -reindex-chainstate to recover.
    2018-11-20 15:43:41 Aborted block database rebuild. Exiting.
    2018-11-20 15:43:41 Shutdown: In progress...
    2018-11-20 15:43:41 scheduler thread interrupt
    2018-11-20 15:43:41 Shutdown: done

I COULD just run bitcoind -reindex but that doesn't solve the problem of 'what is causing the txindex database to not work between machines.' I feel like this is an important question to answer.

3
  • 1
    Are you using the same version of Bitcoin Core on both machines? Which files and directories are you copying over (give filenames, not just "blockchain")
    – Ava Chow
    Commented Nov 20, 2018 at 16:47
  • Server #1 BCC version: 0.17.0.1 Raspberry Pi BCC version: 0.16.3 I'm copying the entire bitcoin directory including: banlist.dat, bitcoin.conf, blocks, chainstate, database, debug.log, fee_estimates.dat, indexes, mempool.dat, and peers.dat I bet the version difference is the problem. I'll upgrade BCC on the RPi
    – Mike
    Commented Nov 20, 2018 at 18:35
  • Yes, in 0.17 the format of the txindex changed, so 0.16 will see it as a database without txindex. Commented Nov 20, 2018 at 18:48

1 Answer 1

2

Bitcoin Core 0.17.0 changed how the txindex is handled. The txindex is no longer stored where it used to be, so using a data directory from 0.17.0+ with an older version of Bitcoin Core will result in the older version not recognizing the txindex. You will need to upgrade your raspberry pi to use Bitcoin Core 0.17+.

1
  • I can confirm this fixed the problem
    – Mike
    Commented Nov 20, 2018 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.