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.