5

I created a private test network using Puppeth and two nodes using Geth:

geth account new --datadir node1
geth account new --datadir node2

geth init mynetwork.json --datadir node1
geth init mynetwork.json --datadir node2

geth --datadir node1 --mine --miner.threads 1
geth --datadir node2 --port 30304 --rpc --bootnodes "enode://<enode address from node1>@127.0.0.1:30303"

Both nodes start up normally (AFAI can tell), but they stay "Looking for peers". The only warnings shown are "Sanitizing cache to Go's GC limits", "The flag --rpc is deprecated and will be removed in the future, please use --http" and "Upgrade blockchain database version from= to=7".

I've run the exact same commands previously and was able to mine, but after stopping and restarting the nodes they just continually look for peers. The peercount jumps between 0 and 3, but typically it will show peercount=1.

I've tried deleting the network (~/.puppeth/mynetwork) (and the nodes) and creating a new one using the same steps, and sometimes it will work (i.e. the mining node will mine successfully (I've verified this using the MyCrypto desktop app)), but the last two times I've gone through the same steps I get the aforementioned result (Looking for peers).

I do have a firewall (the basic Mac OSX firewall), but it does not "Block all connections" and does "Automatically allow built-in software to receive incoming connections", if that's relevant, and I haven't changed the firewall settings since before when the nodes did mine.

At geth not connecting to bootnodes on private test network someone suggests syncing the nodes using sudo ntpdate -s time.nist.gov. I don't have ntpdate, so I tried systemsetup -setnetworktimeserver time.nist.gov, but that didn't seem to fix anything.

I'm stuck! Like I said, it has worked before (viz. yesterday) with the same setup. Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.