DigitalSlideArchive / digital_slide_archive

The official deployment of the Digital Slide Archive and HistomicsTK.
https://digitalslidearchive.github.io
Apache License 2.0
110 stars 50 forks source link

PermisionError attempting to add CLI plugin mac m1 #257

Open MarkusDrange opened 1 year ago

MarkusDrange commented 1 year ago

Hello, we just observed something similar to https://github.com/DigitalSlideArchive/digital_slide_archive/issues/142, but as it was closed, we chose to open a new ticket.

We followed the installation setup described here. After installation, we run the command:

DSA_USER=$(id -u):$(id -g) docker-compose up

We also saw the same when attempting to add the HistomicsTK CLI plugin through the web UI.

This was observed after setting up DSA on a MacBook Ventura v13.0 with M1 chip.

@andreped on cc.

This was observed in the verbosity logs:

dsa-girder-1     | Setting histomicsui.webroot_path to 'histomics'
dsa-girder-1     | Pulling and installing slicer_cli images: ['dsarchive/histomicstk:latest']
dsa-girder-1     | Could not create the docker client
dsa-girder-1     | Traceback (most recent call last):
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
dsa-girder-1     |     httplib_response = self._make_request(
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
dsa-girder-1     |     conn.request(method, url, **httplib_request_kw)
dsa-girder-1     |   File "/.pyenv/versions/3.9.16/lib/python3.9/http/client.py", line 1285, in request
dsa-girder-1     |     self._send_request(method, url, body, headers, encode_chunked)
dsa-girder-1     |   File "/.pyenv/versions/3.9.16/lib/python3.9/http/client.py", line 1331, in _send_request
dsa-girder-1     |     self.endheaders(body, encode_chunked=encode_chunked)
dsa-girder-1     |   File "/.pyenv/versions/3.9.16/lib/python3.9/http/client.py", line 1280, in endheaders
dsa-girder-1     |     self._send_output(message_body, encode_chunked=encode_chunked)
dsa-girder-1     |   File "/.pyenv/versions/3.9.16/lib/python3.9/http/client.py", line 1040, in _send_output
dsa-girder-1     |     self.send(msg)
dsa-girder-1     |   File "/.pyenv/versions/3.9.16/lib/python3.9/http/client.py", line 980, in send
dsa-girder-1     |     self.connect()
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/transport/unixconn.py", line 30, in connect
dsa-girder-1     |     sock.connect(self.unix_socket)
dsa-girder-1     | PermissionError: [Errno 13] Permission denied
dsa-girder-1     |
dsa-girder-1     | During handling of the above exception, another exception occurred:

[...]

dsa-girder-1     | Traceback (most recent call last):
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
dsa-girder-1     |     return self.version(api_version=False)["ApiVersion"]
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/api/daemon.py", line 181, in version
dsa-girder-1     |     return self._result(self._get(url), json=True)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/utils/decorators.py", line 46, in inner
dsa-girder-1     |     return f(self, *args, **kwargs)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/api/client.py", line 237, in _get
dsa-girder-1     |     return self.get(url, **self._set_request_timeout(kwargs))
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/requests/sessions.py", line 600, in get
dsa-girder-1     |     return self.request("GET", url, **kwargs)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
dsa-girder-1     |     resp = self.send(prep, **send_kwargs)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
dsa-girder-1     |     r = adapter.send(request, **kwargs)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/requests/adapters.py", line 547, in send
dsa-girder-1     |     raise ConnectionError(err, request=request)
dsa-girder-1     | requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
dsa-girder-1     |
dsa-girder-1     | During handling of the above exception, another exception occurred:
dsa-girder-1     |
dsa-girder-1     | Traceback (most recent call last):
dsa-girder-1     |   File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 144, in jobPullAndLoad
dsa-girder-1     |     docker_client = docker.from_env(version='auto')
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/client.py", line 96, in from_env
dsa-girder-1     |     return cls(
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/client.py", line 45, in __init__
dsa-girder-1     |     self.api = APIClient(*args, **kwargs)
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/api/client.py", line 197, in __init__
dsa-girder-1     |     self._version = self._retrieve_server_version()
dsa-girder-1     |   File "/opt/venv/lib/python3.9/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
dsa-girder-1     |     raise DockerException(
dsa-girder-1     | docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
dsa-girder-1     |
dsa-girder-1     | During handling of the above exception, another exception occurred:
dsa-girder-1     |
dsa-girder-1     | Traceback (most recent call last):
dsa-girder-1     |   File "/opt/slicer_cli_web/slicer_cli_web/image_job.py", line 152, in jobPullAndLoad
dsa-girder-1     |     raise DockerImageError('Could not create the docker client')
dsa-girder-1     | slicer_cli_web.models.exceptions.DockerImageError: Could not create the docker client (image name: None )
dsa-girder-1     | Result:
dsa-girder-1     | Started to Load Docker images
dsa-girder-1     | Failed to create the Docker Client
dsa-girder-1     | Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
dsa-girder-1     | Error with job with initializing
dsa-girder-1     |  Could not create the docker client (image name: None )
dsa-girder-1     |
dsa-girder-1     | Cannot fetch slicer-cli-images.