Nano-node: Error starting Docker rai_node on latest Docker edge version

Created on 16 Jan 2018  路  6Comments  路  Source: nanocurrency/nano-node

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:

  1. Install Docker Edge on MacOS
  2. Run sudo docker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/root

Describe 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:

  • OS: MacOS Sierra
  • Node version: clemahieu/rai_node:latest
  • (docker node): Docker version 17.12.0-ce, build c97c6d6

logs

No logs, container doesn't start.

Most helpful comment

As a workaround the following works:

  1. Start the container.
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.

  1. Once the config.json is saved run the container for the 2nd time and it should start and stay running.
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
  1. Test the RPC endpoint bound to the ipv4 address.
$ curl -d '{ "action": "version" }' localhost:7076
{
    "rpc_version": "1",
    "store_version": "10",
    "node_vendor": "RaiBlocks 9.0"
}

All 6 comments

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:

  1. Start the container.
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.

  1. Once the config.json is saved run the container for the 2nd time and it should start and stay running.
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
  1. Test the RPC endpoint bound to the ipv4 address.
$ 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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cryptocode picture cryptocode  路  4Comments

henry701 picture henry701  路  5Comments

BitDesert picture BitDesert  路  6Comments

frankh picture frankh  路  3Comments

qwahzi picture qwahzi  路  6Comments