Bitcoin Forum
November 27, 2022, 01:07:59 AM *
News: Reminder: do not keep your money in online accounts
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Getting "Error opening block database" when opening Bitcoin Core. Please help!  (Read 214 times)
Lightning1 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 29, 2021, 11:44:28 AM
Last edit: November 30, 2021, 03:44:06 PM by Lightning1
 #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
1669511279
Hero Member
*
Offline Offline

Posts: 1669511279

View Profile Personal Message (Offline)

Ignore
1669511279
Reply with quote  #2

1669511279
Report to moderator
1669511279
Hero Member
*
Offline Offline

Posts: 1669511279

View Profile Personal Message (Offline)

Ignore
1669511279
Reply with quote  #2

1669511279
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
nc50lc
Legendary
*
Offline Offline

Activity: 1876
Merit: 3874


Self-proclaimed Genius ㊙️


View Profile
November 29, 2021, 12:13:48 PM
 #2

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.

Lightning1 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 29, 2021, 02:26:25 PM
Last edit: December 28, 2021, 01:53:55 PM by Lightning1
 #3

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.


nc50lc
Legendary
*
Offline Offline

Activity: 1876
Merit: 3874


Self-proclaimed Genius ㊙️


View Profile
November 30, 2021, 03:51:00 AM
 #4

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.

Lightning1 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 30, 2021, 01:17:08 PM
 #5

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?
hosseinimr93
Legendary
*
Offline Offline

Activity: 1862
Merit: 3109


neodice.com


View Profile
November 30, 2021, 04:32:58 PM
 #6

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.

nc50lc
Legendary
*
Offline Offline

Activity: 1876
Merit: 3874


Self-proclaimed Genius ㊙️


View Profile
December 01, 2021, 03:06:12 AM
 #7

-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.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2338
Merit: 5410


neodice.com


View Profile
December 01, 2021, 09:54:38 AM
 #8

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.

Usually only the UI is freezing (it's known problem, see https://github.com/bitcoin/bitcoin/issues/16417), so best option is leave it alone until Bitcoin Core complete sync process.

Do you suggest I use a different bitcoin wallet that is more appropriate for beginners maybe?

If you're looking for convenience/ease of use, i would suggest wallet such as Electrum and Blue Wallet.

HCP
Legendary
*
Offline Offline

Activity: 1960
Merit: 4253

<insert witty quote here>


View Profile
December 02, 2021, 03:32:29 AM
 #9

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

Pmalek
Legendary
*
Offline Offline

Activity: 2226
Merit: 5177


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile
December 04, 2021, 09:15:23 AM
 #10

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.   

NeuroticFish
Legendary
*
Offline Offline

Activity: 3136
Merit: 5297


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile
December 04, 2021, 10:50:33 AM
 #11

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.

nc50lc
Legendary
*
Offline Offline

Activity: 1876
Merit: 3874


Self-proclaimed Genius ㊙️


View Profile
December 04, 2021, 11:57:34 AM
Merited by NeuroticFish (3)
 #12

-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.

HCP
Legendary
*
Offline Offline

Activity: 1960
Merit: 4253

<insert witty quote here>


View Profile
December 06, 2021, 04:50:16 AM
Merited by NeuroticFish (4)
 #13

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


uchegod-21
Sr. Member
****
Offline Offline

Activity: 406
Merit: 426


For campaign, Pm CryptopreneurBrainboss


View Profile
December 09, 2021, 09:09:01 AM
 #14


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.

        ▄▀▀▀▀▀▀   ▄▄
    ▄  ▄▄▀▀▀▀▀▀▀▀▀▄▄▀▀▄
  ▄▀▄▀▀             ▀▀▄▀
▄▀▄▀         ▄       ▀▄
  ▄▀         ███       ▀▄▀▄
▄ █   ▀████▄▄███▄       █ █
█ █     ▀▀▀███████▄▄▄▄  █ █
█ █       ██████████▀   █ ▀
▀▄▀▄       ▀▀█████▀    ▄▀
   ▀▄        ▐██▄     ▄▀▄▀
  ▀▄▀▄▄       ███▄  ▄▄▀▄▀
    ▀▄▄▀▀▄▄▄▄▄████▀▀ ▄▀
       ▀   ▄▄▄▄▄▄▄
.
█ █▀█ █▀█ █▀█  ▄  ▄▀▀ █   ▄▀█ ▀█▀ ▄▀▀ ▄███▄
█ █▀█ █ █ █ █ ▀█▀ ▀▀█ █   █ █  █  ▀▀█ ▀███▀
█ █▄█ █▄█ █▄█     ▄▄▀ ▀▄▄ █▄▀  █  ▄▄▀  
                                        █
████████████████████████████████████ 
███▀▀▀▀▀▀██████▀▀▀▀▀▀██████▀▀▀▀▀▀███ 
█▀▄██▀███▄▀██▀▄██▀███▄▀██▀▄██▀███▄▀████▄
█ █ ▀ ▀███ ██ █ ▀ ▀███ ██ █ ▀ ▀███ █████
█ ██    ▄█ ██ ██    ▄█ ██ ██    ▄█ █████
█▄▀██  ▀█▀▄██▄▀██  ▀█▀▄██▄▀██  ▀█▀▄████▀
███▄▄▄▄▄▄██████▄▄▄▄▄▄██████▄▄▄▄▄▄███
████████████████████████████████████
▄███▄
▄███████▄
▄███████████▄
▐█████████████▌
▄█  █████████
▄█████████  ████▄
▄███████████████████▄
▀██████  ███████████▀
▄█  ██████████  ████▄
▄███████████████████████▄
▀███████████████████████▀
███████
█████████████████████
██████████████████████████████████████████████████
██████████████████████████████████████████████████
       ▄▄▄▄ ▄▄█████▄
     ████████████████
▄▄▄█████████████████████▄
███████████████████████████▄▄
▀█████████████████████████████
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
       ▄█▄      ██
    ▄█▄▄█▄▄█▄          ▄▄
    ▄▄▄███▄▄▄    ▄ ▄ ▄ ▀▀
     ▀ ▄█▄ ▀  ▀▄█ ▀█▀ █▄▀
    ▄▄  ▀     ▀▀▀▀███▀▀▀▀
    ▀▀        ▀██▀▀█▀▀██▀
         ██   ▀ ▀▄▀█▀▄▀ ▀
Lightning1 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 28, 2021, 01:24:13 PM
 #15

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?
nc50lc
Legendary
*
Offline Offline

Activity: 1876
Merit: 3874


Self-proclaimed Genius ㊙️


View Profile
December 29, 2021, 02:49:25 AM
Merited by ETFbitcoin (1)
 #16

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

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2338
Merit: 5410


neodice.com


View Profile
December 29, 2021, 10:07:26 AM
Merited by Cookdata (1)
 #17

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.

NotATether
Legendary
*
Offline Offline

Activity: 1064
Merit: 4522


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile WWW
December 30, 2021, 03:06:52 AM
 #18

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.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2338
Merit: 5410


neodice.com


View Profile
December 30, 2021, 09:22:14 AM
 #19

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)?

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!