Author

Topic: Getting "Error opening block database" when opening Bitcoin Core. Please help! (Read 252 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
If you truly want to kill the Bitcoin Core client (and you're not on Windows), then you can send a SIGTERM signal from the terminal (killall bitcoind) to perform the equivalent of a clean shutdown process.

Windows has no such signal for that.

CMIIW, but isn't "End Task" on Windows Task Manager is similar with SIGTERM signal (while "Kill Process" is similar with SIGKILL)?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
What should I do if Bitcoin Core isn't responding? Usually when a program doesn't respond I just force-close... Maybe that was the cause of the problem.
Leave it. It should come back to life when it finishes whatever it is doing. Bitcoin Core can look non-responsive for periods of time when it is validating blocks. What are the specs (CPU/Ram etc) of the machine you're running Bitcoin Core on?

If you truly want to kill the Bitcoin Core client (and you're not on Windows), then you can send a SIGTERM signal from the terminal (killall bitcoind) to perform the equivalent of a clean shutdown process.

Windows has no such signal for that.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
Is there any danger in uploading the debug log to this forum as I did? Could the information in the debug log help malicious users gain access to my computer or my network?

Short answer: No.

Longer answer,
Aside from what @nc50lc said, debug.log contain basic system information and Bitcoin Core configuration. Merely knowing what OS do you use and value of your configuration isn't enough to comprise your system.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Recently I have noticed unfamiliar devices in the network section of the file explorer on my computer. Is there any danger in uploading the debug log to this forum as I did? Could the information in the debug log help malicious users gain access to my computer or my network? The unfamiliar devices was something recognized as a phone, another recognized as a display, and also one without name in the "Other devices"-category.
Those are smart devices that "tried" to connect to your Local Network (WiFi) such as SmartTV, SmartPhones, etc.
Event though they failed because of wrong password attempt, those will still temporarily show up in your Windows File Explorer's Network.

If those are persistent, then there's most likely rogue devices connected to your Local Area Network, and check your router's settings.
I'd recommend disabling WPS if you're not using it.

For the logs, there's no sensitive info included there (aside from your windows account name if it's your real name).
Users who need support share it most of the time without issues;
in fact, it's recommended to include it to your post for faster support: [Pinned topic] [READ BEFORE POSTING] Tech Support Help Request Format
newbie
Activity: 5
Merit: 1
Thanks to everyone for your replies.

Recently I have noticed unfamiliar devices in the network section of the file explorer on my computer. Is there any danger in uploading the debug log to this forum as I did? Could the information in the debug log help malicious users gain access to my computer or my network? The unfamiliar devices was something recognized as a phone, another recognized as a display, and also one without name in the "Other devices"-category.

Could these devices be some malicious person gaining access to my computer and network?
hero member
Activity: 1162
Merit: 643
BTC, a coin of today and tomorrow.

What should I do if Bitcoin Core isn't responding? Usually when a program doesn't respond I just force-close... Maybe that was the cause of the problem.
you need to see what to do to stop the bitcoin core not responding error. Not what to do when the error happen. Check the ram nc50lc said about. Also try to run hard drive test to see the speed if is upto.
Quote
Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?
more appropriate and not larger size.
HCP
legendary
Activity: 2086
Merit: 4363
I've also read somewhere that it may be OK to remove only that one failing file, but more experienced people should confirm this. It could be quicker than full reindex.
That can be a bit hit and miss... sometimes it will recover "gracefully" and simply continue from the "missing" file, other times it will just freak out and start downloading and syncing from the genesis block again. I've never quite been able to figure out exactly why, and haven't tried it recently so it may not currently be an issue... but I've certainly had it do both in the past. Undecided

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
-snip-
I've also read somewhere that it may be OK to remove only that one failing file, but more experienced people should confirm this. It could be quicker than full reindex.
The good thing is, it's only the "UTXO Set" that's corrupted so the possible solution is the faster -reindex-chainstate.

If he'll delete the said file, Bitcoin Core will return with an error and will prompt him to -reindex instead.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
2021-11-29T14:21:50Z Fatal LevelDB error: Corruption: block checksum mismatch: C:\Users\(name)\AppData\Roaming\Bitcoin\chainstate/1227881.ldb
2021-11-29T14:21:50Z : Error opening block database.

I've got this same error not long ago and it was caused by hardware - in my case it was the USB cable to the external HDD. I've changed to the initial, shorter but better cable and now I'm OK.
(I've read that it can be caused also by failing HDD.)

I've also read somewhere that it may be OK to remove only that one failing file, but more experienced people should confirm this. It could be quicker than full reindex.


About later posts:
* Force close can easily be the cause for the problem.
* For newbies I'd suggest Electrum (from Electrum.org and verified). Maybe together with a hardware wallet if there are big funds there.
legendary
Activity: 2730
Merit: 7065
Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?
Bitcoin Core is a full-node client which means that it requires you to download, store, and sync the entire 400GB of blockchain data (currently). This amount will grow bigger in the future. If you don't want to use a full-node and be part of a decentralized nodes network, you can always export your private keys from Bitcoin Core and import them into an SPV client like Electrum. Or let your Core client sync first, create a new wallet on Electrum (after verifying its signatures), and transfer all your bitcoin from Core to the newly created wallet.   
HCP
legendary
Activity: 2086
Merit: 4363
What should I do if Bitcoin Core isn't responding? Usually when a program doesn't respond I just force-close... Maybe that was the cause of the problem.
Leave it. It should come back to life when it finishes whatever it is doing. Bitcoin Core can look non-responsive for periods of time when it is validating blocks. What are the specs (CPU/Ram etc) of the machine you're running Bitcoin Core on?


Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?
What are you wanting to do with your wallet? Just send and receive coins? or are you looking at leveraging a full node for running services like a block explorer etc? Huh
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
-snip-
Note: To prevent that from happening, make sure to properly close Bitcoin Core everytime you need to close it.
Do not force-close it or shutdown the PC while it's running.
What should I do if Bitcoin Core isn't responding? Usually when a program doesn't respond I just force-close... Maybe that was the cause of the problem.
That's problematic and indeed the cause of the corruption as seen in the logs.
My best guess is your Disk is having a hard time keeping up with the I/O, next is your RAM may be full.

When that happens, freeing-up some other processes may unfreeze Bitcoin Core since it should still be running in the background.

I think what you need to do is to find the cause why it's freezing in the first place.
Try to use as little "page file" as possible since Bitcoin Core itself will use lots of HDD processes.
To do that, you'll need to free some RAM space by reducing your background processes or add more RAM.
You can also read this: github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md

Lastly, the wallet suggested above is a good alternative if you want to use other clients.
legendary
Activity: 2380
Merit: 5213
Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?
It depends on what you want from a wallet.
If you want to run your full node for any reason (like helping the network, having more privacy, etc.), you should use bitcoin core and download the whole blockchain.
(For more information regarding advantages of running a full node, I recommend you to visit bitcoin wiki).

If you don't want to run your full node, you can use SPV wallets like electrum.
In SPV wallets, you don't have to download the blockchain.

Note that electrum or any other SPV wallet can't provide as much privacy and security as bitcoin core do.
newbie
Activity: 5
Merit: 1
2021-11-29T14:21:50Z [0%]...[74%]...Fatal LevelDB error: Corruption: block checksum mismatch: C:\Users\(name)\AppData\Roaming\Bitcoin\chainstate/1227881.ldb
2021-11-29T14:21:50Z You can use -debug=leveldb to get more complete diagnostic messages
2021-11-29T14:21:50Z Fatal LevelDB error: Corruption: block checksum mismatch: C:\Users\(name)\AppData\Roaming\Bitcoin\chainstate/1227881.ldb
2021-11-29T14:21:50Z : Error opening block database.
Please restart with -reindex or -reindex-chainstate to recover.
-snip-
This is quite a relatively manageable error since you wont be needing to redownload the whole blockchain unless your node is pruned.
The 'fix' is to launch Bitcoin Core with -reindex-chainstate, then wait for it to finish (may take hours).

To start Bitcoin Core with that parameter:
  • Go to the directory where Bitcoin Core is installed, usually C:/Program Files/Bitcoin
  • 'Shift+RightClick' on an empty space in that folder (make sure nothing is highlighted), and select "Open PowerShell Window Here" or "Open CMD....".
  • 'PowerShell' will open, type: ./bitcoin-qt -reindex-chainstate (remove "./" if you use CMD)
  • Bitcoin Core will open and start the reindex process.

Note: To prevent that from happening, make sure to properly close Bitcoin Core everytime you need to close it.
Do not force-close it or shutdown the PC while it's running.

Thank you so much! The program started and it is now processing blocks.

What should I do if Bitcoin Core isn't responding? Usually when a program doesn't respond I just force-close... Maybe that was the cause of the problem.

Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
2021-11-29T14:21:50Z [0%]...[74%]...Fatal LevelDB error: Corruption: block checksum mismatch: C:\Users\(name)\AppData\Roaming\Bitcoin\chainstate/1227881.ldb
2021-11-29T14:21:50Z You can use -debug=leveldb to get more complete diagnostic messages
2021-11-29T14:21:50Z Fatal LevelDB error: Corruption: block checksum mismatch: C:\Users\(name)\AppData\Roaming\Bitcoin\chainstate/1227881.ldb
2021-11-29T14:21:50Z : Error opening block database.
Please restart with -reindex or -reindex-chainstate to recover.
-snip-
This is quite a relatively manageable error since you wont be needing to redownload the whole blockchain unless your node is pruned.
The 'fix' is to launch Bitcoin Core with -reindex-chainstate, then wait for it to finish (may take hours).

To start Bitcoin Core with that parameter:
  • Go to the directory where Bitcoin Core is installed, usually C:/Program Files/Bitcoin
  • 'Shift+RightClick' on an empty space in that folder (make sure nothing is highlighted), and select "Open PowerShell Window Here" or "Open CMD....".
  • 'PowerShell' will open, type: ./bitcoin-qt -reindex-chainstate (remove "./" if you use CMD)
  • Bitcoin Core will open and start the reindex process.

Note: To prevent that from happening, make sure to properly close Bitcoin Core everytime you need to close it.
Do not force-close it or shutdown the PC while it's running.
newbie
Activity: 5
Merit: 1
I read something about looking in the debug.log file but I couldn't find it on my computer.
The log should be in your Bitcoin data directory.
If you didn't set a custom one, it should be in: https://en.bitcoin.it/wiki/Data_directory#Default_Location (check your OS)
If you set a custom data directory, just open that folder and the debug.log file should be there.

Thank you.


legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
I read something about looking in the debug.log file but I couldn't find it on my computer.
The log should be in your Bitcoin data directory.
If you didn't set a custom one, it should be in: https://en.bitcoin.it/wiki/Data_directory#Default_Location (check your OS)
If you set a custom data directory, just open that folder and the debug.log file should be there.
newbie
Activity: 5
Merit: 1
Hello Forum

This is my first post on here. I found some threads about the same topic, but did not completely get help to solve my problem.

When I try to open Bitcoin Core on my Windows computer and during startup it starts a procedure called upgrading the UTXO database, I get an error message saying "Error opening block database, do you want to rebuild the block database now?" I click "OK" and then it says again "Error opening block database", and then the program shuts down. I try the same thing again and the same problem occurs. I have downloaded the newest version of the software and have tried restarting my computer but I get the same problem still. I read something about looking in the debug.log file but I couldn't find it on my computer. Can someone please help me?

Thanks

Lightning1
Jump to: