Open efahl opened 4 days ago
After modifying update_all_targets.py
to use port 8000:
$ poetry run python3 misc/update_all_targets.py
Reloading 23.05.4
Reloading 23.05.4/kirkwood/generic
Traceback (most recent call last):
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 789, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 536, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/urllib3/connection.py", line 464, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/socket.py", line 705, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [Errno 104] Connection reset by peer
Same for curl:
$ curl -v http://localhost:8000/
* Trying 127.0.0.1:8000...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.81.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
I'm now trying to make sure the underlying pieces work, so testing redis access gives this:
$ poetry run python -c 'from asu.util import get_redis_client; c = get_redis_client(); print(c.dbsize())'
Traceback (most recent call last):
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 277, in connect
sock = self.retry.call_with_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/retry.py", line 62, in call_with_retry
return do()
^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 278, in <lambda>
lambda: self._connect(), lambda error: self.disconnect(error)
^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 639, in _connect
raise err
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 627, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/commands/core.py", line 884, in dbsize
return self.execute_command("DBSIZE", **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/client.py", line 545, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 1074, in get_connection
connection.connect()
File "/home/efahlgren/asu-venv/lib/python3.11/site-packages/redis/connection.py", line 283, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.
Checking on the port gives ambiguous results:
$ podman logs asu_redis_1
...
3:M 17 Sep 2024 13:41:34.238 * Running mode=standalone, port=6379.
$ nmap -p 6379 localhost
...
PORT STATE SERVICE
6379/tcp closed redis
I added an explicit port
section to podman-compose.yml
, and retry:
$ tail podman-compose.yml
redis:
image: "docker.io/redis/redis-stack-server"
restart: always
volumes:
- redis:/data/:rw
ports: <<<--- Added this section
- "127.0.0.1:6379:6379" <<<---
# restart pods
$ nmap -p 6379 localhost
PORT STATE SERVICE
6379/tcp open redis
$ python -c 'from asu.util import get_redis_client; c = get_redis_client(); print(c.dbsize())'
4
$ python -c 'from asu.util import get_redis_client; c = get_redis_client(); print(c.keys())'
[b'rq:workers', b'rq:workers:default', b'rq:scheduler-lock:default', b'rq:worker:da577feb552443bc8e352d01f3c945ec']
(asu-venv)
So redis appears to be working, but the server is still refusing connections.
$ podman logs asu_server_1
INFO: Started server process [2]
INFO: Waiting for application startup.
INFO:root:ASU server starting up
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
$ nmap -p 8000 localhost
PORT STATE SERVICE
8000/tcp open http-alt
$ curl -v http://localhost:8000/
* Trying 127.0.0.1:8000...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.81.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
@aparcar I've got everything working with a handful of changes, mostly in container config relating to container_sock
vs container_host
.
One last issue: where are the docker images?
podman.errors.exceptions.APIError: 500 Server Error: Internal Server Error (ghcr.io/openwrt/imagebuilder:x86-64-master: image not known)
I've tried ghcr.io
, docker.io
and quay.io
, all of which give the above error...
Running asu main at 92ee38499d24c08869739a2b2a26ae86c8c56d1c (kept up-to-date with weekly pulls).
Should I need to modify ports or container ACLs or ???