Closed dmuiX closed 6 months ago
Please could you post info about your host os/full container logs/compose info/how you're deploying swag.
of course:
host: Linux 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux
openmediavault and openmediavault-compose installed
swag.yml
version: '3'
services:
swag:
container_name: swag
image: linuxserver/swag
cap_add:
- NET_ADMIN
volumes:
- ./config:/config
env_file: swag.env
ports:
- 80:80
- 443:443
restart: unless-stopped
networks:
swag:
dockerproxy:
secrets:
- uptime_kuma_password
networks:
swag:
external: true
dockerproxy:
external: true
secrets:
uptime_kuma_password:
file: ./uptime_kuma_password # put uptime-kuma password in this file
swag.env
TZ=${TZ}
PUID=${PUID}
PGID=${PGID}
EMAIL=mail
URL=domain.org
SUBDOMAINS=wildcard
VALIDATION=dns
DNSPLUGIN=cloudflare
PROPAGATION=120
DOCKER_MODS=linuxserver/mods:swag-dashboard|linuxserver/mods:universal-stdout-logs|linuxserver/mods:swag-auto-reload|linuxserver/mods:swag-auto-uptime-kuma
LOGS_TO_STDOUT="/config/log/nginx/error.log" # universal-stdout-logs Works pretty good
WATCHLIST="/config/nginx/proxy-confs" # swag-auto-reload Works pretty good
STAGING=false
UPTIME_KUMA_USERNAME=uptime-kuma
UPTIME_KUMA_PASSWORD=/run/secrets/uptime_kuma_password
UPTIME_KUMA_URL=http://uptime-kuma:3001
I might found my error. Seems like its not possible to store docker secrets in env vars like in k8s. So I need to figure out another way to implement these secrets.
Your env is not set correctly. To set an env from a file/secret, you need to set the env with the prepend FILE__
okay thanks thougt the same thing. Is the usage of how to use secrets with these mods somewhere documented??
Each image readme has this blurb: https://github.com/linuxserver/docker-swag#environment-variables-from-files-docker-secrets
Seems like it is not supported by this mod...no UPTIME_KUMA_PASSWORD set when setting FILE__UPTIME_KUMA_PASSWORD=/run/secrets/uptime_kuma_password
And still same error when setting the UPTIME_KUMA_PASSWORD=password
correctly. So the error has nothing to do with the docker secret.
[mod-init] Attempting to run Docker Modification Logic
[mod-init] Adding linuxserver/mods:swag-dashboard to container
[mod-init] Downloading linuxserver/mods:swag-dashboard from lscr.io
[mod-init] Installing linuxserver/mods:swag-dashboard
[mod-init] linuxserver/mods:swag-dashboard applied to container
[mod-init] Adding linuxserver/mods:universal-stdout-logs to container
[mod-init] Downloading linuxserver/mods:universal-stdout-logs from lscr.io
[mod-init] Installing linuxserver/mods:universal-stdout-logs
[mod-init] linuxserver/mods:universal-stdout-logs applied to container
[mod-init] Adding linuxserver/mods:swag-auto-reload to container
[mod-init] Downloading linuxserver/mods:swag-auto-reload from lscr.io
[mod-init] Installing linuxserver/mods:swag-auto-reload
[mod-init] linuxserver/mods:swag-auto-reload applied to container
[mod-init] Adding linuxserver/mods:swag-auto-uptime-kuma to container
[mod-init] Downloading linuxserver/mods:swag-auto-uptime-kuma from lscr.io
[mod-init] Installing linuxserver/mods:swag-auto-uptime-kuma
[mod-init] linuxserver/mods:swag-auto-uptime-kuma applied to container
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Certbot: https://supporters.eff.org/donate/support-work-on-certbot
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 100
───────────────────────────────────────
using keys found in /config/keys
Variables set:
PUID=1000
PGID=100
TZ=Europe/Berlin
URL=domain.org
SUBDOMAINS=wildcard
EXTRA_DOMAINS=
ONLY_SUBDOMAINS=false
VALIDATION=dns
CERTPROVIDER=
DNSPLUGIN=cloudflare
EMAIL=mail
STAGING=false
Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
Wildcard cert for domain.org will be requested
E-mail address entered: mail
dns validation via cloudflare plugin is selected
Certificate exists; parameters unchanged; starting nginx
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
**** Applying the SWAG dashboard mod... ****
[mod-auto-uptime-kuma] Installing SWAG auto-uptime-kuma packages
**** Adding goaccess to package install list ****
**** Adding swag-auto-reload deps to package install list ****
**** libmaxminddb already installed, skipping ****
**** Applied the SWAG dashboard mod ****
[mod-auto-uptime-kuma] Successfuly installed packages
/lsiopy/bin/python3
[mod-init] **** Installing all mod packages ****
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/3) Installing goaccess (1.7.2-r1)
(2/3) Installing inotify-tools-libs (3.22.6.0-r2)
(3/3) Installing inotify-tools (3.22.6.0-r2)
Executing busybox-1.36.1-r4.trigger
OK: 198 MiB in 212 packages
[mod-init] **** Installing all pip packages ****
Requirement already satisfied: pip in /lsiopy/lib/python3.11/site-packages (23.3.1)
Requirement already satisfied: wheel in /lsiopy/lib/python3.11/site-packages (0.41.3)
Requirement already satisfied: setuptools in /lsiopy/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
Downloading setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
Downloading setuptools-68.2.2-py3-none-any.whl (807 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 807.9/807.9 kB 6.5 MB/s eta 0:00:00
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 65.5.0
Uninstalling setuptools-65.5.0:
Successfully uninstalled setuptools-65.5.0
Successfully installed setuptools-68.2.2
Looking in links: https://wheel-index.linuxserver.io/alpine-3.18/
Collecting docker
Downloading docker-6.1.3-py3-none-any.whl.metadata (3.5 kB)
Collecting uptime-kuma-api
Downloading uptime_kuma_api-1.2.1.tar.gz (43 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.6/43.6 kB 981.2 kB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: packaging>=14.0 in /lsiopy/lib/python3.11/site-packages (from docker) (23.2)
Requirement already satisfied: requests>=2.26.0 in /lsiopy/lib/python3.11/site-packages (from docker) (2.31.0)
Requirement already satisfied: urllib3>=1.26.0 in /lsiopy/lib/python3.11/site-packages (from docker) (1.26.18)
Collecting websocket-client>=0.32.0 (from docker)
Downloading websocket_client-1.6.4-py3-none-any.whl.metadata (7.7 kB)
Collecting python-socketio>=5.0.0 (from python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading python_socketio-5.10.0-py3-none-any.whl.metadata (3.2 kB)
Collecting bidict>=0.21.0 (from python-socketio>=5.0.0->python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading bidict-0.22.1-py3-none-any.whl (35 kB)
Collecting python-engineio>=4.8.0 (from python-socketio>=5.0.0->python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading python_engineio-4.8.0-py3-none-any.whl.metadata (2.3 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /lsiopy/lib/python3.11/site-packages (from requests>=2.26.0->docker) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /lsiopy/lib/python3.11/site-packages (from requests>=2.26.0->docker) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /lsiopy/lib/python3.11/site-packages (from requests>=2.26.0->docker) (2023.7.22)
Collecting simple-websocket>=0.10.0 (from python-engineio>=4.8.0->python-socketio>=5.0.0->python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading simple_websocket-1.0.0-py3-none-any.whl.metadata (1.3 kB)
Collecting wsproto (from simple-websocket>=0.10.0->python-engineio>=4.8.0->python-socketio>=5.0.0->python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Collecting h11<1,>=0.9.0 (from wsproto->simple-websocket>=0.10.0->python-engineio>=4.8.0->python-socketio>=5.0.0->python-socketio[client]>=5.0.0->uptime-kuma-api)
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 2.9 MB/s eta 0:00:00
Downloading docker-6.1.3-py3-none-any.whl (148 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.1/148.1 kB 4.5 MB/s eta 0:00:00
Downloading python_socketio-5.10.0-py3-none-any.whl (74 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.4/74.4 kB 3.8 MB/s eta 0:00:00
Downloading websocket_client-1.6.4-py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.3/57.3 kB 2.1 MB/s eta 0:00:00
Downloading python_engineio-4.8.0-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.8/56.8 kB 2.1 MB/s eta 0:00:00
Downloading simple_websocket-1.0.0-py3-none-any.whl (13 kB)
Building wheels for collected packages: uptime-kuma-api
Building wheel for uptime-kuma-api (setup.py): started
Building wheel for uptime-kuma-api (setup.py): finished with status 'done'
Created wheel for uptime-kuma-api: filename=uptime_kuma_api-1.2.1-py3-none-any.whl size=46564 sha256=69c754459e0654a3c80b4bd0082be960ab1b1b0472f8a6c6cdea33b6bcb1e065
Stored in directory: /root/.cache/pip/wheels/28/a3/72/c8b9df434aeac0f332b30e0051dfa90f1a93fcccce1a2f6783
Successfully built uptime-kuma-api
Installing collected packages: websocket-client, h11, bidict, wsproto, docker, simple-websocket, python-engineio, python-socketio, uptime-kuma-api
Successfully installed bidict-0.22.1 docker-6.1.3 h11-0.14.0 python-engineio-4.8.0 python-socketio-5.10.0 simple-websocket-1.0.0 uptime-kuma-api-1.2.1 websocket-client-1.6.4 wsproto-1.2.0
[mod-auto-uptime-kuma] Executing SWAG auto-uptime-kuma mod
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/lsiopy/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/usr/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/lsiopy/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/lsiopy/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/lsiopy/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.11/http/client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/usr/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/lsiopy/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/auto-uptime-kuma.py", line 55, in <module>
swagDocker = SwagDocker("swag.uptime-kuma")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/swagDocker.py", line 15, in __init__
self.client = docker.from_env()
^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/client.py", line 96, in from_env
return cls(
^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/client.py", line 45, in __init__
self.api = APIClient(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/api/client.py", line 197, in __init__
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
s6-rc: warning: unable to start service init-mod-swag-auto-uptime-kuma-install: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
Is your uptime kuma instance available and reachable at the address http://uptime-kuma:3001
from within SWAG? Try ping and curl to confirm
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
This is my env: DOCKER_MODS=linuxserver/mods:swag-dashboard | linuxserver/mods:universal-stdout-logs | linuxserver/mods:universal-docker | linuxserver/mods:swag-auto-proxy | linuxserver/mods:swag-auto-uptime-kuma