I ran geth in light mode:
go-ethereum/build/bin/geth --ws --wsaddr "127.0.0.1" --wsport "8546" --wsorigins="*" --wsapi="db,eth,net,web3,personal,web3" --light console 2> ./eth.log
Then, when I do eth.getBalance, it's always:
Error: no suitable peers available
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at
Geth version: 1.8.4-unstable
OS & Version: linux
Commit hash : 5909482fb55095b58ff3f9d8207a4daa69defe26
I tried:
--syncmode "light"
It's the same.
I'm having the same problem. Anybody have a solution?
I think it's just that you need to wait.
The syncing takes about 20 minutes.
Also make sure to pull the latest code.
This time I tried for 3 days. Still can't connect to any peers.
Having a working light wallet please... Am I asking too much?
maybe you should --fast when you run geth.
This means fast sync, but do not download the whole block.
I have the same issue in light modr, issue is that geth is clearly fully synced.
I'm trying to interact with a smart contract and call erc20 balaceOf, SOMETIMES I get no peers in my logs,sometimes it work.
How's that possible?
If you're not connected to a light server, data retrievals won't work. The only solution is to wait until a server serves you.
Although light sometimes worked without opening the ports to the public, I did eventually get this error. When I opened the ports, and restarted geth, the error went away.
Specifically I opened port 30303 TCP and also port 30303 UDP for node discovery.
Most helpful comment
I'm having the same problem. Anybody have a solution?