higlass / higlass-docker

Builds a docker container wrapping higlass-server and higlass-client in nginx
MIT License
32 stars 14 forks source link

Error connecting to the Docker daemon #158

Closed maharshi14 closed 4 years ago

maharshi14 commented 5 years ago

I have higlass-manage and docker installed and started on my Ubuntu 19.04, yet I get this error when I type higlass-manage start:

Error connecting to the Docker daemon, make sure it is started and you are logged in.

When I type, sudo systemctl status docker :

● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-10-17 13:59:13 BST; 1min 48s ago Docs: https://docs.docker.com Main PID: 1085 (dockerd) Tasks: 12 Memory: 130.6M CGroup: /system.slice/docker.service └─1085 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Oct 17 13:59:09 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:09.412072546+01:00" level=warning msg="Your kernel does not support cgroup rt runtime" Oct 17 13:59:09 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:09.412083840+01:00" level=warning msg="Your kernel does not support cgroup blkio weight" Oct 17 13:59:09 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:09.412094935+01:00" level=warning msg="Your kernel does not support cgroup blkio weight_device" Oct 17 13:59:09 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:09.412372383+01:00" level=info msg="Loading containers: start." Oct 17 13:59:11 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:11.320367476+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can Oct 17 13:59:11 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:11.675058416+01:00" level=info msg="Loading containers: done." Oct 17 13:59:12 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:12.846246031+01:00" level=info msg="Docker daemon" commit=4ba2b1c606 graphdriver(s)=overlay2 version=19.03.4-rc1 Oct 17 13:59:12 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:12.855980974+01:00" level=info msg="Daemon has completed initialization" Oct 17 13:59:13 mvm-igmm-linux-0017 dockerd[1085]: time="2019-10-17T13:59:13.091851957+01:00" level=info msg="API listen on /var/run/docker.sock"

pkerpedjiev commented 5 years ago

Would you mind trying v0.6.31?

higlass-manage stop; higlass-manage start --version v0.6.31
maharshi14 commented 5 years ago

Apologies for the late reply, but it's the same issue still :/ Permission denied

When I do 'higlass-manage stop; higlass-manage start --version v0.6.31' :

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.7/http/client.py", line 1244, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 966, in send self.connect() File "/home/s1786487/.local/lib/python3.7/site-packages/docker/transport/unixconn.py", line 43, in connect sock.connect(self.unix_socket) PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 367, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.7/http/client.py", line 1244, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 966, in send self.connect() File "/home/s1786487/.local/lib/python3.7/site-packages/docker/transport/unixconn.py", line 43, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/s1786487/.local/bin/higlass-manage", line 10, in sys.exit(cli()) File "/home/s1786487/.local/lib/python3.7/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/home/s1786487/.local/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/s1786487/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/s1786487/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/s1786487/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(args, kwargs) File "/home/s1786487/.local/lib/python3.7/site-packages/higlass_manage/stop.py", line 22, in stop client.containers.get(hm_name).stop() File "/home/s1786487/.local/lib/python3.7/site-packages/docker/models/containers.py", line 880, in get resp = self.client.api.inspect_container(container_id) File "/home/s1786487/.local/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped return f(self, resource_id, *args, *kwargs) File "/home/s1786487/.local/lib/python3.7/site-packages/docker/api/container.py", line 756, in inspect_container self._get(self._url("/containers/{0}/json", container)), True File "/home/s1786487/.local/lib/python3.7/site-packages/docker/utils/decorators.py", line 46, in inner return f(self, args, kwargs) File "/home/s1786487/.local/lib/python3.7/site-packages/docker/api/client.py", line 230, in _get return self.get(url, self._set_request_timeout(kwargs)) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied')) Error connecting to the Docker daemon, make sure it is started and you are logged in.

pkerpedjiev commented 5 years ago

This seems like a docker issue. Can you try starting a more common container? I suspect you'll get the same error.

docker run -it ubuntu:bionic bash

Might need sudo in front of the docker command? Or check up on how to run docker without sudo?

https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo

maharshi14 commented 5 years ago

Thanks for the reply, here's what I get when I run 'docker run -it ubuntu:bionic bash'

sudo docker run -it ubuntu:bionic bash [sudo] password for s1786487: Unable to find image 'ubuntu:bionic' locally bionic: Pulling from library/ubuntu 22e816666fd6: Pull complete 079b6d2a1e53: Pull complete 11048ebae908: Pull complete c58094023a2e: Pull complete Digest: sha256:a7b8b7b33e44b123d7f997bd4d3d0a59fafc63e203d17efedf09ff3f6f516152 Status: Downloaded newer image for ubuntu:bionic root@a5579dc88043:/#

pkerpedjiev commented 5 years ago

Yeah, you're getting those in higlass-manage errors because it's not running as root. Maybe try sudo higlass-manage stop && sudo higlass-manage start?