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

Existing rootless Docker detected, but I can not use docker rootless. Only works with sudo #987

Closed
2 of 3 tasks
VasilyRakche opened this issue Apr 25, 2020 · 6 comments
Closed
2 of 3 tasks

Comments

@VasilyRakche
Copy link

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

Running docker rootless
I set it up according to the website instruction

Actual behavior

running command docker run hello-world getting output:

docker: Cannot connect to the Docker daemon at unix:///run/user/1000/docker.soc. Is the docker daemon running?.
See 'docker run --help'.

Steps to reproduce the behavior

I was getting an error after trying to run a container:
Error response from daemon: driver failed programming external connectivity on endpoint
As suggested in issue #2722 I restarted docker and it worked. However it appeared again with another image, and docker wasn't starting giving an error:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-04-25 12:40:55 CEST; 13min ago
     Docs: https://docs.docker.com
  Process: 8815 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 8815 (code=exited, status=1/FAILURE)

Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: Stopped Docker Application Container Engine.
Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: docker.service: Start request repeated too quickly.
Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 25 12:40:55 vasko-XPS-15-9560 systemd[1]: Failed to start Docker Application Container Engine.

After reading around, I decided to uninstall docker engine. Uninstalled as stated on your website and also I deleted all files connected with docker. I was able to install it again.

I followed the streps to configure rootless docker. But for some reason, now I can not run docker without sudo. With sudo it works. I then tried to execute dockerd-rootless.sh --experimental but it gave the error:

....
+ exec dockerd --experimental
INFO[2020-04-25T22:55:40.996617603+02:00] Starting up                                  
WARN[2020-04-25T22:55:40.996666611+02:00] Running experimental build                   
WARN[2020-04-25T22:55:40.996673924+02:00] Running in rootless mode. Cgroups, AppArmor, and CRIU are disabled. 
INFO[2020-04-25T22:55:40.996678871+02:00] Running with RootlessKit integration         
INFO[2020-04-25T22:55:40.997377997+02:00] libcontainerd: containerd is still running    pid=6091
INFO[2020-04-25T22:55:40.997410465+02:00] parsed scheme: "unix"                         module=grpc
INFO[2020-04-25T22:55:40.997467690+02:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2020-04-25T22:55:40.997482351+02:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock 0  <nil>}] <nil>}  module=grpc
INFO[2020-04-25T22:55:40.997492481+02:00] ClientConn switching balancer to "pick_first"  module=grpc
failed to start containerd: timeout waiting for containerd to start
[rootlesskit:child ] error: command [/home/vasko/bin/dockerd-rootless.sh --experimental] exited: exit status 1
[rootlesskit:parent] error: child exited: exit status 1

Now, if I run curl -fsSL https://get.docker.com/rootless | sh, I get output:

# Installing stable version 19.03.8
# Existing rootless Docker detected at /home/vasko/bin/dockerd
● docker.service - Docker Application Container Engine (Rootless)
   Loaded: loaded (/home/vasko/.config/systemd/user/docker.service; disabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-04-25 15:16:34 CEST; 7h ago
....

Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b7f0
 Built:             Wed Mar 11 01:22:56 2020
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///run/user/1000/docker.sock. Is the docker daemon running?

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b7f0
 Built:             Wed Mar 11 01:22:56 2020
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///run/user/1000/docker.soc. Is the docker daemon running?

Output of docker info:

Client:
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///run/user/1000/docker.soc. Is the docker daemon running?
errors pretty printing info

Additional environment details (AWS, VirtualBox, physical, etc.)
Ubuntu 18.04

@AkihiroSuda
Copy link

Maybe you need to clean up .local/share/docker and reboot

@VasilyRakche
Copy link
Author

VasilyRakche commented Apr 26, 2020

Hey, I tried, getting the same error. Can you help me with this one, I really need to set it up running properly. Give me steps to debug the problem.

@AkihiroSuda
Copy link

Does CHANNEL=nightly work? https://get.docker.com/rootless

@VasilyRakche
Copy link
Author

It worked!! Thank you a lot !

@AkihiroSuda
Copy link

Error response from daemon: driver failed programming external connectivity on endpoint

BTW this error typically happens when you tried to expose privileged ports (< 1023).
https://docs.docker.com/engine/security/rootless/#exposing-privileged-ports

@VasilyRakche
Copy link
Author

Not sure, because I wasnt intentionally messing with that.

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

2 participants