Description of bug:
Docker run command on latest Docker edge (Version 17.12.0-ce-mac45 (21669)) on MacOS fails with the following error:
$ sudo docker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/root clemahieu/rai_node /rai_node --daemon
Password:
ea29924038cf1eca3ea9ec45211fb7d194ea9d6bd53dddd9f35767968e56adc4
docker: Error response from daemon: driver failed programming external connectivity on endpoint eloquent_pasteur (53649cea89f42738f61d88198ddee3ff3a411e6611db96aff368630eeb128018): Error starting userland proxy: port is not a proto:IP:port: 'tcp:[:'.
Steps to reproduce the issue:
sudo docker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/rootDescribe the results you received:
Error message: Error starting userland proxy: port is not a proto:IP:port: 'tcp:[:'.
Describe the results you expected:
The container should start.
Additional information you deem important (e.g. issue happens only occasionally):
The latest Docker seems to have a lot of fixes for vpnkit and proxy settings. I'm guessing something got broken here.
Environment:
logs
No logs, container doesn't start.
Perhaps we could use Docker tags (and create images) to allow for :ipv4 and :ipv6 configurations. With ipv4 being used in the quick start guide instructions when running on a somebodies laptop.
As a workaround the following works:
docker run -d -p 7075:7075/udp -p 7075:7075 -p 127.0.0.1:7076:7076 -v ~:/root clemahieu/rai_node /rai_node --daemon
2. The first time it is run it will fail. However, it should have created the directory `~/Raiblocks` which has the default `config.json` inside. Edit this file and change the settings in bold.
"rpc_enable": "true",
"rpc": {
"address": "::ffff:0.0.0.0",
"port": "7076",
"enable_control": "true",
"frontier_request_limit": "16384",
"chain_request_limit": "16384"
},
Changing the address will fix the bind address issue and allow the container to start.
docker run -d -p 7075:7075/udp -p 7075:7075 -p 127.0.0.1:7076:7076 -v ~:/root clemahieu/rai_node /rai_node --daemon
$ curl -d '{ "action": "version" }' localhost:7076
{
"rpc_version": "1",
"store_version": "10",
"node_vendor": "RaiBlocks 9.0"
}
I added a note about -p 7076:7076 to https://github.com/clemahieu/raiblocks/wiki/Docker-node.
Doing -p 7076:7076 is a very bad idea! Don鈥檛 do it! Anybody on your network can now talk to your nodes RPC. Instead do -p 127.0.0.1:7076:7076
Have updated my comment above and can confirm this works on latest Docker edge.
$ docker run -d -p 7075:7075/udp -p 7075:7075 -p 127.0.0.1:7076:7076 -v ~:/root clemahieu/rai_node /rai_node --daemon
930e201f9c985cca09b18b7b0f4beacc9fbc8a7b9772405cbd84a14bfd2fa278
@sacreman works a treat, thanks mate
Most helpful comment
As a workaround the following works:
- Start the container.
2. The first time it is run it will fail. However, it should have created the directory `~/Raiblocks` which has the default `config.json` inside. Edit this file and change the settings in bold."rpc_enable": "true", "rpc": { "address": "::ffff:0.0.0.0", "port": "7076", "enable_control": "true", "frontier_request_limit": "16384", "chain_request_limit": "16384" },Changing the
addresswill fix the bind address issue and allow the container to start.