Skip to content
This repository has been archived by the owner on Jun 11, 2018. It is now read-only.

Stuck on finding peers -> hw clock needed syncing for geth to work #33

Closed
scottc opened this issue Jan 17, 2017 · 5 comments
Closed

Stuck on finding peers -> hw clock needed syncing for geth to work #33

scottc opened this issue Jan 17, 2017 · 5 comments

Comments

@scottc
Copy link

scottc commented Jan 17, 2017

Stuck on finding peers -> hw clock needed syncing for geth to work

I'm on archlinux 64bit

Got stuck on "finding peers", looking at the logs from within AKASHA there was nothing obvious.

I decided to install and run geth independently to see if there was any issues preventing it from syncing, this is what i got from stdout:

anon% geth
I0117 18:47:44.143805 cmd/utils/flags.go:607] WARNING: No etherbase set and no accounts found as default
I0117 18:47:44.143875 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/anon/.ethereum/geth/chaindata
I0117 18:47:44.148571 ethdb/database.go:176] closed db:/home/anon/.ethereum/geth/chaindata
I0117 18:47:44.149137 node/node.go:176] instance: Geth/v1.5.7-stable/linux/go1.7.4
I0117 18:47:44.149166 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/anon/.ethereum/geth/chaindata
I0117 18:47:44.157687 eth/backend.go:191] Protocol Versions: [63 62], Network Id: 1
I0117 18:47:44.453134 eth/backend.go:209] WARNING: Wrote default ethereum genesis block
I0117 18:47:44.453233 eth/backend.go:219] Chain config: {ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000}
I0117 18:47:44.453459 core/blockchain.go:217] Last header: #0 [d4e56740…] TD=17179869184
I0117 18:47:44.453469 core/blockchain.go:218] Last block: #0 [d4e56740…] TD=17179869184
I0117 18:47:44.453475 core/blockchain.go:219] Fast block: #0 [d4e56740…] TD=17179869184
I0117 18:47:44.453990 p2p/server.go:340] Starting Server
I0117 18:47:46.576598 p2p/discover/udp.go:227] Listening, enode://8794ba448085bb4d8bd62e357fa55fd2381ce6668ade971cac9bbd658eaaadcc079136c135dafa8c84743afc3f1eb231a3c8222b8f9393412a40e5d10d0cb20f@203.213.95.12:30303
I0117 18:47:46.576825 p2p/server.go:608] Listening on [::]:30303
I0117 18:47:46.579045 node/node.go:341] IPC endpoint opened: /home/anon/.ethereum/geth.ipc
I0117 18:47:46.636303 p2p/nat/nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using UPNP IGDv1-IP1
I0117 18:47:46.696946 p2p/nat/nat.go:111] mapped network port tcp:30303 -> 30303 (ethereum p2p) using UPNP IGDv1-IP1
I0117 18:48:19.493669 p2p/discover/ntp.go:58] --------------------------------------------------------------------------------
I0117 18:48:19.493694 p2p/discover/ntp.go:59] System clock seems off by -28.317203674s, which can prevent network connectivity
I0117 18:48:19.493705 p2p/discover/ntp.go:60] Please enable network time synchronisation in system settings
I0117 18:48:19.493715 p2p/discover/ntp.go:61] --------------------------------------------------------------------------------

So, the issue was my hwclock was 30 seconds too slow to be able to connect with peers.

I synced my hwclock.

anon% sudo ntpd -qg
17 Jan 18:51:25 ntpd[9303]: ntpd 4.2.8p9@1.3265-o Sat Nov 26 17:04:19 UTC 2016 (1): Starting
17 Jan 18:51:25 ntpd[9303]: Command line: ntpd -qg
17 Jan 18:51:25 ntpd[9303]: proto: precision = 0.098 usec (-23)
17 Jan 18:51:25 ntpd[9303]: Listen and drop on 0 v6wildcard [::]:123
17 Jan 18:51:25 ntpd[9303]: Listen and drop on 1 v4wildcard 0.0.0.0:123
17 Jan 18:51:25 ntpd[9303]: Listen normally on 2 lo 127.0.0.1:123
17 Jan 18:51:25 ntpd[9303]: Listen normally on 3 eno1 192.168.1.103:123
17 Jan 18:51:25 ntpd[9303]: Listen normally on 4 lo [::1]:123
17 Jan 18:51:25 ntpd[9303]: Listen normally on 5 eno1 [fe80::dd92:d99a:3915:44e7%2]:123
17 Jan 18:51:25 ntpd[9303]: Listening on routing socket on fd #22 for interface updates
17 Jan 18:52:03 ntpd[9303]: ntpd: time set +28.317958 s
ntpd: time set +28.317958s

And now geth was able to sync

anon% geth                 
I0117 18:52:50.433168 cmd/utils/flags.go:607] WARNING: No etherbase set and no accounts found as default
I0117 18:52:50.433246 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/anon/.ethereum/geth/chaindata
I0117 18:52:50.540111 ethdb/database.go:176] closed db:/home/anon/.ethereum/geth/chaindata
I0117 18:52:50.540577 node/node.go:176] instance: Geth/v1.5.7-stable/linux/go1.7.4
I0117 18:52:50.540608 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/anon/.ethereum/geth/chaindata
I0117 18:52:50.553699 eth/backend.go:191] Protocol Versions: [63 62], Network Id: 1
I0117 18:52:50.553968 eth/backend.go:219] Chain config: {ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000}
I0117 18:52:50.554372 core/blockchain.go:217] Last header: #0 [d4e56740…] TD=17179869184
I0117 18:52:50.554389 core/blockchain.go:218] Last block: #0 [d4e56740…] TD=17179869184
I0117 18:52:50.554399 core/blockchain.go:219] Fast block: #0 [d4e56740…] TD=17179869184
I0117 18:52:50.555127 p2p/server.go:340] Starting Server
I0117 18:52:52.683389 p2p/discover/udp.go:227] Listening, enode://8794ba448085bb4d8bd62e357fa55fd2381ce6668ade971cac9bbd658eaaadcc079136c135dafa8c84743afc3f1eb231a3c8222b8f9393412a40e5d10d0cb20f@203.213.95.12:30303
I0117 18:52:52.683583 p2p/server.go:608] Listening on [::]:30303
I0117 18:52:52.686024 node/node.go:341] IPC endpoint opened: /home/anon/.ethereum/geth.ipc
I0117 18:52:52.708787 p2p/nat/nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using UPNP IGDv1-IP1
I0117 18:52:52.742865 p2p/nat/nat.go:111] mapped network port tcp:30303 -> 30303 (ethereum p2p) using UPNP IGDv1-IP1
I0117 18:53:02.683851 eth/downloader/downloader.go:326] Block synchronisation started
I0117 18:53:08.263951 core/blockchain.go:1064] imported    2 blocks,     0 txs (  0.000 Mg) in 855.200ms ( 0.000 Mg/s). #2 [88e96d45… / b495a1d7…]
I0117 18:53:09.315920 core/blockchain.go:1064] imported   34 blocks,     0 txs (  0.000 Mg) in  52.660ms ( 0.000 Mg/s). #36 [3d612266… / 5f81bfa6…]
I0117 18:53:10.683718 core/blockchain.go:1064] imported   34 blocks,     0 txs (  0.000 Mg) in  44.497ms ( 0.000 Mg/s). #70 [0ee49bf8… / 54cde713…]

Then I terminated geth and started AKASHA back up and it managed to "find peers", and is now syncing correctly.

Probably worth adding to the FAQ and handling this scenario with an error message.

Edit: fully sync'd, no futher issues after hwclock sync, amazing dapp.

@luclu
Copy link

luclu commented Jan 17, 2017

In Mist we currently use https://github.com/fjl/os-timesync to check for NTP sync and warn the user.

@alkemixer
Copy link

I am having this same problem, my Win 7 computer is set to auto sync with network time.nist.gov and I've updated just to make sure. Have started and restarted, uninstalled and reinstalled several times. But "Synchronizing" "Finding peers" just sits.

14:17:16
connection to ipc Established!

info
14:17:16
I0121 14:17:16.661500 node/node.go:341] IPC endpoint opened: \.\pipe\C:\Users\User\AppData\Roaming\Ethereum\akasha-alpha\geth.ipc

info
14:17:16
I0121 14:17:16.659500 whisper/whisperv2/whisper.go:176] Whisper started I0121 14:17:16.660500 p2p/server.go:608] Listening on [::]:30303

info
14:17:16
I0121 14:17:16.610500 p2p/discover/udp.go:227] Listening, enode://6c287e6eaeb5b89e1e5091ed24427081e69f575988f0be27a61d5a762b4c9c1ff1fddcece5bd0b56d3dcd172278b62b89292600716deb034ddb2551c5f3e7c66@0.0.0.0:30303

info
14:17:14
I0121 14:17:14.491500 p2p/server.go:340] Starting Server

info
14:17:14
I0121 14:17:14.491500 core/blockchain.go:216] Last header: #0 [6577484f…] TD=131072 I0121 14:17:14.491500 core/blockchain.go:217] Last block: #0 [6577484f…] TD=131072 I0121 14:17:14.491500 core/blockchain.go:218] Fast block: #0 [6577484f…] TD=131072

info
14:17:14
I0121 14:17:14.490500 eth/backend.go:219] Chain config: {ChainID: 0 Homestead: 10 DAO: DAOSupport: false EIP150: EIP155: EIP158: }

info
14:17:14
I0121 14:17:14.490500 eth/backend.go:191] Protocol Versions: [63 62], Network Id: 511337

info
14:17:14
I0121 14:17:14.406500 node/node.go:176] instance: Geth/v1.5.6-stable-2a609af5/windows/go1.7.4 I0121 14:17:14.406500 ethdb/database.go:83] Allotted 512MB cache and 1024 file handles to C:\Users\User\AppData\Roaming\Ethereum\akasha-alpha\geth\chaindata

info
14:17:14
I0121 14:17:14.405500 ethdb/database.go:176] closed db:C:\Users\User\AppData\Roaming\Ethereum\akasha-alpha\geth\chaindata

info
14:17:14
I0121 14:17:14.377500 ethdb/database.go:83] Allotted 512MB cache and 1024 file handles to C:\Users\User\AppData\Roaming\Ethereum\akasha-alpha\geth\chaindata

info
14:17:14
I0121 14:17:14.377500 cmd/utils/flags.go:612] WARNING: No etherbase set and no accounts found as default

info
14:17:13

@Kuurusch
Copy link

Kuurusch commented Feb 6, 2017

Ok, I work on OSX 10.12.3 and have also the problem that it stucks in finding peers. "View details" Button shows a blank white page.

@Kuurusch
Copy link

Still the same behaviour with the 0.5.0 release!

@Kuurusch
Copy link

Okdoky, now with the version 0.5.2 my problem is solved! Thanks!

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

No branches or pull requests

5 participants