Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image not starting #496

Closed
bbozo opened this issue Jan 15, 2018 · 9 comments
Closed

Docker image not starting #496

bbozo opened this issue Jan 15, 2018 · 9 comments

Comments

@bbozo
Copy link

bbozo commented Jan 15, 2018

Description of bug:

The error is:

$ docker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/root clemahieu/rai_node /rai_node --daemon
dffb8401f8f88c2d1abf2e14ed8cd2b1b603a3afe9662ecf6c2ae63f4c298d66
$ docker logs dffb8401f8f88c2d1abf2e14ed8cd2b1b603a3afe9662ecf6c2ae63f4c298d66
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  bind: Cannot assign requested address

I tried:

  1. checking if there's something running on the host on 7075/7076 (lsof|grep -e 7075 -e 7076)
  2. IPv4: running the docker run with a 127.0.0.1 instead of [::1]
  3. removing the portmapping command completely

all without a change in the error message, suspect is something in the docker image

Steps to reproduce the issue:

  1. follow instructions here with current images on Ubuntu 16.04.3 LTS and docker version and kernel per spec

Describe the results you received:

Error above :-)

Describe the results you expected:

A running node :-)

Additional information you deem important (e.g. issue happens only occasionally):

Issue happens every time

Environment:

logs

No RaiBlocks logs, fails at docker startup

@bbozo bbozo changed the title Docker Docker image not starting Jan 15, 2018
@cryptocode
Copy link
Contributor

Duplicate of #407

@mobymolly
Copy link

IPv6 is required to run a RaiBlocks node.
Make sure your box has an IPv6 adapter and that you can ping an IPv6 address (try the command ping6 ::1). You also need to edit the config.json file to allow RPC after first starting the container, then restart the container. Perhaps you would find this guide useful. https://www.reddit.com/r/RaiBlocks/comments/7qfeq4/guide_spin_up_your_own_raiblocks_representative/

@bbozo
Copy link
Author

bbozo commented Jan 15, 2018

Thanks :-D IPv6 works for me, yet the docker doesn't work, will check on the new guide :-) It's possible because I tried to run it without sudo privileges - assuming the node should not need any root-granted super-powers - which should be much more secure, I'll investigate

Also, perhaps making the docker capable of running without sudo, maybe make it a separate ticket?

@PlasmaPower
Copy link
Contributor

No, the docker daemon runs as root regardless of what you run the docker CLI as. On some systems, your user is in the docker group, which means you don't need sudo. Regardless, root is not the problem here.

@bbozo
Copy link
Author

bbozo commented Jan 16, 2018 via email

@PlasmaPower
Copy link
Contributor

PlasmaPower commented Jan 16, 2018

No, I'm saying there's no difference between running the CLI as root or not as root. Docker is being run as root irregardless. From the Arch Linux wiki:

Warning: Anyone added to the docker group is root equivalent. More information here and here.

As you can see, you aren't using sudo, but you're root equivalent anyway. Using docker essentially elevates you to root.

@orhanhenrik
Copy link
Contributor

You need to change the bind address in config.json as described in the wiki

@imerkle
Copy link

imerkle commented Jan 26, 2018

same error docker starts then stops after a while giving that error changed the config.json too

@averissimo
Copy link

What solved for me was to bind to ipv6 in docker command, specifically in the docker-compose.yml

  • adding enable_ipv6: true and ipv6 subnet
  • exposing ports 7075:7075/tcp 7075:7075/udp and ::1:7076:7076/tcp

This wiki command led me to the solution: (from Docker node)

sudo docker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/root nanocurrency/nano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants