Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: lalit patadiya on June 15, 2018, 08:49:22 AM



Title: : Error opening block database.
Post by: lalit patadiya on June 15, 2018, 08:49:22 AM
I am trying to install bitcored on my server and it'll install and working f9 with testnet, now I want to  move server with livenet for that one I have made changes all the required changes and execute the below command

> bitcored

and it'll start sync but after 91%, meanwhile somehow my internet connection is gone and the process stopped, also I have to restart my system again try to resume the process at that time it'll giving an error like below :

[2018-06-15T08:37:21.554Z] info: Starting bitcoin process
: Error opening block database.

Do you want to rebuild the block database now?
[2018-06-15T08:37:22.318Z] warn: Bitcoin process unexpectedly exited with code: 1
[2018-06-15T08:37:22.318Z] warn: Restarting bitcoin child process in 5000ms
^C[2018-06-15T08:37:25.097Z] info: Beginning shutdown
[2018-06-15T08:37:25.097Z] info: Stopping insight-ui (not started)
[2018-06-15T08:37:25.098Z] info: Stopping insight-api (not started)
[2018-06-15T08:37:25.098Z] info: Stopping web (not started)
[2018-06-15T08:37:25.098Z] info: Stopping bitcoind
[2018-06-15T08:37:26.569Z] error: Failed to start services
[2018-06-15T08:37:26.569Z] error: Error: Stopping while trying to spawn bitcoind.


Does any one has idea ?


Title: Re: : Error opening block database.
Post by: bob123 on June 15, 2018, 09:05:53 AM
[2018-06-15T08:37:21.554Z] info: Starting bitcoin process
: Error opening block database.

Do you want to rebuild the block database now?
[2018-06-15T08:37:22.318Z] warn: Bitcoin process unexpectedly exited with code: 1
[2018-06-15T08:37:22.318Z] warn: Restarting bitcoin child process in 5000ms
^C [2018-06-15T08:37:25.097Z] info: Beginning shutdown
[...]


It seems you files are somehow corrupted.
Did you actually try to rebuild the database? Or did you just hit CTRL+C to cancel each time?


Title: Re: : Error opening block database.
Post by: lalit patadiya on June 15, 2018, 09:29:11 AM
Yes i have rebuild the database using -reindex=1 then it'll start the process again from 0.0 to 84% then stop the process with the same error


Title: Re: : Error opening block database.
Post by: bob123 on June 15, 2018, 09:38:04 AM
Yes i have rebuild the database using -reindex=1 then it'll start the process again from 0.0 to 84% then stop the process with the same error


You may have to resync the blockchain.
-reindex wipes the chainstate and block index and rebuilds them.

But it seems like you have corrupt block files. The best option probably would be to sync from scratch.

Did you check wether your hardware does work as intended? Do you have the blockchain stored on an external hard drive (those are more error-prone) ?


Title: Re: : Error opening block database.
Post by: lalit patadiya on June 15, 2018, 09:41:17 AM
Actually, I have store my all the data on my GoDaddy server, if I am starting again from scratch then it'll take again 8-9 days for 100% sync


Title: Re: : Error opening block database.
Post by: bob123 on June 15, 2018, 09:46:17 AM
Did you already try to delete the latest few downloaded block files and run --reindex afterwards? It may be worth a try.
They are usually located in ~/.bitcoin/blocks/ (linux) or %APPDATA%\Bitcoin\blocks (windows).


Title: Re: : Error opening block database.
Post by: lalit patadiya on June 15, 2018, 10:26:40 AM
But I think --reindex will start from scratch right?


Title: Re: : Error opening block database.
Post by: bob123 on June 15, 2018, 10:37:09 AM
But I think --reindex will start from scratch right?

--reindex will wipe and rebuild the chainstate and block index.
It does not repair broken block files. You will need to resync and redownload those corrupted block files.


Title: Re: : Error opening block database.
Post by: HCP on June 17, 2018, 04:22:55 AM
But I think --reindex will start from scratch right?
--reindex just reads the files you already have stored on the disk. It will only download blocks that it does not already have.

You will need to manually remove the corrupted block files to force it to redownload them.


Title: Re: : Error opening block database.
Post by: amaclin1 on June 17, 2018, 12:32:35 PM
Does any one has idea ?

bitcore ( https://thebitcoincore.org/ ) is not bitcoin


Title: Re: : Error opening block database.
Post by: lalit patadiya on June 19, 2018, 07:25:19 AM
"You will need to manually remove the corrupted block files to force it to redownload them."

I did but it's not working it'll give the same error again.



Title: Re: : Error opening block database.
Post by: NeuroticFish on June 19, 2018, 07:32:33 AM
"You will need to manually remove the corrupted block files to force it to redownload them."

I did but it's not working it'll give the same error again.

If you are certain that you removed the correct block, an idea would be to look into your antivirus logs, maybe it "disinfected" something in that file (?).


Title: Re: : Error opening block database.
Post by: nc50lc on June 20, 2018, 06:46:09 AM
Actually, I have store my all the data on my GoDaddy server
Does your VPS (hosting) plan comes with an unlimited bandwidth and storage space?
I don't know how big the current <Bitcored?>'s node is, so the problem might be the current size of your node on GoDaddy's server.
Or it may be non-compliant to their terms and conditions and they set a cap on your storage space.

Quote from: GoDaddy
Our Web Hosting plans are designed to host most personal, small business and organization websites. We don't limit the amount of storage and bandwidth your site can use as long as it complies with our Hosting Agreement. Should your website bandwidth or storage usage present a risk to the stability, performance or uptime of our servers, we will notify you via email and you may be required to upgrade to a Virtual Private Server or Dedicated (Private) Server, or we may restrict the resources your website is using. It’s very rare that a website violates our Hosting Agreement and is typically only seen in sites that use hosting for file sharing or storage.