0

I ran docker-compose --verbose up -d inside a project containing a docker-compose.yml file. I got the following output:

compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.utils.config.find_config_file: Trying paths: ['/home/ubuntu/snap/docker/796/.docker/config.json', '/home/ubuntu/snap/docker/796/.dockercfg']
docker.utils.config.find_config_file: No config file found
docker.utils.config.find_config_file: Trying paths: ['/home/ubuntu/snap/docker/796/.docker/config.json', '/home/ubuntu/snap/docker/796/.dockercfg']
docker.utils.config.find_config_file: No config file found
Traceback (most recent call last):
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/snap/docker/796/lib/python3.6/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 "/snap/docker/796/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/util/retry.py", line 531, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/snap/docker/796/lib/python3.6/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/snap/docker/796/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/snap/docker/796/lib/python3.6/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 "/snap/docker/796/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.25.5', 'console_scripts', 'docker-compose')())
  File "/snap/docker/796/lib/python3.6/site-packages/compose/cli/main.py", line 72, in main
    command()
  File "/snap/docker/796/lib/python3.6/site-packages/compose/cli/main.py", line 125, in perform_command
    project = project_from_options('.', options)
  File "/snap/docker/796/lib/python3.6/site-packages/compose/cli/command.py", line 65, in project_from_options
    environment_file=environment_file
  File "/snap/docker/796/lib/python3.6/site-packages/compose/cli/command.py", line 149, in get_project
    host=host, environment=environment
  File "/snap/docker/796/lib/python3.6/site-packages/compose/cli/command.py", line 123, in get_client
    version_info = six.iteritems(client.version())
  File "/snap/docker/796/lib/python3.6/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/snap/docker/796/lib/python3.6/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/snap/docker/796/lib/python3.6/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/snap/docker/796/lib/python3.6/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/snap/docker/796/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/snap/docker/796/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/snap/docker/796/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
ubuntu@staging02:~/repo/SitesWeb$ 
1
  • It seems you have the snap version of docker installed. I would try removing and reinstalling docker for starters. If it still doesn't work, I would try installing the latest docker version, following the official documentation. Jun 7, 2021 at 8:49

1 Answer 1

1

I could be a permission issue. If not already done, add your account to the docker group or use sudo. I.e. sudo docker-compose --verbose up -d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.