This post is a quick tip for anyone encountering a problem updating the Ethereum Blockchain because the Ethereum node is not finding peers, if you want to instead find out what Ethereum is then you are best reading up on the official site for now.
So your Ethereum node is getting stuck whilst looking for peers and is not adding new blocks? This started happening to me even though it had previously been working for weeks. This screen could literally show for hours.
After a lot of digging it turns out that the reason for this was because my computers time had become otu of sync with the network as I’d turned off the “Set time zone automatically using current location” setting whilst traveling.
How to Make Your Ethereum Node Find Peers…
Whilst you can turn the above setting back on, in my case it didn’t work immediately and instead the solution was to manually sync the clock via the process ntpdate. Open up a Terminal window and type the following commands (you may need to type in your Macs login password as this is an admin command):
$ sudo systemsetup -getnetworktimeserver
This will return a domain name such as time.apple.com which you can then use in the following command:
$ sudo ntpdate -u “time.apple.com”
The above syncs your clock with a central timeserver which then enables you to connect with other peers. The official Ethereum Wiki states this is a common problem when experiencing trouble connecting to nodes:
“An accurate clock is required to participate in the Ethereum network. Check your OS for how to resync your clock (example sudo ntpdate -s time.nist.gov) because even 12 seconds too fast can lead to 0 peers.”
I hope someone else finds this article useful and it saves some time in hunting down your fix 🙂