APIError when selfhosting asu under docker

Open
#1,670 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, docker-compose, python

Research direction

Start with the self-hosting instructions at https://github.com/openwrt/asu#run-your-own-server and the build entry point in asu/build.py around line 160, where the Podman version is requested. Reproduce the Docker-based setup and inspect why it still attempts to use /var/podman.sock. Done means the build completes through Docker without the UDS APIError.

Written by the indexing model from the issue text.

Description

Meta

OS: Debian 13 Trixie
Docker Version:

Client: Docker Engine - Community
 Version:           29.8.1
 API version:       1.56
 Go version:        go1.26.8
 Git commit:        4a63305
 Built:             Tue Sep 15 16:26:13 2026
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.8.1
  API version:      1.56 (minimum version 1.40)
  Go version:       go1.26.8
  Git commit:       464cd50
  Built:            Tue Sep 15 16:26:13 2026
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.3.6
  GitCommit:        ee2735368117d2eb259779949d5e75cdafec9761
 runc:
  Version:          1.5.1
  GitCommit:        v1.5.1-0-g8f2685a4
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Steps

Follow https://github.com/openwrt/asu#run-your-own-server with the following modifications:

  • Replace - ./podman.sock:/var/podman.sock:rw with - /var/run/docker.sock:/var/podman.sock:rw
  • Replace podman-compose commands with docker-compose

Traceback

  File "/app/.venv/lib/python3.14/site-packages/podman/api/uds.py", line 41, 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 "/app/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.14/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/usr/local/lib/python3.14/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/podman/api/uds.py", line 86, in connect
    sock.connect()
    ~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/podman/api/uds.py", line 43, in connect
    raise APIError(f"Unable to make connection to UDS '{netloc}'") from e
podman.errors.exceptions.APIError: Unable to make connection to UDS '/var/podman.sock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.14/site-packages/requests/adapters.py", line 696, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py", line 842, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/app/.venv/lib/python3.14/site-packages/urllib3/util/retry.py", line 498, in increment
    raise reraise(type(error), error, _stacktrace)
          ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.14/site-packages/urllib3/util/util.py", line 38, in reraise
    raise value.with_traceback(tb)
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    ~~~~~~~~~~~~^
        method,
        ^^^^^^^
    ...<6 lines>...
        enforce_content_length=enforce_content_length,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/app/.venv/lib/python3.14/site-packages/urllib3/connection.py", line 500, in request
    self.endheaders()
    ~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.14/http/client.py", line 1381, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/http/client.py", line 1141, in _send_output
    self.send(msg)
    ~~~~~~~~~^^^^^
  File "/usr/local/lib/python3.14/http/client.py", line 1085, in send
    self.connect()
    ~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/podman/api/uds.py", line 86, in connect
    sock.connect()
    ~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/podman/api/uds.py", line 43, 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 '/var/podman.sock'"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.14/site-packages/podman/api/client.py", line 449, in _request
    self.request(
    ~~~~~~~~~~~~^
        method.upper(),
        ^^^^^^^^^^^^^^^
    ...<7 lines>...
        **timeout_kw,
        ^^^^^^^^^^^^^
    )
    ^
  File "/app/.venv/lib/python3.14/site-packages/requests/sessions.py", line 651, in request
    resp = self.send(prep, **send_kwargs)
  File "/app/.venv/lib/python3.14/site-packages/requests/sessions.py", line 784, in send
    r = adapter.send(request, **kwargs)
  File "/app/.venv/lib/python3.14/site-packages/requests/adapters.py", line 711, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', APIError("Unable to make connection to UDS '/var/podman.sock'"))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.14/site-packages/rq/worker/base.py", line 1552, in perform_job
    return_value = job.perform()
  File "/app/.venv/lib/python3.14/site-packages/rq/job.py", line 1368, in perform
    self._result = self._execute()
                   ~~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/rq/job.py", line 1428, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/app/asu/build.py", line 508, in build
    result = _build(build_request, job)
  File "/app/asu/build.py", line 160, in _build
    log.debug(f"Podman version: {podman.version()}")
                                 ~~~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.14/site-packages/podman/client.py", line 218, in version
    return self.system.version(**kwargs)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/app/.venv/lib/python3.14/site-packages/podman/domain/system.py", line 100, in version
    response = self.client.get("/version")
  File "/app/.venv/lib/python3.14/site-packages/podman/api/client.py", line 269, in get
    return self._request(
           ~~~~~~~~~~~~~^
        "GET",
        ^^^^^^
    ...<5 lines>...
        **kwargs,
        ^^^^^^^^^
    )
    ^
  File "/app/.venv/lib/python3.14/site-packages/podman/api/client.py", line 462, in _request
    raise APIError(uri.geturl(), explanation=f"{method.upper()} operation failed") from e
podman.errors.exceptions.APIError: http://%2Fvar%2Fpodman.sock/v5.8.0/libpod/version (GET operation failed)

Docker logs

asu-server

INFO:     172.17.0.2:60096 - "GET /api/v1/overview?1790808094188 HTTP/1.1" 301 Moved Permanently
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/.versions.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/snapshots/.targets.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/25.12.5/.targets.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/24.10.8/.targets.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/23.05.6/.targets.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/22.03.7/.targets.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/21.02.7/.targets.json "HTTP/1.1 404 Not Found"
INFO:     172.17.0.2:60096 - "GET /json/v1/overview.json HTTP/1.1" 200 OK
INFO:     172.17.0.2:60096 - "GET /api/v1/overview?1790808095995 HTTP/1.1" 301 Moved Permanently
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/filogic/profiles.json "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/.versions.json "HTTP/1.1 200 OK"
INFO:     172.17.0.2:60100 - "GET /api/v1/revision/25.12.4/mediatek/filogic?1790808095996 HTTP/1.1" 200 OK
INFO:httpx:HTTP Request: GET https://downloads.openwrt.org/releases/21.02.7/.targets.json "HTTP/1.1 404 Not Found"
INFO:     172.17.0.2:60096 - "GET /json/v1/overview.json HTTP/1.1" 200 OK
INFO:     172.17.0.2:60096 - "POST /api/v1/build?1790808096215 HTTP/1.1" 500 Internal Server Error
Dominant language
Python
Stars
461
Forks
116
Avg merge
8d 30m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/asu

All issues in openwrt/asu

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.