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

--net=host error: unable to remount sys readonly #6887

Closed
leth opened this issue Jul 7, 2014 · 11 comments
Closed

--net=host error: unable to remount sys readonly #6887

leth opened this issue Jul 7, 2014 · 11 comments

Comments

@leth
Copy link
Contributor

leth commented Jul 7, 2014

Using the default execution driver I get the following error on Linux Mint 17:

$ docker run -ti --net=host ubuntu:14.04 /bin/bash --login
2014/07/07 16:43:02 unable to remount sys readonly: unable to mount sys as readonly max retries reached

Changing to the lxc backend fixes it.

$ docker --version
Docker version 1.0.1, build 990021a
@gpabdo
Copy link

gpabdo commented Jul 8, 2014

Mind posting how you switched to the lxc backend?
Thanks

@leth
Copy link
Contributor Author

leth commented Jul 8, 2014

Use the -e lxc parameter to the docker daemon.
NB: you must have lxc installed.

Run echo 'DOCKER_OPTS="$DOCKER_OPTS -e lxc"' | sudo tee -a /etc/default/docker > /dev/null then restart the docker daemon.

@gpabdo
Copy link

gpabdo commented Jul 8, 2014

Thanks! That worked, big help.

@soichih
Copy link

soichih commented Jul 9, 2014

I am having the same problem on Ubuntu 14.04 / docker 1.1.0.

I've added the DOCKER_OPTS="-e lxc" on my /etc/default/docker, but after that docker seems to be dying right after it's started.

root@ubuntu13-work:/var/log# service docker restartstop: Unknown instance:
docker start/running, process 7362
root@ubuntu13-work:/var/log# service docker status
docker stop/waiting
root@ubuntu13-work:/var/log# ps -ef | grep docker
root 7871 5001 0 12:14 pts/10 00:00:00 grep --color=auto docker

@leth
Copy link
Contributor Author

leth commented Jul 9, 2014

Check you have lxc installed, and try rebooting

Sent from my phone. Please excuse my brevity.

@soichih
Copy link

soichih commented Jul 9, 2014

I've installed lxc and it started working. Thanks!

I've followed the installation guide posted here > https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit

It looks like this doc should be updated.

@leth
Copy link
Contributor Author

leth commented Jul 9, 2014

lxc isn't needed unless you choose to run the lxc backend.
IMO you should be able to use --net=host with the default backend (libcontainer iirc); so you don't need lxc.

@leth leth changed the title unable to remount sys readonly --net=host error: unable to remount sys readonly Jul 24, 2014
@unclejack
Copy link
Contributor

This has been fixed by a libcontainer update and the fix is on master. The fix for this issue will be included in the upcoming release.

@leth
Copy link
Contributor Author

leth commented Jul 29, 2014

Awesome, thanks!

@leth
Copy link
Contributor Author

leth commented Aug 19, 2014

@unclejack Is this fix released yet? I'm still seeing this issue on Docker version 1.1.2, build d84a070

@unclejack
Copy link
Contributor

@leth No, it hasn't been released yet, but there's an upcoming release which will contain this fix (including many other fixes and improvements).

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

4 participants