Skip to content
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

Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid" #14381

Closed
axelblaze15 opened this issue Apr 25, 2017 · 57 comments

Comments

@axelblaze15
Copy link

System information

Geth version: 1.6
OS & Version: Linux and Android

Expected behaviour

Mined Blocks should be retrieved by android node and displayed accordingly.

Actual behaviour

I have started a lightserver on ubuntu machine. I am able to connect android node with lightserver node but when I start mining in ubuntu, I got following errors in Log of android:
04-25 22:32:02.789 5831-5925/com.example.sahil.myapp7 E/GoLog: INFO [04-25|17:02:02] Block synchronisation started
04-25 22:32:02.898 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:02:02] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:32:43.976 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:02:43] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:33:11.181 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:03:11] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:33:46.752 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:03:46] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:34:19.160 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:04:19] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:34:49.911 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:04:49] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:35:21.757 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:05:21] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"

Steps to reproduce the behaviour

I used following commands to start a lightserver -
-geth --datadir op1 --networkid 381 init rinkeby.json
-geth --datadir op1 --networkid 381 --lightserv 25 --lightpeers 20 console

Backtrace

[backtrace]

Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"

@GoldMiner817
Copy link

i have the same, but on win 10

@karalabe
Copy link
Member

karalabe commented May 5, 2017

I'm trying to repro this. Are you also seeing it between Windows and Android @GoldMiner817 ?

@tcaaen
Copy link

tcaaen commented May 5, 2017

I'm also having this issue with version 1.6.1 on Ubuntu 14.04

@GoldMiner817
Copy link

GoldMiner817 commented May 5, 2017 via email

@GoldMiner817
Copy link

GoldMiner817 commented May 6, 2017 via email

@Rocavall
Copy link

Rocavall commented May 6, 2017

I'm having this issue as well. Yesterday it was syncing OK.

Uname -a: Linux adria-pc 4.4.63-1-MANJARO #1 SMP PREEMPT Fri Apr 21 08:43:38 UTC 2017 x86_64 GNU/Linux
Console log: https://pastebin.com/3CPDnSpA

@GoldMiner817
Copy link

GoldMiner817 commented May 6, 2017 via email

@Rocavall
Copy link

Rocavall commented May 6, 2017

I got this when trying to close:
ERROR[05-06|14:35:38] Failed to close database database=/run/media/adria/6A82036982033959/ethereum/geth/chaindata err="leveldb/table: corruption on data-block (pos=0): checksum mismatch, want=0xbc4d5c87 got=0x495f3f81 [file=243553.ldb]"
https://pastebin.com/W0ivQSmk
Is my chain corrupted? Do I have to download everything again?

@GoldMiner817
Copy link

not sure... it would be handy if we could download the blockchain somewhere and import it..this takes way to long.

i think my hdd swap didnt change much..still importing headers etc, after 2.5 hours.

man, i just wanne get started! :/

errors i get are;

WARN [05-06|15:49:35] Rolled back headers count=2048 header=1494991->1492943 fast=1457578->1457578 block=0->0
WARN [05-06|15:49:35] Synchronisation failed, retrying err="receipt download canceled (requested)"
WARN [05-06|15:49:37] Synchronisation failed, dropping peer peer=a4aaa02204239fbe err="no peers available or all tried for download"
INFO [05-06|15:49:46] Imported new state entries count=1 elapsed=1.026ms processed=3804759 pending=17

INFO [05-06|16:01:51] Imported new state entries count=384 elapsed=4.010ms processed=3974226 pending=113129
WARN [05-06|16:01:52] Rolled back headers count=2048 header=1553999->1551951 fast=1517039->1517039 block=0->0
WARN [05-06|16:01:52] Synchronisation failed, retrying err="block body download canceled (requested)"

INFO [05-06|16:05:12] Imported new state entries count=63 elapsed=15.712s processed=3977768 pending=28556
WARN [05-06|16:05:12] Synchronisation failed, dropping peer peer=4ae417bcced3f93c err="retrieved hash chain is invalid"

INFO [05-06|16:07:21] Imported new state entries count=384 elapsed=9.772s processed=3983719 pending=53745
WARN [05-06|16:07:30] Synchronisation failed, retrying err="receipt download canceled (requested)"

WARN [05-06|16:08:14] Synchronisation failed, retrying err="state data download canceled (requested)"
WARN [05-06|16:08:18] Synchronisation failed, dropping peer peer=2844b46106891aa9 err="action from bad peer ignored"
INFO [05-06|16:08:41] Imported new state entries count=1 elapsed=1.003ms processed=3984410 pending=17

WARN [05-06|16:09:15] Synchronisation failed, retrying err="receipt download canceled (requested)"
WARN [05-06|16:09:23] Synchronisation failed, retrying err="block download canceled (requested)"
INFO [05-06|16:09:35] Imported new state entries count=1 elapsed=1.002ms processed=3985496 pending=17

WARN [05-06|16:23:56] Rolled back headers count=2048 header=1610668->1608620 fast=1574014->1574014 block=0->0
WARN [05-06|16:23:56] Synchronisation failed, retrying err="state data download canceled (requested)"

@GoldMiner817
Copy link

i guess its weekend, support is probably out

i've used another client, for those in troulbe; i like to share

Parity http://127.0.0.1:8180

less than 10 min sync time!

I am finally mining! 💃

i would like to use Geth tho, so a solution woudl be nice, cheers

@karalabe
Copy link
Member

karalabe commented May 6, 2017

Parity warp sync just trusts its peers for the right data, and "validates it whenever" in the background. You'll still need the same time to make sure your chain is valid, but apparently people don't really care about it nowadays.

@GoldMiner817
Copy link

GoldMiner817 commented May 6, 2017 via email

@sslavian812
Copy link

I have the same issue on windows 10.
geth -rpc and geth --fast --cache=1024 repeatedly produce err="retrieved hash chain is invalid"

Deleting the blockchain and starting over does not help.

I'm just trying to start mining!

@karalabe
Copy link
Member

karalabe commented May 11, 2017 via email

@sslavian812
Copy link

sslavian812 commented May 11, 2017

@karalabe I have only SSD in my laptop, but it affects me too.

@n10n
Copy link

n10n commented May 12, 2017

Is this related to "Synchronisation failed "retrieved hash chain is invalid" #14435" issue? or ERROR[05-11|19:49:41] Failed to close database database=../Ethereum/geth/chaindata err="leveldb/table: corruption on table-footer (pos=2166570): bad magic number [file=044238.ldb]" #14465?

@Rocavall
Copy link

In my case I was using an HDD but the sync never ended (stuck in the last 130 blocks regardless of highest block number), so I copied the files to my SSD and then I cound finish syncing. The problem mentioned here appeared afterwards, so I guess it had something to do with the sync part done on the HDD?

@n10n
Copy link

n10n commented May 12, 2017

Have on Ubuntu 16.0x server with geth "binaries/keystore" etc on SSD and "chaindata" of HDD and it seems to be working fine but on Macbook which has two SSDs ("binaries/keystore" in one SSD and "chaindata" in another SSD) seems to failing every other day.

@klayt
Copy link

klayt commented May 14, 2017

I have the same issue, on SSD, 16GB RAM, 2.6 Quad core. Haven't been able to sync.

@ta20170412
Copy link

Having similar issue:
INFO [05-16|22:11:19] Imported new chain segment blocks=16 txs=217 mgas=16.083 elapsed=4.367s mgasps=3.682 number=3718456 hash=11f683…ca41f6
WARN [05-16|22:11:23] Synchronisation failed, dropping peer peer=158f8aab45f6d19c err="retrieved hash chain is invalid"
INFO [05-16|22:11:41] Imported new chain segment blocks=1 txs=2 mgas=1.021 elapsed=37.690ms mgasps=27.089 number=3718467 hash=b5f68b…484ae3
INFO [05-16|22:11:57] Imported new chain segment blocks=1 txs=80 mgas=4.319 elapsed=846.955ms mgasps=5.099 number=3718468 hash=0b672c…7a6215
INFO [05-16|22:29:07] Imported new chain segment blocks=4 txs=36 mgas=3.109 elapsed=625.756ms mgasps=4.968 number=3718472 hash=360630…f01756
INFO [05-16|22:29:09] Imported new chain segment blocks=4 txs=88 mgas=4.656 elapsed=1.368s mgasps=3.402 number=3718476 hash=a56d6c…178afe
INFO [05-16|22:29:13] Imported new chain segment blocks=9 txs=219 mgas=9.173 elapsed=3.157s mgasps=2.905 number=3718485 hash=70700a…1480c2
INFO [05-16|22:29:21] Imported new chain segment blocks=32 txs=769 mgas=45.633 elapsed=8.906s mgasps=5.124 number=3718517 hash=1cb67c…db65ed
WARN [05-16|22:29:26] Synchronisation failed, dropping peer peer=158f8aab45f6d19c err="retrieved hash chain is invalid"
INFO [05-16|22:29:31] Imported new chain segment blocks=1 txs=10 mgas=0.461 elapsed=144.633ms mgasps=3.190 number=3718536 hash=fa8b1d…2f7fa4

@monacofx1
Copy link

Hi,
I still have this syncro failed on Ubuntu with 2 nodes running on the same computer. Is there a solution for this issue. Is that related to the geth version 1.6.1 ?

@dotnetspec
Copy link

win 10 32 bit
2 GB RAM
Geth
Version: 1.6.1-unstable
Git Commit: c7a4d9c
Architecture: 386
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.1
Operating System: windows

Running this (eventually) causes out of memory error (as well as above message):

geth --testnet --fast --rpc --rpcapi db,eth,net,web3,personal --cache=1024 --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"

Is there a flag setting I need or is this not possible on a 2GB machine?

Or should I be using another version of Geth?

@karalabe
Copy link
Member

There's a PR open to fix the sync issues. It will be in the next week's release.

@bogdanbrezuica
Copy link

Hello @karalabe , was this fix included in 1.6.2?

@karalabe
Copy link
Member

No, we had to pull that fix because it wasn't stable enough. It's mostly working and that's our top priority now. We'll do a release immediately when the fix is deemed stable enough to roll out to everyone.

@bogdanbrezuica
Copy link

Ok, great. thanks for the quick reply!

@trappist
Copy link

trappist commented Jun 8, 2017

Not in 1.6.3 through 1.6.5 either? I see no recent activity on #3780 if that's the PR we're waiting for.

@mantas7776
Copy link

I'm also getting this error using SSD with 1.6.5 stable version.

@antoinemineau
Copy link

antoinemineau commented Jun 13, 2017

Same issue here with 1.6.6-unstable-80f7c6c2 with an HDD

WARN [06-13|23:20:52] Synchronisation failed, dropping peer    peer=b41ecd5cf3a20292 err="retrieved hash chain is invalid"
WARN [06-13|23:20:52] Synchronisation failed, dropping peer    peer=2e42210c08954b37 err="action from bad peer ignored"

@bigbobah
Copy link

update: solved this error, for me the reason was overflow of HDD space.
FYI: on the separate Linode instance (8192 resized to 12288), full blockchain sync with geth client took 5 days and 170 GB.

@orangemio
Copy link

Having same problem on macOS Sierra.

@2infiniti
Copy link

Same problem, and sync from the app never worked well for me, always get stuck at some point or fail to connect to peers. The only method that worked for me is to run geth to sync in command prompt. Now I'm getting this bad block problem in geth. Latest build has fail to connect to node problem so it won't even start up. This wallet has been nothing but nightmare for me.

@baaa
Copy link

baaa commented Aug 1, 2017

this error just started for me after ethereum wallet update to 0.9.0
was working until yesterday..

@BoBBer446
Copy link

this issue was found a lot on this repo but i cant finde one answer to fix it...

@baaa
Copy link

baaa commented Aug 2, 2017

@BoBBer446 after trying 100 different things, I found a workaround.
shut down your geth, find the file it is complaining about in the block chain delete it and restart geth without fast option.

i.e for the error message:

corruption on data-block (pos=0): checksum mismatch, want=0xbc4d5c87 got=0x495f3f81 [file=243553.ldb]"

delete 243553.ldb

@BoBBer446
Copy link

i want to start new, but if i delete the chaindata folder i loose my coins

if i delete one .lbd im not sure if that corrupt my eth balance :/ The developer does not talk with us about that issue :(

@BoBBer446
Copy link

BoBBer446 commented Aug 2, 2017

My issue is retrieved hash chain is invalid

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\Link>cd c:/programme/geth

c:\Programme\geth>geth --cache 1024
INFO [08-02|20:15:21] Starting peer-to-peer node               instance=Geth/v1.6.7-stable-ab5646c5/windows-amd64/go1.8.3
INFO [08-02|20:15:21] Allocated cache and file handles         database=C:\\Users\\Link\\AppData\\Roaming\\Ethereum\\geth\\chaindata cache=1024 handles=1024
INFO [08-02|20:15:21] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Metropolis: 9223372036854775807 Engine: ethash}"
INFO [08-02|20:15:21] Disk storage enabled for ethash caches   dir=C:\\Users\\Link\\AppData\\Roaming\\Ethereum\\geth\\ethash count=3
INFO [08-02|20:15:21] Disk storage enabled for ethash DAGs     dir=C:\\Users\\Link\\AppData\\Ethash                          count=2
INFO [08-02|20:15:21] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [08-02|20:15:21] Loaded most recent local header          number=4071854 hash=e03877…2fe89c td=558129264757125806177
INFO [08-02|20:15:21] Loaded most recent local full block      number=4071854 hash=e03877…2fe89c td=558129264757125806177
INFO [08-02|20:15:21] Loaded most recent local fast block      number=4071854 hash=e03877…2fe89c td=558129264757125806177
WARN [08-02|20:15:22] Blockchain not empty, fast sync disabled
INFO [08-02|20:15:22] Starting P2P networking
INFO [08-02|20:15:24] Mapped network port                      proto=udp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [08-02|20:15:24] UDP listener up                          self=enode://53cc56a962ff505850ffaf86851f8954b05eb55073419666a7831067532ac7ae0a413e0124a48f50f5082d0b3bda8e1242c0b47e8e8d242ccf291c3a27d9503d@192.168.0.10:30303
INFO [08-02|20:15:24] RLPx listener up                         self=enode://53cc56a962ff505850ffaf86851f8954b05eb55073419666a7831067532ac7ae0a413e0124a48f50f5082d0b3bda8e1242c0b47e8e8d242ccf291c3a27d9503d@192.168.0.10:30303
INFO [08-02|20:15:24] IPC endpoint opened: \\.\pipe\geth.ipc
INFO [08-02|20:15:24] Mapped network port                      proto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [08-02|20:16:24] Block synchronisation started
WARN [08-02|20:16:31] Synchronisation failed, dropping peer    peer=c214e715cd9de909 err="retrieved hash chain is invalid"
WARN [08-02|20:16:44] Synchronisation failed, dropping peer    peer=5dac192c404506a0 err="retrieved hash chain is invalid"

So i cant find the corrupt .ldb :/

Maybe i cant try this:
geth removedb

but im not sure with my eth balance

@keivibi
Copy link

keivibi commented Aug 7, 2017

@BoBBer446
You should do a backup of your keystore with your private key files which is located in your ethereum data directory. This way you will not loose coins if something goes wrong.
https://github.com/ethereum/go-ethereum/wiki/Backup-&-restore

By doing
geth removedb
you remove only the chaindata folder, the keystore folder is staying untouched and so your coins. You will not see your coins until the blockchain is synced, though.

@davidbongcc
Copy link

Hi All Blockchain experts,
I created a blockchain local node (Geth) with this command: geth --testnet --fast. Then I created a personal account on the local machine, and I also transferred one ether from my Testnet account from MetaMasks to the newly created local account. But, I noticed that my local node it didn't sync up from the testnet network. The transferee account still showing zero ether. One thing, I noticed was the console was showing an error message "peer drop". Hope someone could advise on this.

@jordimorris
Copy link

this issue reproduces randomly.

How to fix it? running version 1.8.13

@smartwombat
Copy link

It's still open in August 2018 after creation April 2017.
There appears to be no fix.
Having upgraded to geth 1.8.13 we still have this error.

@aminariana
Copy link

aminariana commented Aug 24, 2018

Same error in Version: 1.8.14-stable

@wtcalok
Copy link

wtcalok commented Aug 26, 2018

While trying to sync up with Rinkeby, I am facing the same issue mentioned in this thread. My geth Version: 1.8.14-stable.

WARN [08-26|16:18:55.657] Synchronisation failed, dropping peer peer=6867526b2f5d623c err="retrieved hash chain is invalid"

-------- After few minutes --------

WARN [08-26|16:29:23.568] Node data write error err="state node 7bc787…c4b1bd failed with all peers (1 tries, 1 peers)"
WARN [08-26|16:29:23.568] Synchronisation failed, retrying err="state node 7bc787…c4b1bd failed with all peers (1 tries, 1 peers)"


@Rwiju
Copy link

Rwiju commented Sep 25, 2018

Issue is still open. Using windows 7 and getting constant "retrieved hash chain is invalid" error. Even when trying on both rinkeby and ropsten. Especially with the rinkeby network.

@IvRRimum
Copy link

IvRRimum commented Oct 1, 2018

I am experiencing the same issue.

@ngkong
Copy link

ngkong commented Nov 28, 2018

is #18072 related to this issue?

@marcosmartinez7
Copy link

Having the same problem, started getting noticed of the issue searching for this #16406

Im using 6 clique signers on geth 1.8.17 on different versions of ubuntu, 16.04 and 18.04

@karalabe
Copy link
Member

The original issue is really really old and we've probably fixed many issues related to it. Please open a new issue with as much detail as you have if this still persists.

@ProDog
Copy link

ProDog commented Dec 3, 2019

I solved this problem by upgrad my go-ethereum version

@revskill10
Copy link

@ProDog To which version did upgrade ?

@ProDog
Copy link

ProDog commented Jul 21, 2021

@ProDog To which version did upgrade ?

I'm sorry I can't remember, is about 1.9 later.

@revskill10
Copy link

@ProDog I'm using Ubuntu 20.0.4 . My old geth version is 1.8.13-stable . I got same error in this issue. Do you think i need to upgrade geth to resolve the error ? And to which version should i need to upgrade then ? Thanks.

@ProDog
Copy link

ProDog commented Jul 21, 2021

@revskill10 1.8.13 is too old, yaybe you can upgrade to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests