Bitcoin Forum
May 17, 2024, 04:49:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Error opening Block Database - Looking for some help  (Read 1585 times)
guitarplinker (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 1024



View Profile WWW
April 02, 2015, 01:18:09 PM
 #1

Hey guys, I'm trying to setup a bitcoin node on my Odroid C1. Right now my plan is to store bitcoind on the Odroid, and the blockchain on my NAS. Currently I have bitcoind compiled and ready to go on the Odroid, and the blockchain is already on the NAS too, but it's out of date by about 16 hours right now.

Anyway, when I try to run the following command:
Code:
sudo bitcoind -datadir=/directory/to/blockchain

I get the error "Error opening block database. Do you want to rebuild the block database now?" I'm not sure how I should go about fixing this problem, I've tried some other commands to have bitcoind re-index the blockchain, but that doesn't seem to do much. I've also done some searching and others seem to have this problem, but there are no easy fixes that I'm able to find.

Does anybody know what the issue might be, and how I might go about fixing it?

achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 256


View Profile
April 03, 2015, 01:33:20 AM
 #2

That error usually means that the databases somehow got corrupted. Try doing:
Code:
bitcoind -reindex -datadir=/directory/to/blockchain

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
guitarplinker (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 1024



View Profile WWW
April 03, 2015, 03:16:48 AM
 #3

That error usually means that the databases somehow got corrupted. Try doing:
Code:
bitcoind -reindex -datadir=/directory/to/blockchain
Running that gives me an error saying "Error opening block database". However the database is there and runs well, it's using the same files that I was using on my Windows 7 machine running a bitcoin node.

Do you have any other ideas of what might fix this problem?
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 256


View Profile
April 03, 2015, 03:28:09 AM
 #4

Check if both nodes run the same version. I believe that Bitcoin Core 0.10.0 uses a different database and block organization that is not compatible with other versions.

You might also have some permissions issues between the Linux system and Windows.

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
emrebey
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
April 03, 2015, 07:51:55 AM
 #5

ran into same issue and re-synced the whole blockchain to fix it.
guitarplinker (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 1024



View Profile WWW
April 03, 2015, 01:58:17 PM
 #6

Check if both nodes run the same version. I believe that Bitcoin Core 0.10.0 uses a different database and block organization that is not compatible with other versions.

You might also have some permissions issues between the Linux system and Windows.
Both machines are running the 0.10.0 node version so I don't think there should be any issues there.

As for permissions, I created a new folder on my NAS with the Odroid and then set that as the data directory. I'm still getting an error about opening the block database even in this new folder. The folder is empty (except for the mandatory bitcoin.conf file) so I expected it to just begin downloading the Blockchain on its own.

I'm totally out of ideas at this point. It might be a better idea to try and use a USB to store the Blockchain on rather than NAS, but I don't really want to purchase a USB drive in the case that it still doesn't solve the problem. I'll probably do some more Googling about this issue, and hopefully find a solution to it. But it seems to be a very weird issue.
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 256


View Profile
April 03, 2015, 03:00:28 PM
 #7

Try re-syncing the tree and recompiling. There may be a bug in the version you pulled from their git repository.

If you are trying to run two bitcoin nodes from the same data directory, you won't be able to as one node will not be able to lock onto the directory.

Otherwise, I've got nothing else.

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
April 04, 2015, 03:47:43 PM
 #8

-snip-
Running that gives me an error saying "Error opening block database". However the database is there and runs well, it's using the same files that I was using on my Windows 7 machine running a bitcoin node.

Do you have any other ideas of what might fix this problem?

The exact same files at the same time? As in both programms try to access the same data at the same time? Thats not possible AFAIK as they both require write permission. Im not entirely sure if its possible for your NAS to handle this somehow but I doubt it is.

Im not really here, its just your imagination.
guitarplinker (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 1024



View Profile WWW
April 04, 2015, 08:56:55 PM
 #9

The exact same files at the same time? As in both programms try to access the same data at the same time? Thats not possible AFAIK as they both require write permission. Im not entirely sure if its possible for your NAS to handle this somehow but I doubt it is.
No, the machines are not using the same files. My main server has the blockchain stored on it's main HDD, and the Odroid uses the version on my NAS. The Odroid should be the only device accessing it on the NAS.
Try re-syncing the tree and recompiling. There may be a bug in the version you pulled from their git repository.

If you are trying to run two bitcoin nodes from the same data directory, you won't be able to as one node will not be able to lock onto the directory.

Otherwise, I've got nothing else.
I'll maybe try a different version later this week. The pain is that it takes ~ 12 hours to compile on the Odroid, so it's a time consuming switch.

Also, I talked about the files above, but the two machines aren't both using the blockchain on the NAS - my Windows machine has a copy stored locally on it's main drive.
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!