-
Notifications
You must be signed in to change notification settings - Fork 20.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal: Error starting protocol stack: genesis mismatch #21315
Comments
Hey @karalabe . Really need your help. Please could you tell me some solution or any help.. |
Hey @rjl493456442 Yes the corrupted database is still available. What should I do? Do I need to resync? |
Hey @rjl493456442 I tried the new version and now I am getting this:
What would I need to do? @rjl493456442 |
Hey @rjl493456442. I did some research and found no solution. I find that the GETH once shutdown abruptly prunes the states in freezer without pruning level db due to some roll back to correct state. Could you provide me more detailed explanation or solution? |
@sssubik Can you list your ancient directory? Something I don't understand is Now I have no clue why the ancient will return an empty genesis for you. It's not easy to debug without a corrupted database. Maybe you can help a bit by offering some information. |
Hey I have listed my ancient directory. Also the space I calculate gives me this: |
Can you also give me the size of |
hashes.0000.rdat shows 0 MB |
@sssubik I have to say sorry. I think there is a bug in the codebase, but the ancient database is already broken(and useless unless we do some manual recovery). |
@rjl493456442 What does this mean. Do I need to resync? Or can I do some manual recovery? Also if I need to resync am I gonna be able to leverage the downloaded states I already have to complete resync in less time? |
Do you have any other synced Geth instance? Manual recovery means:
To be honest I don't think we can plugin the downloaded states without any modification. The hacky way is: iterating the leveldb, delete all chain data(headers, tds, receipts, bodies, chain marker) but keep the states and then re-sync. Download the chain is fast, download the state is painful. |
Can you search the history log that whether |
Hey I dont have any other synced GETH instance
So, can I find a synced hashes.0000.rdat file from somewhere else.
Do you mean this
As far as I know how to search log I get this:
I cant find the log you just sent me |
Sorry the above search of logs was wrong. I do get this:
|
@rjl493456442 |
@sssubik Yes, basically the truncated files for replacement. Do you have any other logs before these |
@rjl493456442 Ohh okay.
Also The server crashed and was closed for around 10hours before reboot. |
Any other logs before crash? |
Not much really. Only Imported new chain segment.
But Some other logs that were like 10hours or more before the crash:
Also this unique one: Jul 08 16:02:25 [418]: INFO [07-08|16:02:25.609] Chain reorg detected =10419296 hash=90c89b…feb214 drop=1 dropfrom=28571c…aca82f add=2 addfrom=5c6482…cd2d7b` |
Hey @rjl493456442 Can you tell your local time? Or after how much time @holiman will be available to send the synced ancient file? |
@sssubik No idea, probably a few hours later. Btw I would suggest you to replace all |
Hey @rjl493456442
Do you mean this? |
@sssubik No, I think @holiman will publish our ancient folder somewhere, you only need to copy |
I've uploaded some of it to s3. Install
So you should be able to replace your broken The ones you should download are:
Hopefully, your indexes are correct and matches the offsets in the data files. The only problem is the I don't think you will need to modify your Note: this may well fail. It may even cause some of your existing ancient-data to become truncated (lost), but it might be worth a shot. |
Hey I have not used AWS till now. When I try to run the command: It gives me: As I did some research looks like it needs a region parameter as AWS only allows download from a region based URL.
Or may be I need the permission to download the file.? Hey @holiman may be I need the access through IAM User or is it Public? |
btw @holiman I do think the indexes are corrupted. Like the last element in indexes are invalid. |
Hey @rjl493456442 I am also downloading a light client right now so that I can use the ethereum blockchain. I have simple question as to Also the above aws command to download the files are not working. |
@sssubik Sure, light client should provide nearly all functionalities as the full node but it's a little bit slower and unstable(need server connections). |
Hey @holiman I think I need the access key to your s3 bucket. I cant seem to access it by any other means.. |
Hey @rjl493456442 @holiman I cant download the files.. Could you help me please? |
Hey @rjl493456442 I am syncing new fast node in another data directory right now. I tried copying to my previous working GETH fast node the following:
But I again got this:
Still the same error persists. Is there some alternatives to this. Also I could not access the AWS so, I just copied the files from my new node. |
I tried something in hope of fixing the issue. Where I copied
It was a shot in the dark as I am not getting much help. So is there any fix here? |
Are you sure your new node is synced? |
Hey @rjl493456442 No the node was not synced.. I just copied those files as they were the same size |
Please wait until your new node's chain is at least higher than 10329515. Then copy these files.
Hopefully the issue can be fixed. |
Hey @rjl493456442. I am syncing the GETH node but I have worries that this kind of problem could repeat again. Does backing up the GETH node (Whole chaindata) by using some backup mechanisms like rsync help to restart the GETH node if the node goes down again? |
Hi @sssubik did you fix the problem? I got problem after server reboot
|
If you remove the 0 length files they come right back. Then you get the EOF error.
|
I am having the same problem. Only solution that I applied was removing the |
One unclean shutdown due to power outage, and 2 months of download are gone! Damn it. How come you guys didn't test the software for unclean shutdown? Very bad!
|
that is NOT the solution |
the best solution is to fire the engineers who wrote this code and hire some good ones |
I understand your frasturation. Did you have any backup for your 2 months of download to recover from? It was the only solution I come up with which worked on my end (I know its not that efficient) . Since I was working on a private chain it was only few GBs so it took 20 minutes to sync. But I believe it won't be the case for the ethereum mainnet with which is around ~205 GB. |
@nuliknol Geth should be able to survive crashes just fine, perhaps with minimal data loss that can be recovered from the network. In your specific case, files that Geth wrote contain all zeroes. Any explanation for the data files turning into all 0? |
yeah, one explanation could be this:
Source: https://www.sqlite.org/howtocorrupt.html my advice: hire a specialized guy in database development , because this freezer stuff looks very amateur coding. How it is possible that the headers file got reset ? The linux kernel did that? I don't think so. For the sake of documentation I am attaching what exactly went wrong and how I fixed it, so other people can have some clues on what to do. Basically I had to replace the headers file (because it got truncated to 0) and the hashes file (from a node that is already in sync). |
Closing this, we fixed a datarace in the freezer with #22728 |
Hi there,
System information
Geth version: Geth/v1.9.13-stable
OS & Version: ubuntu 18.04
Expected behaviour
My server turned off abruptly where my full node GETH was running. Now when I fix the server and open the node the node should start running.
Actual behaviour
The GETH node before the server crashed was running fully synced and was displaying importing chain segment.
When I fixed the server after server turned off abruptly, and executing geth I am getting log as:
The server was off for around 8 hours is this the reason there is a mismatch problem? I dont know why the Genesis mismatch problem is there. Could you provide me with a solution to initialize the GETH node with a genesis block again or any other solution
Steps to reproduce the behaviour
Install GETH full node and if the server turns off due to some problem the above error shows up if you reboot the server.
The text was updated successfully, but these errors were encountered: