Data is not syncing (err="peer is unknown or unhealthy")
Geth Version: 1.8.12-stable Git Commit: 4baffd64bda63208f9a9d153e975b52dabbfa32f Quorum Version: 2.2.0 Architecture: amd64 Protocol Versions: [63 62] Network Id: 1337 Go Version: go1.9.7 Operating System: linux Number of nodes - 5 Consensus - RAFT
After few transactions stopped a node did 13000 transaction on a network and then started a node. but its not syncing and when fetched block number its value is zero.
Logs:- INFO [04-17|07:54:20.461] Loaded local transaction journal transactions=0 dropped=0 INFO [04-17|07:54:20.461] Regenerated local transaction journal transactions=0 accounts=0 DEBUG[04-17|07:54:20.462] Recalculated downloader QoS values rtt=20s confidence=1.000 ttl=1m0s INFO [04-17|07:54:20.490] Starting P2P networking INFO [04-17|07:54:20.490] RLPx listener up self="enode://87767cbbe9840a2d46e22152414db8fbc93952f37ce04953dee691440ba928 a213512be7d55b36b9efd5fdf283bf26f645bddd9a3cc234415a652df72fa90c75@[::]:22001?discport=0" INFO [04-17|07:54:20.490] starting raft protocol handler INFO [04-17|07:54:20.491] loaded the latest applied index lastAppliedIndex=9717 INFO [04-17|07:54:20.491] loading snapshot INFO [04-17|07:54:20.491] applying snapshot to raft storage INFO [04-17|07:54:20.491] updating cluster membership per raft snapshot INFO [04-17|07:54:20.491] adding new raft peer raft id=1 TRACE[04-17|07:54:20.491] New dial task task="staticdial 87767cbbe9840a2d 52.175.216.141:22001" TRACE[04-17|07:54:20.491] Adding static node node="enode://7020366ffb38ab6bd32648d0a3efadfb8529e5f5ee6780bd79ae3bfb85ecfa f7bed625d172fbfad283beb2ed79e79fb6b4f35b094e4419743cf3c991199267ed@52.175.245.187:22001?discport=0" TRACE[04-17|07:54:20.491] New dial task task="staticdial 7020366ffb38ab6b 52.175.245.187:22001" TRACE[04-17|07:54:20.492] Accepted connection addr=52.175.216.141:53772 INFO [04-17|07:54:20.494] adding new raft peer raft id=3 INFO [04-17|07:54:20.496] adding new raft peer raft id=4 TRACE[04-17|07:54:20.497] Adding static node node="enode://dd995d46e592051e3485448c78a23542e8e0fe88063696cd2f3c5eed77fa42 f9c039ce73715be8f63e559dd70f9b4d90c51976a2ed2afd4cd537caddca5b7ef9@51.143.1.36:22001?discport=0" TRACE[04-17|07:54:20.497] New dial task task="staticdial dd995d46e592051e 51.143.1.36:22001" TRACE[04-17|07:54:20.497] Adding static node node="enode://6f0093de30ab22e9d1da94693f3166baf966c54c2cbfe9129564ccb965324f44b1f7acf44b821dda673c4333217ccb6817feb8a5d8dc14f3524463890ffd01c7@52.183.74.248:22001?discport=0" TRACE[04-17|07:54:20.497] New dial task task="staticdial 6f0093de30ab22e9 52.183.74.248:22001" INFO [04-17|07:54:20.500] adding new raft peer raft id=5 TRACE[04-17|07:54:20.502] Quorum permissioning id=7020366ffb38ab6b addr=52.175.245.187:22001 conn=staticdial EnableNodePermission=false DataDir=/home/eleven01/deployment-scripts/TestNet/qdata/node1/node Current Node ID=87767cbbe9840a2d46e22152414db8fbc93952f37ce04953dee691440ba928a213512be7d55b36b9efd5fdf283bf26f645bddd9a3cc234415a652df72fa90c75 Node Name=Geth/v1.8.12-stable-4baffd64/linux-amd64/go1.9.7 Dialed Dest="enode://7020366ffb38ab6bd32648d0a3efadfb8529e5f5ee6780bd79ae3bfb85ecfaf7bed625d172fbfad283beb2ed79e79fb6b4f35b094e4419743cf3c991199267ed@52.175.245.187:22001?discport=0" Connection ID=7020366ffb38ab6b Connection String=7020366ffb38ab6bd32648d0a3efadfb8529e5f5ee6780bd79ae3bfb85ecfaf7bed625d172fbfad283beb2ed79e79fb6b4f35b094e4419743cf3c991199267ed TRACE[04-17|07:54:20.502] Node Permissioning is Disabled. id=7020366ffb38ab6b addr=52.175.245.187:22001 conn=staticdial INFO [04-17|07:54:20.502] updated cluster membership INFO [04-17|07:54:20.502] synchronizing with peer peer id=1 hash=3f5694…7b6c5d INFO [04-17|07:54:20.503] Block synchronisation started WARN [04-17|07:54:20.503] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|07:54:20.503] failed to synchronize with peer peer id=7020366ffb38ab6bd32648d0a3efadfb8529e5f5ee6780bd79ae3bfb85ecfaf7bed625d172fbfad283beb2ed79e79fb6b4f35b094e4419743cf3c991199267ed TRACE[04-17|07:54:20.503] Adding static node node="enode://5a9870aca5d5014ef251d0a0e755cd433487d83ec0ce2a94c80661e12e0790267207dee4ba61d53d7dbc9f83535019856a091407c8cf14dfb5f2f115f219131e@52.191.137.15:22001?discport=0" TRACE[04-17|07:54:20.503] New dial task task="staticdial 5a9870aca5d5014e 52.191.137.15:22001" DEBUG[04-17|07:54:20.504] Adding p2p peer name=Geth/v1.8.12-stable-... addr=52.175.245.187:22001 peers=1 TRACE[04-17|07:54:20.504] Starting protocol eth/63 id=7020366ffb38ab6b conn=staticdial DEBUG[04-17|07:54:20.504] Ethereum peer connected id=7020366ffb38ab6b conn=staticdial name=Geth/v1.8.12-stable-4baffd64/linux-amd64/go1.9.7 TRACE[04-17|07:54:20.504] connection set up id=7020366ffb38ab6b addr=52.175.245.187:22001 conn=staticdial inbound=false TRACE[04-17|07:54:20.504] Dial task done task="staticdial 7020366ffb38ab6b 52.175.245.187:22001" TRACE[04-17|07:54:20.505] Registering sync peer peer=7020366ffb38ab6b TRACE[04-17|07:54:20.508] Quorum permissioning id=87767cbbe9840a2d addr=52.175.216.141:53772 conn=inbound EnableNodePermission=false DataDir=/home/eleven01/deployment-scripts/TestNet/qdata/node1/node Current Node ID=87767cbbe9840a2d46e22152414db8fbc93952f37ce04953dee691440ba928a213512be7d55b36b9efd5fdf283bf26f645bddd9a3cc234415a652df72fa90c75 Node Name=Geth/v1.8.12-stable-4baffd64/linux-amd64/go1.9.7 Dialed Dest=nil Connection ID=87767cbbe9840a2d Connection String=87767cbbe9840a2d46e22152414db8fbc93952f37ce04953dee691440ba928a213512be7d55b36b9efd5fdf283bf26f645bddd9a3cc234415a652df72fa90c75 TRACE[04-17|07:54:20.508] Node Permissioning is Disabled. id=87767cbbe9840a2d addr=52.175.216.141:53772 conn=inbound TRACE[04-17|07:54:20.508] Rejected peer before protocol handshake id=87767cbbe9840a2d addr=52.175.216.141:53772 conn=inbound err="connected to self" TRACE[04-17|07:54:20.508] Setting up connection failed id=87767cbbe9840a2d err="connected to self" TRACE[04-17|07:54:20.513] Quorum permissioning id=6f0093de30ab22e9 addr=52.183.74.248:22001 conn=staticdial EnableNodePermission=false DataDir=/home/eleven01/deployment-scripts/TestNet/qdata/node1/node Current Node ID=87767cbbe9840a2d46e22152414db8fbc93952f37ce04953dee691440ba928a213512be7d55b36b9efd5fdf283bf26f645bddd9a3cc234415a652df72fa90c75 Node Name=Geth/v1.8.12-stable-4baffd64/linux-amd64/go1.9.7 Dialed Dest="enode://6f0093de30ab22e9d1da94693f3166baf966c54c2cbfe9129564ccb965324f44b1f7acf44b821dda673c4333217ccb6817feb8a5d8dc14f3524463890ffd01c7@52.183.74.248:22001?discport=0" Connection ID=6f0093de30ab22e9 Connection String=6f0093de30ab22e9d1da94693f3166baf966c54c2cbfe9129564ccb965324f44b1f7acf44b821dda673c4333217ccb6817feb8a5d8dc14f3524463890ffd01c7 TRACE[04-17|07:54:20.513] Node Permissioning is Disabled. id=6f0093de30ab22e9 addr=52.183.74.248:22001 conn=staticdial DEBUG[04-17|07:54:20.513] Adding p2p peer name=Geth/v1.8.12-stable-... addr=52.183.74.248:22001 peers=2 TRACE[04-17|07:54:20.513] connection set up id=6f0093de30ab22e9 addr=52.183.74.248:22001 conn=staticdial inbound=false TRACE[04-17|07:54:20.513] Dial task done task="staticdial 6f0093de30ab22e9 52.183.74.248:22001" TRACE[04-17|07:54:20.513] Starting protocol eth/63 id=6f0093de30ab22e9 conn=staticdial DEBUG[04-17|07:54:20.513] Ethereum peer connected id=6f0093de30ab22e9 conn=staticdial name=Geth/v1.8.12-stable-4baffd64/linux-amd64/go1.9.7
Hey.
There was an issue that was fixed in version 2.2.0 where if a raft node was behind more than 8192 blocks then it would not sync. Judging by your ~13000 transactions, that may be the case here.
Are you able to try with the latest version?
I was using 2.2.0 version only.
After your comment updated it to 2.2.3 but it is not resolved
logs:- INFO [04-17|10:49:38.088] updated cluster membership INFO [04-17|10:49:38.088] synchronizing with peer peer id=2 hash=3f5694…7b6c5d INFO [04-17|10:49:38.088] Block synchronisation started WARN [04-17|10:49:38.088] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:38.088] failed to synchronize with peer peer id=6b54059eed3aeb778b656822172639a93e05375039faa3eb7b69bbd42ecb77ae INFO [04-17|10:49:38.588] synchronizing with peer peer id=3 hash=3f5694…7b6c5d WARN [04-17|10:49:38.589] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:38.589] failed to synchronize with peer peer id=671590e852ff170eb966656b8961116ac7eee0eede8e4368b5daa05ce4083c30 INFO [04-17|10:49:39.089] synchronizing with peer peer id=5 hash=3f5694…7b6c5d WARN [04-17|10:49:39.089] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:39.089] failed to synchronize with peer peer id=cef1b32a656133b4226dd33b8308243b0343ef28acd8de6ef5fe82d32dd39b53 INFO [04-17|10:49:39.589] synchronizing with peer peer id=1 hash=3f5694…7b6c5d WARN [04-17|10:49:39.589] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:39.589] failed to synchronize with peer peer id=5009ceb1d4210a1b03067467155b3dc0ca75ec6f93bbba0e79bd27e7b546c987 INFO [04-17|10:49:40.089] synchronizing with peer peer id=1 hash=3f5694…7b6c5d WARN [04-17|10:49:40.090] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:40.090] failed to synchronize with peer peer id=5009ceb1d4210a1b03067467155b3dc0ca75ec6f93bbba0e79bd27e7b546c987 DEBUG[04-17|10:49:40.173] Couldn't add port mapping proto=tcp extport=22001 intport=22001 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered" INFO [04-17|10:49:40.590] synchronizing with peer peer id=2 hash=3f5694…7b6c5d WARN [04-17|10:49:40.590] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:40.590] failed to synchronize with peer peer id=6b54059eed3aeb778b656822172639a93e05375039faa3eb7b69bbd42ecb77ae INFO [04-17|10:49:41.090] synchronizing with peer peer id=3 hash=3f5694…7b6c5d WARN [04-17|10:49:41.090] Synchronisation failed, retrying err="peer is unknown or unhealthy" INFO [04-17|10:49:41.090] failed to synchronize with peer peer id=671590e852ff170eb966656b8961116ac7eee0eede8e4368b5daa05ce4083c30 INFO [04-17|10:49:41.591] synchronizing with peer peer id=5 hash=3f5694…7b6c5d
As I understand it, this node has just been restarted, with some transactions/blocks in the middle. Are you able to reproduce this with another node?
As I understand it, this node has just been restarted, with some transactions/blocks in the middle. Are you able to reproduce this with another node?
Yes, this issue is on two nodes. Discarded old network and created new raft network on quorum 2.2.3 which has 5 nodes. did around 31000 transactions. Now when i stopped all nodes and then started it. There are few issue on it as well:- I can fetch any block upto 31000 using eth.getBlock function but now all nodes are now pointing to:- blocknumber - 0 admin.peers - []
Hey @vaibhav-eleven
I've been able to reproduce the issue, so I am looking into the root cause and solution. Thanks for being patient on this.
Are you using the examples scripts?
It may be that geth is not responding well (not cleanly shutting down) on a SIGTERM signal.
Can you try shutting down using a SIGINT, either by modifying the stop.sh script or doing it yourself, please?
The change would be killall geth to killall -INT geth.
No i am not using example scripts. I am using SIGKILL on a pid to stop geth. Will change it to SIGINT and check it.
@vaibhav-eleven any update? No worries if not, just wanted to check.
SIGINT didn't change the behaviour. Issue still persist. Now i am making sure at-least 1-2 nodes are up all the time to avoid issue.
Hm okay, I'll keep investigating.
If possible, are you able to share the script that performs the shutdown? And are the nodes running inside a container like Docker?
nodes are running in virtual machine not docker.
stop script:-
#!/bin/sh
TESSERA_PORT=<port_1>
RPC_PORT=<port_2>
kill -2 ps -eaf | grep "rpcport ${RPC_PORT}" | awk '{print $2}' || true
kill -9 ps -eaf | grep address=${TESSERA_PORT} | awk '{print $2}' || true
exit 0
Thanks for confirming. I saw a issue recently for upstream where people don't wait for the application to shut down and the container force kills it, but I guess that isn't happening here.
As an extra note, I see you're still force killing Tessera. If this works for you then fine, but I would always expect data loss when force killing an application, just as an FYI if you see this in the future.
@vaibhav-eleven In quorum version 2.2.3, by any chance are you getting listening port as 0 in geth log..?
For ex:
Adding static node node="enode://fd20d78a83f0f0505ab3c5cbd9bebefd96da348cbc99d37cbe9c068d2694b84feec4b7598ad6644ad48dfefedf0029aca696a8ccbe48688681d341d9e2bf846a@172.20.236.178:0?discport=22001&raftport=22003"
Hey.
It seems the root cause is that the upgrade to 1.8.12 introduced state caching, which means that state isn't written to disk immediately.
The way raft works means it requires the state to be written before committing the raft log, meaning the data was out of sync and couldn't recover.
Setting the --gcmode=archive option should fix the issue, and we will make sure that a raft node is always started with this flag in the future.
If you could try and let me know the results, that would be great.
We also have this pull request if you wanted to try it out: https://github.com/jpmorganchase/quorum/pull/727
It overrides the --gcmode flag to set it to archive when running with Raft.