1

I get this -

~/blockchain/digi$ geth attach http://35.197.193.182:8506 Fatal: Failed to start the JavaScript console: api modules: Post http://35.197.193.182:8506: context deadline exceeded ~/blockchain/digi$ geth attach http://10.154.0.3:8506 Fatal: Failed to start the JavaScript console: api modules: Post http://10.154.0.3:8506: context deadline exceeded

I want to remotely connect to a geth node.

Here is the connection instance on the cloud server -

nohup geth --datadir node6/ --syncmode 'full' --port 30316 --rpc --rpcaddr '0.0.0.0' --rpcport 8506 --rpccorsdomain "*" --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://739f2c03c2378b1335bbdff6f8fff481339224b9bb6dccf2799a8075c450871fa40057c42c10de0703e2637514537b1a7d129177f452e9d719e7832cde55fbd7@10.154.0.2:30310' --networkid 1520 --gasprice '1' -unlock 'f39995b718ae7a0075557f9781425b92fd8b28a6' --password node6/password.txt --mine &

Any ideas about the cause and solution?

This is the netstat -

tcp 0 0 instance-3.c.inbo:53150 instance-2.c.inbo:30315 ESTABLISHED tcp 0 0 instance-3.c.inbo:51026 instance-2.c.inbo:30312 ESTABLISHED tcp6 0 0 [::]:30316
[::]:* LISTEN tcp6 0 0 [::]:30317
[::]:* LISTEN tcp6 0 0 [::]:http
[::]:* LISTEN tcp6 0 0 [::]:ssh
[::]:* LISTEN tcp6 0 0 [::]:8506
[::]:* LISTEN tcp6 0 0 instance-3.c.inbo:30317 instance-3.c.inbo:34388 ESTABLISHED udp
0 0 *:bootpc :
udp 0 0 instance-3.c.inboun:ntp :
udp 0 0 localhost:ntp :
udp 0 0 *:ntp :
udp6 0 0 [::]:30316 [::]:*
udp6 0 0 [::]:30317 [::]:*
udp6 0 0 fe80::4001:aff:fe9a:ntp [::]:*
udp6 0 0 ip6-localhost:ntp [::]:*

1

The error says that the request timed out. I think it's most probably an issue with your firewall config.

In order to debug it, try to:

  1. geth attach http://localhost:8506 from the machine itself to check that the service is actually started
  2. geth attach http://35.197.193.182:8506 from the machine itself to check that the service listens on the internet facing interface
  3. If above works, try to telnet 35.197.193.182 8506 from the remote machine and make sure it opens the connection. If it doesn't, it's the firewall. If it connects, the geth attach http://35.197.193.182:8506 should also work.
  • localhost works but not the full IP address. Is there a link for a firewall config? – Trevor Oakley Apr 27 '18 at 9:01
  • there should be articles/tutorials for configuring the firewall for your specific OS. Also, if the machine is in a cloud (like AWS), the cloud itself might block all the ports by default. You should be able to open them from their dashboard. – Tudor Constantin Apr 27 '18 at 12:15
0

On AWS, you need to configure your firewall rules in the EC2 instance configuration panel to open the ports you configure geth to use. The standard ports to open are 30303 for p2p connections, and your RPC port.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.