4

I am trying to create a private distributed network using Docker containers on Virtual Machines running ubuntu.

When I run:

bootnode --genkey $KEY_FILE --writeaddress
bootnode --nodekey $KEY_FILE --addr :30301 --nat extip:$MY_IP

either on the docker container (exposing ports 8454, 30303, 30301:30301 and 30301:30301/udp) or outside of it, if I run telnet <VM-BOOTNODE-IP> 30301 I get telnet: Unable to connect to remote host: Connection refused as reponse. If I create the bootnode NOT on a docker container sudo netstat -tulpn | grep 30301 responds with

udp6       0      0 :::30301          :::*                      */bootnode   

However, when I create in the container mapping the ports sudo netstat -tulpn | grep 30301 responds with

tcp6       0      0 :::30301          :::*          LISTEN      */docker-proxy 
udp6       0      0 :::30301          :::*                      */docker-proxy

Either way I get the same "Unable to connect to remote host" error with telnet. I believe it is because the bootnode's address is unreachable that the other nodes cannot be discovered.

Just to be clear: I am using the same genesis file with a particular networkId and GEN_NONCE on all VMs. My nodes are using --nodiscover (discovery port = 0) and they are listening on 30303. Using verbose level 9 on the bootnode container shows no ping/pong as suggested here.

4

Well, apparently the reason why the connection is being refused is that "'Connection refused' is ok for the Go bootnode. [as i]t does not accept TCP connections", as suggested by fjl in the go-ethereum issue 380

Discovery uses UDP as protocol. If you want to test if it's working properly, use netcat -u -z -v <PUB-IP> 30301 instead.

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.