You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i try to connect to Podman with Podman-py 4.0.0 version :
$ python
>>> from podman import PodmanClient
>>> uri = "unix:///run/user/1000/podman/podman.sock"
>>> PodmanClient(base_url=uri).version()
I have the following error:
Traceback (most recent call last):
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/uds.py", line 43, in connect
super().connect(netloc)
FileNotFoundError: [Errno 2] No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/uds.py", line 88, in connect
sock.connect()
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/uds.py", line 45, in connect
raise APIError(f"Unable to make connection to UDS '{netloc}'") from e
podman.errors.exceptions.APIError: Unable to make connection to UDS '/run/user/1000/podman/podman.sock'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/uds.py", line 88, in connect
sock.connect()
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/uds.py", line 45, in connect
raise APIError(f"Unable to make connection to UDS '{netloc}'") from e
urllib3.exceptions.ProtocolError: ('Connection aborted.', APIError("Unable to make connection to UDS '/run/user/1000/podman/podman.sock'"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/client.py", line 407, in _request
self.request(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', APIError("Unable to make connection to UDS '/run/user/1000/podman/podman.sock'"))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/client.py", line 200, in version
return self.system.version(**kwargs)
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/domain/system.py", line 70, in version
response = self.client.get("/version")
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/client.py", line 239, in get
return self._request(
File "/home/nicolargo/dev/glances/venv/lib/python3.10/site-packages/podman/api/client.py", line 418, in _request
raise APIError(uri.geturl(), explanation=f"{method.upper()} operation failed") from e
podman.errors.exceptions.APIError: http://%2Frun%2Fuser%2F1000%2Fpodman%2Fpodman.sock/v4.0.0/libpod/version (GET operation failed)
Any idea ?
The text was updated successfully, but these errors were encountered:
Not sure if this is the same issue, but I ran into this too, and it was because I didn't have podman service running, I got the exact same error, but when I try podman system service --time=0 and retry I get what I expect. Similarly starting a service with systemctl --user start podman works.
Hi !
I just install a fresh Podman 3.4.4 on my Ubuntu 22.04 system:
When i try to connect to Podman with Podman-py 4.0.0 version :
I have the following error:
Any idea ?
The text was updated successfully, but these errors were encountered: