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

Sync not starting #22195

Closed
itzmashy opened this issue Jan 20, 2021 · 7 comments
Closed

Sync not starting #22195

itzmashy opened this issue Jan 20, 2021 · 7 comments
Labels

Comments

@itzmashy
Copy link

Trying to sync db

geth --datadir=C:/Eth/db --networkid 2061 --port 30305 --nodiscover --rpc --rpcaddr 127.0.0.1 --rpcport 8505 --ipcpath=C:/Eth/db/geth.ipc --syncmode "light"

been stuck over an hour at:

INFO [01-19|22:26:11.679] Loaded most recent local header number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y9mo2w
INFO [01-19|22:26:11.686] Configured checkpoint registrar address=0x9a9070028361F7AAbeB3f2F2Dc07F82C4a98A02a signers=5 threshold=2
INFO [01-19|22:26:11.692] Starting peer-to-peer node instance=Geth/v1.9.25-stable-e7872729/windows-386/go1.15.6
INFO [01-19|22:26:11.717] IPC endpoint opened url=\.\pipe\C:/Eth/db/geth.ipc
INFO [01-19|22:26:11.717] New local node record seq=5 id=4772980391271bfe ip=127.0.0.1 udp=0 tcp=30305
INFO [01-19|22:26:11.720] HTTP server started endpoint=127.0.0.1:8505 cors= vhosts=localhost
INFO [01-19|22:26:11.726] Started P2P networking self="enode://05aaaae26219aecd7012b3fc69edd1a7dbe4c39bc41b824e61287aa57e9ba7380e08eb05b1cf20a4972dbfc3182277026796ec7a45c9eecba9657ff635b4c77b@127.0.0.1:30305?discport=0"
WARN [01-19|22:26:11.730] Light client mode is an experimental feature
INFO [01-19|22:26:11.740] Mapped network port proto=tcp extport=30305 intport=30305 interface=NAT-PMP(192.168.50.1)

I've tried multiple times and it's always stuck ... what am i doing?

@ligi ligi added the area:les label Jan 20, 2021
@holiman
Copy link
Contributor

holiman commented Jan 20, 2021

I've tried multiple times and it's always stuck

Well, several things.

  • You're using --networkid 2061, which means incompatible with the rest of all regular nodes, so the only peers you can ever connect with are other peers using that exact network id.
  • You've also disabled discovery with --nodiscover, so it won't actively search for any peers.
  • You're node also seems to be behind a NAT, so external nodes can't connect to it, only peers on the same internal network

The only way to get something to happen would be to manually configure other nodes with the same network id (and behind the same NAT) and make them connect to your node.

@itzmashy
Copy link
Author

itzmashy commented Jan 20, 2021

yeah totally fair, i haven't sync'd for two years and all the commands have changed, and i have had a heck of a time trying to figure out how to even launch console haha

what network id should i use, and should i remove no discover?

ty for your help! @holiman

@itzmashy
Copy link
Author

@holiman you're a genius :) i changed my command:

geth --datadir=C:/Eth/db --port 30305 --rpc --rpcaddr 127.0.0.1 --rpcport 8505 --ipcpath=C:/Eth/db/geth.ipc --syncmode "light"

and now...

INFO [01-20|00:24:30.327] Block synchronisation started
INFO [01-20|00:24:33.217] Looking for peers peercount=1 tried=15 static=0
INFO [01-20|00:24:34.360] Generating ethash verification cache epoch=377 percentage=33 elapsed=3.000s

thank you, friend.

@itzmashy
Copy link
Author

@holiman , dumb follow up question if you don't mind (please bear with me, as I mentioned it's been a while), once i'm done syncing, will i be able to run commands in this window? is this the console? or do i need to launch the console in a separate window to actually interact with my wallet? And if so, how do i do that?

thanks again!

@holiman
Copy link
Contributor

holiman commented Jan 20, 2021

If you want to run in the same window, use

geth --datadir=C:/Eth/db --port 30305 --rpc --rpcaddr 127.0.0.1 --rpcport 8505 --ipcpath=C:/Eth/db/geth.ipc --syncmode "light" console

If you want to use a separate one, use

geth attach C:/Eth/db/geth.ipc

If memory serves me right, there might be some windows-quirk with named pipes, IIRC, and you may have to actually use something like

geth attach \\.\pipe\C:/Eth/db/geth.ipc

@itzmashy
Copy link
Author

@holiman thanks again for your help!
i haven't been able to successfully attach :( lmk if i should open a new issue but when i run

geth attach C:/Eth/db/geth.ipc
i get Fatal: Unable to attach to remote geth: no known transport for URL scheme "c"

if i do geth attach \.\pipe\C:/Eth/db/geth.ipc

Fatal: Unable to attach to remote geth: parse "\\.\pipe\C:/Eth/db/geth.ipc": first path segment in URL cannot contain colon

my sync is still running in the same window

i tried this in another window: geth --datadir=C:/Eth/db --port 30305 --rpc --rpcaddr 127.0.0.1 --rpcport 8505 --ipcpath=C:/Eth/db/geth.ipc console

got:
INFO [01-20|09:01:29.641] Starting Geth on Ethereum mainnet...
INFO [01-20|09:01:29.645] Bumping default cache on mainnet provided=1024 updated=4096
WARN [01-20|09:01:29.648] Lowering memory allowance on 32bit arch available=32682 addressable=2048
WARN [01-20|09:01:29.651] Sanitizing cache to Go's GC limits provided=4096 updated=682
INFO [01-20|09:01:29.655] Maximum peer count ETH=50 LES=0 total=50
WARN [01-20|09:01:29.658] The flag --rpc is deprecated and will be removed in the future, please use --http
WARN [01-20|09:01:29.662] The flag --rpcaddr is deprecated and will be removed in the future, please use --http.addr
WARN [01-20|09:01:29.666] The flag --rpcport is deprecated and will be removed in the future, please use --http.port
Fatal: Failed to create the protocol stack: datadir already used by another process

and yes i'm using cmd in windows

@itzmashy
Copy link
Author

i submitted new issue just in case: #22201

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

No branches or pull requests

3 participants