[Ethereum] Geth is stuck syncing

go-ethereumsynchronization

I'm trying to mine using Geth. Right now, it's syncing and showing:

{
  currentBlock: 3999975,
  highestBlock: 4000109,
  knownStates: 16329,
  pulledStates: 1739,
  startingBlock: 3999975
}

The Geth console just keeps saying Imported new state entries count=384 flushed=0 elapsed=1m51.659s processed=2507 pending=20431 duplicate=0 unexpected=227. The processed number keeps going up, and the pending number goes up and down. Elapsed varies between 500ms and a few minutes.

I tried leaving it for a few hours, restarting it, using --syncmode=fast, but nothing seems to work, and it's still stuck at block 3999975/4000109…

What should I do?

Edit: I restarted Geth and it increased to 4000079/4000288 within a few seconds. Restarting it again got it to 4000210/4000298, and no progress seems to happen after the "Importing new state entries" start appearing. It's now stuck at 4000210.

Best Answer

I had exactly such problem and finally found that source of problem is my system time! I simply solved the problem with enabling network time synchronization on my ubuntu with following command, and then restating geth.

timedatectl set-ntp true

Related Topic