Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] "chmod: changing permissions of '/XXX': Bad address" error message #514

Open
1 task done
Flyingfufu opened this issue Oct 20, 2024 · 62 comments
Open
1 task done
Labels
bug Something isn't working upstream issue work-in-progress Stale exempt

Comments

@Flyingfufu
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

During swag container start, several chmod error message appear in the log. I've checked all related file and folder permission and find them all correct for the user.

However, SWAG proxy seems to be working fine and proxied container are reachable as expected

Not really sure when the issue started as I saw it few days ago only, but can confirm the issue was not there few months ago, with the same config.

Expected Behavior

start without error message.

Steps To Reproduce

Happens at every start.

Environment

- OS: QNAP Server
- How docker service was installed: docker compose

CPU architecture

x86-64

Docker creation

services:

# Swag proxy installation
  swag:
    container_name: swag  
    image: linuxserver/swag:latest
    ports:
      - 35443:443
      - 35080:80
      - 35082:81             # Dashboard

    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - URL=xxxxx
      - SUBDOMAINS=wildcard
      - VALIDATION=dns
      - DNSPLUGIN=xxxxx
      - EMAIL=xxxxx
      - WATCHLIST=/config/nginx/maxmind.conf
      - NGINX_LOG_PATH=/config/log/nginx/access.log
      ## Docker Mods
      - DOCKER_MODS=linuxserver/mods:universal-docker|linuxserver/mods:swag-geoip2influx|linuxserver/mods:swag-maxmind|linuxserver/mods:swag-dashboard|linuxserver/mods:swag-auto-reload|linuxserver/mods:swag-cloudflare-real-ip|linuxserver/mods:swag-crowdsec
      - DOCKER_MODS_DEBUG=false
      - DOCKER_MODS_DEBUG_CURL=false
      ## Geo2IP
      - INFLUX_HOST=${INFLUX_HOST}
      - INFLUX_HOST_PORT=8086
      - INFLUX_DATABASE=${INFLUX_DATABASE}
      - INFLUX_USER=${INFLUX_USER}
      - INFLUX_PASS=${INFLUX_PASS}
      - INFLUXDB_DATA_MAX_SERIES_PER_DATABASE=100000
      - INFLUXDB_DATA_MAX_VALUES_PER_TAG=0
      - INFLUX_RETENTION=90d
      - INFLUX_SHARD=2d
      - GEOIP2INFLUX_LOG_PATH=/config/log/geoip2influx/geoip2influx.log
      - GEOIP2INFLUX_LOG_LEVEL=info
      - GEOIP_DB_PATH=/config/geoip2db/GeoLite2-City.mmdb
      - MAXMINDDB_LICENSE_KEY=${MAXMINDDB_LICENSE_KEY}
      - MAXMINDDB_USER_ID=${MAXMINDDB_USER_ID}
      ## Crowdsec
      - CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
      - CROWDSEC_LAPI_URL=http://${CROWDSEC_HOST}:8080
      - CROWDSEC_F2B_DISABLE=true
      - CROWDSEC_MODE=live
    volumes:
      - /xxxxx/Container/swag/config:/config
      - /xxxxx/Container/swag/config/logrotate:/root/etc/logrotate.d
      - /xxxxx/Container/swag/secrets:/secrets
      - /var/run/docker.sock:/var/run/docker.sock:ro 
    labels:
      - com.centurylinklabs.watchtower.enable=true
    security_opt:
      - no-new-privileges=true
    cap_add:
      - NET_ADMIN`

Container logs

`[mod-init] Running Docker Modification Logic
[mod-init] Adding linuxserver/mods:universal-docker to container
[mod-init] linuxserver/mods:universal-docker at sha256:830ed079c9dc0b6ba0ffa7046135e0b10d175f658dd207692208851f2bcce392 has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-geoip2influx to container
[mod-init] linuxserver/mods:swag-geoip2influx at sha256:1161809ed4c90db6fb051f9ff09b7a40ab9cc780d59ccb97826d6c4170741a26 has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-maxmind to container
[mod-init] linuxserver/mods:swag-maxmind at sha256:4f920f4949af13674bd0fdcb6010af441b51577e4096a28887e3fce10915415c has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-dashboard to container
[mod-init] linuxserver/mods:swag-dashboard at sha256:7923509263d7e4a92b693ed23c60d8d35e8e24a97bf06ea549be910c99256d7d has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-auto-reload to container
[mod-init] linuxserver/mods:swag-auto-reload at sha256:9dbae5d11b0dab3c5825a700ea1933a606a81df6312186da0f167e6ed8b6039e has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-cloudflare-real-ip to container
[mod-init] linuxserver/mods:swag-cloudflare-real-ip at sha256:21aa292df04e2eddad2acfe90c81ec0e3254d4cf87535c72ef7b517be5428cef has been previously applied skipping
[mod-init] Adding linuxserver/mods:swag-crowdsec to container
[mod-init] linuxserver/mods:swag-crowdsec at sha256:f81f99add5c5de7ff505f71a8fe96f93407df1943f77c0d785aa9cee06641e4a has been previously applied skipping
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   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:    1000
───────────────────────────────────────
Linuxserver.io version: 2.11.0-ls330
Build-date: 2024-10-19T03:29:55+00:00
───────────────────────────────────────
    
using keys found in /config/keys
chmod: changing permissions of '/config/nginx/site-confs': Bad address
chmod: changing permissions of '/config/nginx/site-confs/default.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/site-confs/default.conf': Bad address
chmod: changing permissions of '/config/nginx/nginx.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/.editorconfig': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/README.md': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/adguard.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/syncrify.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/xeams.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/homarr.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/komga.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/stalwart.subdomain.conf.bkp': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/vscode.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/paperless.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/xeams_mta-sys.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/authelia.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/dashboard.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/emby.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/vaultwarden.subdomain': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/bitwarden.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/Geneweb.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/immich.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/gaseous.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/pydio-cells.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/bitwarden.subdomain.conf.bkp': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/emulatorjs.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy-confs/portainer.subdomain.conf': Bad address
chmod: changing permissions of '/config/nginx/nginx.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/ssl.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/authelia-server.conf': Bad address
chmod: changing permissions of '/config/nginx/authelia-location.conf': Bad address
chmod: changing permissions of '/config/nginx/authelia-location.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/authelia-server.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/authentik-location.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/authentik-server.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/ldap-location.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/ldap-server.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/proxy.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/ssl.conf': Bad address
chmod: changing permissions of '/config/nginx/dhparams.pem': Bad address
chmod: changing permissions of '/config/nginx/resolver.conf': Bad address
chmod: changing permissions of '/config/nginx/worker_processes.conf': Bad address
chmod: changing permissions of '/config/nginx/proxy.conf': Bad address
chmod: changing permissions of '/config/nginx/ldap-location.conf': Bad address
chmod: changing permissions of '/config/nginx/ldap-server.conf': Bad address
chmod: changing permissions of '/config/nginx/cf_real-ip.conf': Bad address
chmod: changing permissions of '/config/nginx/maxmind.conf': Bad address
chmod: changing permissions of '/config/nginx/ssl_bos.conf': Bad address
chmod: changing permissions of '/config/nginx/ssl_geneweb.conf': Bad address
chmod: changing permissions of '/config/nginx/resolver.conf.bkp': Bad address
chmod: changing permissions of '/config/nginx/authentik-location.conf': Bad address
chmod: changing permissions of '/config/nginx/authentik-server.conf': Bad address
chmod: changing permissions of '/config/nginx/authenticated-origin-pull-ca.pem': Bad address
chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
chmod: changing permissions of '/etc/logrotate.d/geoip2influx': Bad address
chmod: changing permissions of '/etc/logrotate.d/lerotate': Bad address
chmod: changing permissions of '/etc/logrotate.d/nginx': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm83': Bad address
Variables set:
PUID=1000
PGID=1000
TZ=Europe/Paris
URL=xxxxx
SUBDOMAINS=wildcard
EXTRA_DOMAINS=
ONLY_SUBDOMAINS=false
VALIDATION=dns
CERTPROVIDER=
DNSPLUGIN=xxxxx
EMAIL=xxxxx
STAGING=

chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/deploy': Bad address
chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/deploy/10-default': Bad address
chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/post': Bad address
chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/post/10-nginx': Bad address
chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/pre': Bad address
chmod: changing permissions of '/defaults/etc/letsencrypt/renewal-hooks/pre/10-nginx': Bad address
Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
Wildcard cert for xxxxx will be requested
E-mail address entered: xxxxx
dns validation via xxxxx plugin is selected
Certificate exists; parameters unchanged; starting nginx
chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
chmod: changing permissions of '/etc/logrotate.d/geoip2influx': Bad address
chmod: changing permissions of '/etc/logrotate.d/lerotate': Bad address
chmod: changing permissions of '/etc/logrotate.d/nginx': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm83': Bad address
chmod: changing permissions of '/config/log/nginx': Bad address
chmod: changing permissions of '/config/log/nginx/error.log': Bad address
chmod: changing permissions of '/config/log/nginx/access.log': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.2.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.2.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.3.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.2.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.3.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.3.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.4.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.4.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.5.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.4.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.5.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.5.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.6.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.6.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.7.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.6.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.7.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.7.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.8.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.8.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.9.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.8.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.9.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.9.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.10.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.10.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.11.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.10.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.11.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.11.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.12.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.12.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.13.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.12.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.13.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.13.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.14.gz': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.14.gz': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.1': Bad address
chmod: changing permissions of '/config/log/nginx/access.log.14.gz': Bad address
chmod: changing permissions of '/config/log/nginx/error.log.1': Bad address
chmod: changing permissions of '/config/log/nginx/unauthorized.log.1': Bad address
chmod: changing permissions of '/config/log/php': Bad address
chmod: changing permissions of '/config/log/php/error.log': Bad address
chmod: changing permissions of '/config/log/php/error.log.1': Bad address
chmod: changing permissions of '/config/log/php/error.log.2.gz': Bad address
chmod: changing permissions of '/config/log/php/error.log.3.gz': Bad address
chmod: changing permissions of '/config/log/php/error.log.4.gz': Bad address
chmod: changing permissions of '/config/log/php/error.log.5.gz': Bad address
chmod: changing permissions of '/config/log/php/error.log.6.gz': Bad address
chmod: changing permissions of '/config/log/php/error.log.7.gz': Bad address
chmod: changing permissions of '/config/log/fail2ban': Bad address
chmod: changing permissions of '/config/log/fail2ban/fail2ban.log': Bad address
chmod: changing permissions of '/config/log/letsencrypt': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.2.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.3.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.4.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.5.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.6.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.7.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.8.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.9.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.1': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.10.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.11.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.12.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.13.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.14.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.15.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.16.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.17.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.18.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.19.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.20.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.21.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.22.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.23.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.24.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.25.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.26.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.27.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.28.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.29.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.30.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.31.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.32.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.33.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.34.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.35.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.36.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.37.gz': Bad address
chmod: changing permissions of '/config/log/letsencrypt/letsencrypt.log.38.gz': Bad address
chmod: changing permissions of '/config/log/geoip2influx': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-14': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-15': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.1': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-17': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-18': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-19': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-13': Bad address
chmod: changing permissions of '/config/log/geoip2influx/geoip2influx.log.2024-10-16': Bad address
chmod: changing permissions of '/config/log/logrotate.status': Bad address
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
[init-geoip2influx-setup] Starting
**** installing docker and docker compose ****
**** docker and docker-compose already installed, skipping ****
**** Applying the SWAG dashboard mod... ****
libmaxminddb
**** goaccess already installed, skipping ****
**** swag-auto-reload deps already installed, skipping ****
**** libmaxminddb already installed, skipping ****
**** libmaxminddb already installed, skipping ****
**** Applied the SWAG dashboard mod ****
[init-geoip2influx-setup] Variables set:


INFLUX_HOST=xxxxx
INFLUX_HOST_PORT=8086
INFLUX_DATABASE=geoip2influx
INFLUX_USER=xxxxx
INFLUX_PASS=xxxxx
INFLUX_RETENTION=90d
INFLUX_SHARD=2d


INFLUXDB_V2_TOKEN=
INFLUXDB_V2_URL=
INFLUXDB_V2_ORG=
INFLUXDB_V2_BUCKET=
INFLUXDB_V2_RETENTION=
INFLUXDB_V2_DEBUG=
INFLUXDB_V2_BATCHING=
INFLUXDB_V2_BATCH_SIZE=
INFLUXDB_V2_FLUSH_INTERVAL=


GEO_MEASUREMENT=
LOG_MEASUREMENT=
NGINX_LOG_PATH=/config/log/nginx/access.log
SEND_NGINX_LOGS=
GEOIP2INFLUX_LOG_LEVEL=info
GEOIP2INFLUX_LOG_PATH=/config/log/geoip2influx/geoip2influx.log
GEOIP_DB_PATH=/config/geoip2db/GeoLite2-City.mmdb
USE_INFLUXDB_V2=
MAXMINDDB_USER_ID=xxxxxx
MAXMINDDB_LICENSE_KEY=xxxxxx

[init-geoip2influx-setup] Finished
Applying the maxmind mod...
Applied the maxmind mod
[custom-init] No custom files found, skipping...
MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
/config/nginx
/config/nginx/maxmind.conf
[ls.io-init] done.
**** Disabling fail2ban Service ****
nginx: [error] [lua] crowdsec.lua:62: init(): error loading captcha plugin: no recaptcha site key provided, can't use recaptcha
nginx: [alert] [lua] crowdsec_nginx.conf:4):8: [Crowdsec] Initialisation done
20/10/2024 12:37:20 | MainThread        | root         | INFO     | (logger.configure_logging|line:119) | Operating system: Linux-5.10.60-qnap-x86_64-with |
20/10/2024 12:37:20 | MainThread        | root         | INFO     | (logger.configure_logging|line:120) | Python version: 3.12.7 |
20/10/2024 12:37:20 | MainThread        | g2i          | INFO     | (run.<module>|line:26) | Starting GeoIP2Influx. |
20/10/2024 12:37:20 | MainThread        | InfluxClient | INFO     | (influx.validate|line:186) | InfluxDB client validated. |
20/10/2024 12:37:20 | MainThread        | InfluxClient | SUCCESS  | (influx.setup|line:85) | InfluxDB client setup complete. |
20/10/2024 12:37:20 | MainThread        | LogParser    | INFO     | (logparser.log_file_exists|line:120) | Log file /config/log/nginx/access.log exists. |
20/10/2024 12:37:20 | MainThread        | LogParser    | INFO     | (logparser.geoip_file_exists|line:131) | GeoIP file /config/geoip2db/GeoLite2-City.mmdb exists. |
20/10/2024 12:37:20 | MainThread        | LogParser    | SUCCESS  | (logparser.validate_log_format|line:108) | Log file format is valid! |
20/10/2024 12:37:20 | MainThread        | LogParser    | INFO     | (logparser.tail_logs|line:153) | Tailing log file. |`
@ttraxxrepo
Copy link

Same issue with streamlined compose

swag:
    container_name: swag
    image: ghcr.io/linuxserver/swag
    ports:
      - 81:81
    volumes:
      - ${APPDATA_DIR}/Swag:/config
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TIMEZONE}
      - URL=${DOMAIN}
      - SUBDOMAINS=wildcard
    networks:
      container_network:
    restart: unless-stopped

additional details in discord thread:
https://discord.com/channels/354974912613449730/1293559623999033395

@aptalca
Copy link
Member

aptalca commented Oct 20, 2024

I can't reproduce. Are you on qnap as well?

@Flyingfufu
Copy link
Author

Yes, with latest firmware and container station versions.

@svein
Copy link

svein commented Oct 23, 2024

I see the same chmod errors with a lot of my containers including swag. It seems to have messed up permission on nextcloud container. Also qnap Docker version 27.1.2-qnap2, build d46fd47.

@thespad
Copy link
Member

thespad commented Oct 23, 2024

Can you provice the output of uname -a and docker info on the host

Also what filesystem is your QNAP storage using? ext4? btrfs? etc.

@svein
Copy link

svein commented Oct 23, 2024

Docker was recently upgraded, but system hasn't been updated in a while. I have not seen this errors before, though I don't look at the logs unless I expect problems with an docker container upgrade for instance.

Filesystem is zfs

uname -a
Linux zfs 5.10.60-qnap #1 SMP Fri Jun 7 00:27:33 CST 2024 x86_64 GNU/Linux
Client:
 Version:    27.1.2-qnap2
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-qnap1
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 36
  Running: 36
  Paused: 0
  Stopped: 0
 Images: 78
 Server Version: 27.1.2-qnap2
 Storage Driver: zfs
  Zpool: error while getting pool information exit status 2: "/sbin/zpool get -Hp name,health,allocated,size,free,readonly,dedupratio,fragmentation,freeing,leaked zpool1" => bad property list: invalid property 'fragmentation'
usage:
        get [-Hp] [-o "all" | field[,...]] <"all" | property[,...]> <pool> ...

the following properties are supported:

        PROPERTY         EDIT   VALUES

        allocated          NO   <size>
        capacity           NO   <size>
        compdedup_count    NO   <compact/dedup entries count>
        deadlist datadspace    NO   <deadlist used in datadspace>
        deadlist metadspace    NO   <deadlist used in metadspace>
        dedup-saving       NO   <size>
        dedupratio         NO   <1.00x or higher if deduped>
        dspace             NO   <size>
        expandsize         NO   <size>
        free               NO   <size>
        freeing            NO   <size>
        guid               NO   <guid>
        health             NO   <state>
        max_poolop         NO   <max_poolop>
        nomal_class_datadspace    NO   <datadspace of spa_nomal_class
        nomal_class_metadspace    NO   <metadspace of spa_nomal_class>
        orig_qsize         NO   <size>
        orig_zib_size      NO   <size>
        overqthresh        NO   yes | no
        prune_goal_deduced    NO   <DDT entries, decided by RAM size>
        qguid              NO   <qguid>
        qos_weight         NO   <weight total>
        qsal_retention_data    NO   <qsal retention data size>
        qsal_retention_freed    NO   <qsal freed retention data size>
        qsal_retention_spill    NO   <qsal spilled retention data size>
        qsize              NO   <size>
        qthreshavail       NO   <size>
        qthreshsize        NO   <size>
        raidz_layout       NO   pristine | layout_reorder | layout_mirror
        reserved_size      NO   <size>
        shadow_refmap_reserve_shift    NO   <refmap reserve shift
        shadow_refmap_shift    NO   <refmap shift>
        size               NO   <size>
        smartddt_state     NO   <pool smart DDT state, 0|1>
        spacelow_overthresh    NO   yes | no
        spacelow_threshavail    NO   <size>
        spacelow_threshsize    NO   <size>
        ssdop_size         NO   <size>
        upsecs             NO   <secs>
        usedbysnapshot     NO   <size>
        zib_allocated      NO   <size>
        zib_falloc_size    NO   <size>
        zib_falloc_txg     NO   <size>
        zib_free           NO   <size>
        zib_metafree       NO   <size>
        zib_metasize       NO   <size>
        zib_size           NO   <size>
        zib_worstamp       NO   <times>
        aggrprefetch      YES   on | off
        aggrprefetch_maxinit_sz   YES   <aggressive prefetch maxinit sz>
        altroot           YES   <path>
        async_read_max_active   YES   <pool async read max active count>
        async_read_min_active   YES   <pool async read min active count>
        async_write_max_active   YES   <pool async write max active count>
        async_write_min_active   YES   <pool async write min active count>
        asynccow          YES   on | off
        autoexpand        YES   on | off
        autoreplace       YES   on | off
        bootfs            YES   <filesystem>
        cachefile         YES   <file> | none
        comment           YES   <comment-string>
        compdedup_maxcount   YES   <maximum count for compact/dedup entries>
        compdedup_minpshift   YES   <minimum pshift to use compact/dedup>
        ddt_dec_freq_sec   YES   <ddt dec freq sec>
        ddt_entry_limit   YES   <DDT entries, greater than 'prune_goal'>
        ddt_freq_on_disk   YES   on | off
        ddt_prune_min_time_ms   YES   <ddt prune min time ms>
        ddt_prune_percentage   YES   <ddt prune percentage>
        dedupditto        YES   <threshold (min 100)>
        delegation        YES   on | off
        failmode          YES   wait | continue | panic
        globalcache       YES   on | off
        globalcache_notuser   YES   on | off
        indirectlayout    YES   on | off
        l2cache_ioalign   YES   on | off
        l2rebuild         YES   on | off
        listsnapshots     YES   on | off
        logvolume         YES   <filesystem>
        migrate_error_handle   YES   pause | continue
        migrate_ratio     YES   <pool load ratio for migrate>
        owner             YES    0 | 1
        pool_overprovision   YES   <over provision percentage for indirect layout>
        prune_goal        YES   <DDT entries>
        prune_goal_by_ram   YES   on | off
        prune_slack_txg   YES   <txgs>
        qlog_policy       YES   legacy | clog
        qos_enable        YES   0 | 1
        qos_max_4kbase    YES   <iops>
        qos_reserved      YES   <pool qos reserved percentage>
        qos_throttle      YES   on | off
        qsnap             YES   <size> | none
        qthresh           YES   <size> | none
        raidzshift        YES   24 default, 12(4KB) - 30(1GB)
        raidzshift_i      YES   0 default (rotate for every shadowblock), 12(4KB) - 30(1GB)
        readonly          YES   on | off
        resilver_pause    YES   on | off
        resilver_ratio    YES   <pool load ratio for resilver>
        scan_ignore_error   YES   on | off
        scrub_ratio       YES   <pool load ratio for scrub>
        shadowashift      YES   0 default, 12 (4K) ~ 17 (128k)
        shadowblockshift   YES   0 auto, 17 (128KB) ~ 24 (16MB)
        shadowminshift    YES   0 default, 12 (4K) ~ 16 (64k)
        smartddt          YES   on | off
        smartddt_entrydrops   YES   <pool DDT entry drop ratio to re-open ddt feature>
        smartddt_loadratio   YES   <pool load ratio for dedup operation cost>
        smartddt_times    YES   <pool Smart DDT continuous times to enable mechanism>
        smartddt_txgdirty   YES   <pool Txg Dirty throughput lower threshold>
        smartddt_txgdirty_low   YES   <pool Txg Dirty throughput lowest threshold>
        spacelow_thresh   YES   <size> | none
        spacelow_threshbyte   YES   <size> | none
        ssd_life_type     YES   off | disable | byoff
        ssd_overprovision   YES   <over provision percentage for SSD>
        sync_read_max_active   YES   <pool sync read max active count>
        sync_read_min_active   YES   <pool sync read min active count>
        sync_write_max_active   YES   <pool sync write max active count>
        sync_write_min_active   YES   <pool sync write min active count>
        tag               YES   <snapshot tag>
        throttle          YES   on | off
        upsecsupdate      YES   <secs>
        vdev_aggregation_limit   YES   <max aggregation size>
        version           YES   <version>
        zib_disable_ref_negative_verify   YES   <zib disable ref negative verify>
        feature@...       YES   disabled | enabled | active

The feature@ properties must be appended with a feature name.
See zpool-features(7).

  Zpool Health: not available
  Parent Dataset: zpool1/zfs530/zfs5300001
  Space Used By Parent: 5514864320512
  Space Available: 593070265631
  Parent Quota: no
  Compression: on
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay qnet
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 kata-runtime nvidia-runtime runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.10.60-qnap
 Operating System: QTS 5.1.7 (20240607)
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 94.16GiB
 Name: nas
 ID: 9bb7ad94-40f5-4d9c-844c-f8b5d0625503
 Docker Root Dir: /share/ZFS530_DATA/.qpkg/container-station/docker
 Debug Mode: true
  File Descriptors: 1492
  Goroutines: 288
  System Time: 2024-10-23T15:14:28.378331457+02:00
  EventsListeners: 1
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 172.29.0.0/16, Size: 22

@Flyingfufu
Copy link
Author

Can you provice the output of uname -a and docker info on the host

Also what filesystem is your QNAP storage using? ext4? btrfs? etc.

Sorry for the delay, was away for few days. Here the outputs :

uname -a :
Linux MyHomeNAS 5.10.60-qnap #1 SMP Sat Aug 17 00:59:46 CST 2024 x86_64 GNU/Linux

and

docker info :
Client: Version: 27.1.2-qnap2 Context: default Debug Mode: false Plugins: compose: Docker Compose (Docker Inc.) Version: v2.29.1-qnap1 Path: /usr/local/lib/docker/cli-plugins/docker-compose

Server: Containers: 49 Running: 40 Paused: 0 Stopped: 9 Images: 50 Server Version: 27.1.2-qnap2 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: true Native Overlay Diff: false userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay qnet Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 kata-runtime nvidia-runtime runc Default Runtime: runc Init Binary: docker-init containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353 runc version: v1.1.13-0-g58aa920 init version: de40ad0 Security Options: apparmor seccomp Profile: builtin Kernel Version: 5.10.60-qnap Operating System: QTS 5.2.0 (20240817) OSType: linux Architecture: x86_64 CPUs: 6 Total Memory: 31.26GiB Name: Redacted ID: Redacted Docker Root Dir: /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker Debug Mode: true File Descriptors: 3199 Goroutines: 304 System Time: 2024-10-25T12:44:22.48574818+02:00 EventsListeners: 1 Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine Default Address Pools: Base: 172.29.0.0/16, Size: 22

@toshmop
Copy link

toshmop commented Oct 27, 2024

Hello, same thing for me in Storage Driver: overlay2

[~] # docker info
Client:
Version: 27.1.2-qnap2
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc.)
Version: v2.29.1-qnap1
Path: /usr/local/lib/docker/cli-plugins/docker-compose

Server:
Containers: 15
Running: 9
Paused: 0
Stopped: 6
Images: 18
Server Version: 27.1.2-qnap2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay qnet
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 kata-runtime nvidia-runtime runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 5.10.60-qnap
Operating System: QTS 5.2.0 (20240817)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 15.53GiB
Name: XXXXXX
ID: XXXXXX
Docker Root Dir: /share/CACHEDEV2_DATA/SRV/container-station-data/lib/docker
Debug Mode: true
File Descriptors: 122
Goroutines: 103
System Time: 2024-10-27T11:16:19.902918904+01:00
EventsListeners: 1
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Default Address Pools:
Base: 172.29.0.0/16, Size: 22

@Flyingfufu
Copy link
Author

Hello,
Just realized that the same issue exist with the following image: linuxserver/speedtest-tracker:latest

@thespad
Copy link
Member

thespad commented Oct 27, 2024

My guess is it'll affect any image that performs a chmod on init. Can you post the relevant logs from the speedtest-tracker container please.

@Flyingfufu
Copy link
Author

here you go :

`[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
───────────────────────────────────────

  ██╗     ███████╗██╗ ██████╗
  ██║     ██╔════╝██║██╔═══██╗
  ██║     ███████╗██║██║   ██║
  ██║     ╚════██║██║██║   ██║
  ███████╗███████║██║╚██████╔╝
  ╚══════╝╚══════╝╚═╝ ╚═════╝

Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
speedtest-tracker: https://github.com/sponsors/alexjustesen

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: v0.21.4-ls51
Build-date: 2024-10-26T21:22:13+00:00
───────────────────────────────────────

using keys found in /config/keys
chmod: changing permissions of '/config/nginx/site-confs': Bad address
chmod: changing permissions of '/config/nginx/site-confs/default.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/site-confs/default.conf': Bad address
chmod: changing permissions of '/config/nginx/nginx.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/ssl.conf.sample': Bad address
chmod: changing permissions of '/config/nginx/nginx.conf': Bad address
chmod: changing permissions of '/config/nginx/ssl.conf': Bad address
chmod: changing permissions of '/config/nginx/dhparams.pem': Bad address
chmod: changing permissions of '/config/nginx/resolver.conf': Bad address
chmod: changing permissions of '/config/nginx/worker_processes.conf': Bad address
chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
chmod: changing permissions of '/etc/logrotate.d/nginx': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm': Bad address
chmod: changing permissions of '/etc/logrotate.d/php-fpm83': Bad address
Waiting for DB to be available
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2024-05-27 │ /config/nginx/nginx.conf │
│ 2023-04-13 │ 2024-07-16 │ /config/nginx/site-confs/default.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /config/nginx/site-confs/default.conf:7
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /config/nginx/site-confs/default.conf:8
[ls.io-init] done.
`

@aptalca
Copy link
Member

aptalca commented Oct 27, 2024

This is definitely an issue that affects chmod in docker on qnap specifically. Something to do with the docker install there or the kernel, or an incompatibility between the two.

I don't believe there is anything we can do. It likely needs to be updated/fixed by qnap.

Iirc we had similar issues reported with chmod some time ago (maybe more than a couple of years ago) and the issue was later resolved by updates.

In this case the container still goes through the rest of the init and the services seem to start.

@thespad
Copy link
Member

thespad commented Oct 27, 2024

It's almost impossible to usefully troubleshoot because 99% of search results for "Bad Address" are DNS related; I've even gone through the coreutils source and it doesn't seem to be a native error message, which suggests it's being returned by the OS/kernel.

I did find this: alpinelinux/docker-alpine#342 but it seems to be specific to 32bit arm.

The gitlab tracking issue is https://gitlab.alpinelinux.org/alpine/aports/-/issues/15167

@toshmop
Copy link

toshmop commented Oct 27, 2024

Thank you. I will open a case at qnap

@thespad
Copy link
Member

thespad commented Oct 27, 2024

Could you do the following as well.

docker run -it --rm alpine:3.20 sh

Then run ulimit -a and provide the results.

(then exit to terminate and delete the container)

@aptalca
Copy link
Member

aptalca commented Oct 27, 2024

May be worth testing if chmod works in Ubuntu as well

@Flyingfufu
Copy link
Author

Could you do the following as well.

docker run -it --rm alpine:3.20 sh

Then run ulimit -a and provide the results.

(then exit to terminate and delete the container)

here the result :

`docker run -it --rm alpine:3.20 sh
Unable to find image 'alpine:3.20' locally
3.20: Pulling from library/alpine
43c4264eed91: Already exists
Digest: sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
Status: Downloaded newer image for alpine:3.20

/ # ulimit -a
core file size (blocks) (-c) 0
data seg size (kb) (-d) unlimited
scheduling priority (-e) 0
file size (blocks) (-f) unlimited
pending signals (-i) 127895
max locked memory (kb) (-l) 64
max memory size (kb) (-m) unlimited
open files (-n) 65535
POSIX message queues (bytes) (-q) 819200
real-time priority (-r) 0
stack size (kb) (-s) 8192
cpu time (seconds) (-t) unlimited
max user processes (-u) 127895
virtual memory (kb) (-v) unlimited
file locks (-x) unlimited`

@thespad
Copy link
Member

thespad commented Oct 27, 2024

So if you do

  • docker run -it --rm alpine:3.20 sh
  • Then chmod +x /etc/alpine-release

Do you get the same error?

If so can you exit then do

  • docker run -it --rm alpine:3.20 sh
  • Then apk add coreutils
  • Then chmod +x /etc/alpine-release

Do you get the same error?

@Flyingfufu
Copy link
Author

Flyingfufu commented Oct 27, 2024

So if you do

  • docker run -it --rm alpine:3.20 sh
  • Then chmod +x /etc/alpine-release

Do you get the same error?

No message appears :
/# docker run -it --rm alpine:3.20 sh
/# chmod +x /etc/alpine-release
/#

same result after a container restart

@Flyingfufu
Copy link
Author

Flyingfufu commented Oct 27, 2024

  • docker run -it --rm alpine:3.20 sh
  • Then apk add coreutils
  • Then chmod +x /etc/alpine-release

Do you get the same error?

Same here, no message

/# docker run -it --rm alpine:3.20 sh
/ # apk add coreutils
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/8) Installing coreutils-env (9.5-r1)
(2/8) Installing coreutils-fmt (9.5-r1)
(3/8) Installing coreutils-sha512sum (9.5-r1)
(4/8) Installing libacl (2.3.2-r0)
(5/8) Installing libattr (2.5.2-r0)
(6/8) Installing skalibs (2.14.1.1-r0)
(7/8) Installing utmps-libs (0.1.2.2-r1)
(8/8) Installing coreutils (9.5-r1)
Executing busybox-1.36.1-r29.trigger
OK: 9 MiB in 22 packages
/ # chmod +x /etc/alpine-release
/ #

And still the same situation after a container restart (ie speedtest)

@thespad
Copy link
Member

thespad commented Oct 27, 2024

Interesting, so it's not just any chmod operation that causes it.

Can you try running

docker run -d --rm --name=chmod thespad/playground:chmod

Then do a docker logs chmod and see if the errors are present in the logs.

Edit: The image is just our Alpine base image that then installs logrotate and does the same chmod as swag etc. and then also performs some other chmods to see which (if any) trigger the errors.

@Flyingfufu
Copy link
Author

Sure. Here the result :

/# docker run -d --rm --name=chmod thespad/playground:chmod
Unable to find image 'thespad/playground:chmod' locally
chmod: Pulling from thespad/playground
68c4ea3779b6: Already exists
df25a931801a: Already exists
ab0ddebe54a6: Already exists
19f39f464468: Already exists
7560e3e46aa2: Already exists
339ecd878087: Already exists
840e3adff356: Pull complete
4d8a2f7a29ca: Pull complete
Digest: sha256:6ec8a429a5e9245a73e4468c88008b7ccc592e587ce1ae93a2353c029ce50dec
Status: Downloaded newer image for thespad/playground:chmod
562cd592df3e5aa8aa9855bdaeb1fca0095b04dfcd11700a4c14a013e3ee6724
[/share/CACHEDEV1_DATA/Container] # docker logs chmod
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────


| | | | | | | |
| --| | |
| | | | | | | | |
|||| |_| |||||
_____ __ __ _ __ ____
| __ | | | | | |
| __ -| | | | || | |
|
|__|
|_____|____/

Based on images from linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID: 911
User GID: 911
───────────────────────────────────────
chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
chmod: changing permissions of '/etc/pam.d/base-account': Bad address
chmod: changing permissions of '/etc/pam.d/base-auth': Bad address
chmod: changing permissions of '/etc/pam.d/base-password': Bad address
chmod: changing permissions of '/etc/pam.d/base-session': Bad address
chmod: changing permissions of '/etc/pam.d/base-session-noninteractive': Bad address
chmod: changing permissions of '/etc/pam.d/chfn': Bad address
chmod: changing permissions of '/etc/pam.d/chpasswd': Bad address
chmod: changing permissions of '/etc/pam.d/chsh': Bad address
chmod: changing permissions of '/etc/pam.d/groupmems': Bad address
chmod: changing permissions of '/etc/pam.d/login': Bad address
chmod: changing permissions of '/etc/pam.d/newusers': Bad address
chmod: changing permissions of '/etc/pam.d/other': Bad address
chmod: changing permissions of '/etc/pam.d/shadow-utils': Bad address
chmod: changing permissions of '/etc/pam.d/su': Bad address
s6-rc: warning: unable to start service init-permissions: command exited 1

@thespad
Copy link
Member

thespad commented Oct 27, 2024

OK, so across the board. And can you try with thespad/playground:gnu-chmod instead.

@Flyingfufu
Copy link
Author

Flyingfufu commented Oct 27, 2024

Here the outcome :

/# docker kill chmod
chmod
[/share/CACHEDEV1_DATA/Container] # docker run -d --rm --name=chmod thespad/playground:gnu-chmod
25c3ffab16bb1809e204252e6e0682713286de0c2dc3c88075a93c4d47c09906
[/share/CACHEDEV1_DATA/Container] # docker logs chmod
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────


| | | | | | | |
| --| | |
| | | | | | | | |
|||| |_| |||||
_____ __ __ _ __ ____
| __ | | | | | |
| __ -| | | | || | |
|
|__|
|_____|____/

Based on images from linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID: 911
User GID: 911
───────────────────────────────────────
chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
chmod: changing permissions of '/etc/pam.d/base-account': Bad address
chmod: changing permissions of '/etc/pam.d/base-auth': Bad address
chmod: changing permissions of '/etc/pam.d/base-password': Bad address
chmod: changing permissions of '/etc/pam.d/base-session': Bad address
chmod: changing permissions of '/etc/pam.d/base-session-noninteractive': Bad address
chmod: changing permissions of '/etc/pam.d/chfn': Bad address
chmod: changing permissions of '/etc/pam.d/chpasswd': Bad address
chmod: changing permissions of '/etc/pam.d/chsh': Bad address
chmod: changing permissions of '/etc/pam.d/groupmems': Bad address
chmod: changing permissions of '/etc/pam.d/login': Bad address
chmod: changing permissions of '/etc/pam.d/newusers': Bad address
chmod: changing permissions of '/etc/pam.d/other': Bad address
chmod: changing permissions of '/etc/pam.d/shadow-utils': Bad address
chmod: changing permissions of '/etc/pam.d/su': Bad address
s6-rc: warning: unable to start service init-permissions: command exited 1

@thespad
Copy link
Member

thespad commented Oct 27, 2024

OK so no difference between busybox chmod and gnu chmod. Final test for now, I promise.

  • docker run -d --rm --name=chmod lscr.io/linuxserver/baseimage-alpine:3.20
  • docker exec -it chmod bash
  • chmod -R 644 /etc/pam.d

@Flyingfufu
Copy link
Author

No issue at all, my pleasure to help as I can

Here the result :

/ # docker kill chmod
chmod
[/share/CACHEDEV1_DATA/Container] # docker run -d --rm --name=chmod lscr.io/linuxserver/baseimage-alpine:3.20
19b52ef744f068a4b28632e7259bdb32a10cfb959b0016af3f3351971f907b4e
[/share/CACHEDEV1_DATA/Container] # docker exec -it chmod bash
root@19b52ef744f0:/# chmod -R 644 /etc/pam.d
chmod: changing permissions of '/etc/pam.d/base-account': Bad address
chmod: changing permissions of '/etc/pam.d/base-auth': Bad address
chmod: changing permissions of '/etc/pam.d/base-password': Bad address
chmod: changing permissions of '/etc/pam.d/base-session': Bad address
chmod: changing permissions of '/etc/pam.d/base-session-noninteractive': Bad address
chmod: changing permissions of '/etc/pam.d/chfn': Bad address
chmod: changing permissions of '/etc/pam.d/chpasswd': Bad address
chmod: changing permissions of '/etc/pam.d/chsh': Bad address
chmod: changing permissions of '/etc/pam.d/groupmems': Bad address
chmod: changing permissions of '/etc/pam.d/login': Bad address
chmod: changing permissions of '/etc/pam.d/newusers': Bad address
chmod: changing permissions of '/etc/pam.d/other': Bad address
chmod: changing permissions of '/etc/pam.d/shadow-utils': Bad address
chmod: changing permissions of '/etc/pam.d/su': Bad address

@thespad
Copy link
Member

thespad commented Oct 27, 2024

OK, turns out I lied because the tests we did with the basic alpine image weren't identical so can you do the same test again but with alpine:3.20 so we have like for like (specifically the -R). You'll need to do apk add linux-pam before the chmod otherwise the folder (and contents) won't exist.

My guess is it's only affecting the recursive part of the chmod as there's no error for the parent folder in any of the tests and the one you did earlier with chmod +x was fine too.

@Flyingfufu
Copy link
Author

Well, not fully sure about the exact command you expect me to run.

Tying the following one didn't go through, but this might not be correct

/# docker kill chmod
chmod
[/share/CACHEDEV1_DATA/Container] # docker run -d --rm --name=chmod lscr.io/linuxserver/alpine:3.20
Unable to find image 'lscr.io/linuxserver/alpine:3.20' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/linuxserver/alpine/manifests/3.20": denied.
See 'docker run --help'.

@LinuxServer-CI
Copy link
Contributor

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.

@erichlf
Copy link

erichlf commented Jan 4, 2025

I too began having this issue all of a sudden. I hadn't updated my docker container since November, but I did update my QNAP nas a few days ago. I am currently on QTS 5.2.2.2950.

Downgrading to swag:3.0.1-ls338 fixes the problem.

@Tidle999
Copy link

Tidle999 commented Jan 4, 2025

And Updates here? I have the Same Problems starting today. Yesterday it was working. I did not Update my Qnap System.

@thespad
Copy link
Member

thespad commented Jan 4, 2025

Please pin to 3.0.1-ls347 for now, we need to look into whether we can sensibly provide a workaround without impacting other users.

One of the affected users has reported the issue to QNAP and they've acknowledged it, so we're now waiting to see if they actually provide a resolution or not.

@thespad thespad pinned this issue Jan 4, 2025
@mammo0
Copy link

mammo0 commented Jan 4, 2025

One of the affected users has reported the issue to QNAP and they've acknowledged it

@thespad Is there a kind of public bug tracker at QNAP? So, we all can see the status of this bug?

After PR #523 the image was working again. I ignored the Bad address errors. But it started crashing again with release 3.0.1-ls348. I think it is because of switching to Alpine version 3.21.
This means the latest working image (at least for my setup) is now 3.0.1-ls347

@j0nnymoe
Copy link
Member

j0nnymoe commented Jan 4, 2025

No QNAP don't seem to have anything like that. From experience, ticket information is private.

@giovannipapini
Copy link

giovannipapini commented Jan 8, 2025

Similar problem here:

running on Raspberry Pi, not working anymore since 3.0.1-ls348.

Keeps failing like this:

usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   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:    1000
───────────────────────────────────────
Linuxserver.io version: 3.1.0-ls352
Build-date: 2025-01-08T01:24:36+00:00
───────────────────────────────────────
    
sed: can't move '/config/nginx/nginx.confmbOOkH' to '/config/nginx/nginx.conf': Resource busy
using keys found in /config/keys
chmod: changing permissions of '/config/nginx/snippets/authelia/authrequest.basic.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/location.basic.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/location.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/authrequest.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/default.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/subdomains.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/swag.dashboard.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/auth.conf': Read-only file system
chmod: changing permissions of '/config/nginx/proxy.conf': Read-only file system
s6-rc: warning: unable to start service init-permissions: 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.

@jantari
Copy link

jantari commented Jan 9, 2025

Same issue here.

QNAP OS: QTS 5.2.2.2958
Container Station: 3.0.9.1038
docker info:

Client:
 Version:    27.1.2-qnap4
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-qnap2
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 12
  Running: 11
  Paused: 0
  Stopped: 1
 Images: 11
 Server Version: 27.1.2-qnap4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay qnet
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 kata-runtime nvidia-runtime runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.10.60-qnap
 Operating System: QTS 5.2.2 (20241121)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.61GiB
 Name: <REDACTED>
 ID: <REDACTED>
 Docker Root Dir: /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker
 Debug Mode: true
  File Descriptors: 118
  Goroutines: 124
  System Time: 2025-01-09T01:09:05.010232396+01:00
  EventsListeners: 1
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 172.29.0.0/16, Size: 22

output I get:

Attaching to swag
swag  | [migrations] started
swag  | [migrations] 01-nginx-site-confs-default: executing...
swag  | [migrations] 01-nginx-site-confs-default: succeeded
swag  | [migrations] 02-swag-old-certbot-paths: executing...
swag  | [migrations] 02-swag-old-certbot-paths: succeeded
swag  | [migrations] done
swag  | ───────────────────────────────────────
swag  | 
swag  |       ██╗     ███████╗██╗ ██████╗
swag  |       ██║     ██╔════╝██║██╔═══██╗
swag  |       ██║     ███████╗██║██║   ██║
swag  |       ██║     ╚════██║██║██║   ██║
swag  |       ███████╗███████║██║╚██████╔╝
swag  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
swag  | 
swag  |    Brought to you by linuxserver.io
swag  | ───────────────────────────────────────
swag  | 
swag  | To support the app dev(s) visit:
swag  | Certbot: https://supporters.eff.org/donate/support-work-on-certbot
swag  | 
swag  | To support LSIO projects visit:
swag  | https://www.linuxserver.io/donate/
swag  | 
swag  | ───────────────────────────────────────
swag  | GID/UID
swag  | ───────────────────────────────────────
swag  | 
swag  | User UID:    1000
swag  | User GID:    1000
swag  | ───────────────────────────────────────
swag  | Linuxserver.io version: 3.1.0-ls352
swag  | Build-date: 2025-01-08T01:24:36+00:00
swag  | ───────────────────────────────────────
swag  |     
swag  | Setting resolver to  127.0.0.11
swag  | Setting worker_processes to 4
swag  | generating self-signed keys in /config/keys, you can replace these with your own keys if required
swag  | .....+....+.........+......+..+.......+.....+...+...+++++++++++++++++++++++++++++++++++++++*............+..+...............+.+.....+....+.....+...+...+.........+++++++++++++++++++++++++++++++++++++++*.......+............+............+...+.............+..+.+..............+...+....+.........+..+.......+.....+.+.........+.....+...+.......++++++
swag  | .....+.........+..+...+.+.....+.........+.........+.......+...+........+++++++++++++++++++++++++++++++++++++++*..+.......+++++++++++++++++++++++++++++++++++++++*...+............+...+.............+...+......+.....+.+...+..............+.......+...+............+.....+.............+...+..............+...+......+.+...+...+.........+...+..................+........+......+.+..............+.............+...+.....+.......+..+....+..+...+..........+.....+.+...+.....+......+.........+.+.....+.+..............+......+......+.......+...+..+..........+..+...+.......+.........+.....+.......+..+.+............+..+.+..+....+...+.....+............+.+...+..+..........+.........+...+......+.....+.........+...+..........+...+.....+......+........................+....+..+.........+...................+..+....+..+...+.+........+.+......+......+.........+...........+.......+.....+...+..........+...+.....+......+......+....+...+.....+..........+...+............+..++++++
swag  | -----
swag  | chmod: changing permissions of '/etc/logrotate.d/acpid': Bad address
swag  | chmod: changing permissions of '/etc/logrotate.d/fail2ban': Bad address
swag  | chmod: changing permissions of '/etc/logrotate.d/lerotate': Bad address
swag  | chmod: changing permissions of '/etc/logrotate.d/nginx': Bad address
swag  | chmod: changing permissions of '/etc/logrotate.d/php-fpm': Bad address
swag  | chmod: changing permissions of '/etc/logrotate.d/php-fpm83': Bad address
swag  | chmod: changing permissions of '/config/nginx/site-confs': Bad address
swag  | chmod: changing permissions of '/config/nginx/site-confs/default.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/site-confs/default.conf': Bad address
swag  | chmod: changing permissions of '/config/nginx/nginx.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/ssl.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/authelia-location.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/authelia-server.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/authentik-location.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/authentik-server.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/ldap-location.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/ldap-server.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/proxy.conf.sample': Bad address
swag  | chmod: changing permissions of '/config/nginx/nginx.conf': Bad address
swag  | chmod: changing permissions of '/config/nginx/ssl.conf': Bad address
swag  | chmod: changing permissions of '/config/nginx/dhparams.pem': Bad address
swag  | chmod: changing permissions of '/config/nginx/resolver.conf': Bad address
swag  | chmod: changing permissions of '/config/nginx/worker_processes.conf': Bad address
swag  | s6-rc: warning: unable to start service init-permissions: command exited 1
swag  | /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.
swag  | /run/s6/basedir/scripts/rc.init: fatal: stopping the container.
swag exited with code 0

very unfortunate because the container just quits, I can't get it to run at all. I'm happy to troubleshoot any test any commands if helpful.

@thespad
Copy link
Member

thespad commented Jan 9, 2025

Please see #514 (comment)

We are aware of the cause (Upstream QNAP bug) and there isn't a straightforward workaround available to us that wouldn't impact non-QNAP users, so for the moment please pin to the older tag.

@thespad
Copy link
Member

thespad commented Jan 9, 2025

Similar problem here:

running on Raspberry Pi, not working anymore since 3.0.1-ls348.

Keeps failing like this:

usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   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:    1000
───────────────────────────────────────
Linuxserver.io version: 3.1.0-ls352
Build-date: 2025-01-08T01:24:36+00:00
───────────────────────────────────────
    
sed: can't move '/config/nginx/nginx.confmbOOkH' to '/config/nginx/nginx.conf': Resource busy
using keys found in /config/keys
chmod: changing permissions of '/config/nginx/snippets/authelia/authrequest.basic.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/location.basic.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/location.conf': Read-only file system
chmod: changing permissions of '/config/nginx/snippets/authelia/authrequest.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/default.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/subdomains.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/swag.dashboard.conf': Read-only file system
chmod: changing permissions of '/config/nginx/site-confs/auth.conf': Read-only file system
chmod: changing permissions of '/config/nginx/proxy.conf': Read-only file system
s6-rc: warning: unable to start service init-permissions: 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.

This is a different issue unrelated to the QNAP bug, please open a separate issue or visit our Discord server for support.

@iHuahua
Copy link

iHuahua commented Jan 10, 2025

Please pin to 3.0.1-ls347 for now, we need to look into whether we can sensibly provide a workaround without impacting other users.

One of the affected users has reported the issue to QNAP and they've acknowledged it, so we're now waiting to see if they actually provide a resolution or not.

3.0.1-ls347 is works, thx very much.

@thespad
Copy link
Member

thespad commented Jan 19, 2025

Could everyone affected by this issue please try the latest Swag release and see if it's working for you.

You'll still get the errors in the logs, nothing we can do about that until QNAP sort their end out.

@Flyingfufu
Copy link
Author

Could everyone affected by this issue please try the latest Swag release and see if it's working for you.

You'll still get the errors in the logs, nothing we can do about that until QNAP sort their end out.

Hi, just tried and the container is fully starting again! Of course the chmod error do still appear, but at least SWAG is again working with the latest version. Thanks a lot for this fix!!!

Concerning QNAP, the last feedback that I've received few days ago is that R&D replicated the issue and is now investigating the issue. Unfortunately, no information on a possible timeline.

@Tidle999
Copy link

For me it’s also working! Thanks for your help!

@alien75
Copy link

alien75 commented Jan 19, 2025

Confirmed: it's working again, thank you!

@thespad
Copy link
Member

thespad commented Jan 19, 2025

This will also ultimately apply to any other images using nginx 3.21 base but will take a few days to roll out so if you've had problems with those give them a try again next time there's an updated image.

Going to leave this issue open in the hope that QNAP sort themselves out and fix the underlying issue.

@thespad thespad added the work-in-progress Stale exempt label Jan 19, 2025
@jantari
Copy link

jantari commented Jan 20, 2025

I have since switched to caddy which works, but I have come back to test the new version 3.1.0-ls358 and it gets past the "Bad address" errors just like 3.0.1-ls347 did.

However I am now facing the same problem I had when I tried 3.0.1-ls347, which is that the container apparently can't even reach the internet ... which is baffling because every other container on this host with the same config can.

swag  | No certificate found with name mydomain.tld (expected /config/etc/letsencrypt/renewal/mydomain.tld.conf).
swag  | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /config/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
swag  | NOTICE: Staging is active
swag  | Using Let's Encrypt as the cert provider
swag  | SUBDOMAINS entered, processing
swag  | Wildcard cert for mydomain.tld will be requested
swag  | No e-mail address entered or address invalid
swag  | dns validation via porkbun plugin is selected
swag  | Generating new certificate
swag  | Saving debug log to /config/log/letsencrypt/letsencrypt.log
swag  | An unexpected error occurred:
swag  | ValueError: Requesting acme-staging-v02.api.letsencrypt.org/directory: Network unreachable
swag  | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /config/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
swag  | ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/porkbun.ini file.
The `/config/log/letsencrypt/letsencrypt.log` file:
2025-01-19 23:52:46,272:DEBUG:certbot._internal.main:certbot version: 3.1.0
2025-01-19 23:52:46,273:DEBUG:certbot._internal.main:Location of certbot entry point: /lsiopy/bin/certbot
2025-01-19 23:52:46,273:DEBUG:certbot._internal.main:Arguments: ['--config-dir', '/config/etc/letsencrypt', '--logs-dir', '/config/log/letsencrypt', '--work-dir', '/tmp/letsencrypt', '--config', '/config/etc/letsencrypt/cli.ini', '--non-interactive', '--renew-by-default']
2025-01-19 23:52:46,273:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#certbot-route53:auth,PluginEntryPoint#cpanel,PluginEntryPoint#dns-acmedns,PluginEntryPoint#dns-aliyun,PluginEntryPoint#dns-azure,PluginEntryPoint#dns-bunny,PluginEntryPoint#dns-cloudflare,PluginEntryPoint#dns-desec,PluginEntryPoint#dns-digitalocean,PluginEntryPoint#dns-directadmin,PluginEntryPoint#dns-dnsimple,PluginEntryPoint#dns-dnsmadeeasy,PluginEntryPoint#dns-dnspod,PluginEntryPoint#dns-do,PluginEntryPoint#dns-domeneshop,PluginEntryPoint#dns-dreamhost,PluginEntryPoint#dns-duckdns,PluginEntryPoint#dns-dynu,PluginEntryPoint#dns-freedns,PluginEntryPoint#dns-gandi,PluginEntryPoint#dns-gehirn,PluginEntryPoint#dns-glesys,PluginEntryPoint#dns-godaddy,PluginEntryPoint#dns-google,PluginEntryPoint#dns-he,PluginEntryPoint#dns-hetzner,PluginEntryPoint#dns-infomaniak,PluginEntryPoint#dns-inwx,PluginEntryPoint#dns-ionos,PluginEntryPoint#dns-linode,PluginEntryPoint#dns-loopia,PluginEntryPoint#dns-luadns,PluginEntryPoint#dns-namecheap,PluginEntryPoint#dns-netcup,PluginEntryPoint#dns-njalla,PluginEntryPoint#dns-nsone,PluginEntryPoint#dns-ovh,PluginEntryPoint#dns-porkbun,PluginEntryPoint#dns-rfc2136,PluginEntryPoint#dns-route53,PluginEntryPoint#dns-sakuracloud,PluginEntryPoint#dns-standalone,PluginEntryPoint#dns-transip,PluginEntryPoint#dns-vultr,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2025-01-19 23:52:46,302:DEBUG:certbot._internal.log:Root logging level set at 30
2025-01-19 23:52:46,303:DEBUG:certbot._internal.plugins.selection:Requested authenticator dns-porkbun and installer None
2025-01-19 23:52:46,303:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * dns-porkbun
Description: Obtain certificates using a DNS TXT record for Porkbun domains
Interfaces: Authenticator, Plugin
Entry point: EntryPoint(name='dns-porkbun', value='certbot_dns_porkbun.cert.client:Authenticator', group='certbot.plugins')
Initialized: <certbot_dns_porkbun.cert.client.Authenticator object at 0x7f980fa71eb0>
Prep: True
2025-01-19 23:52:46,304:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot_dns_porkbun.cert.client.Authenticator object at 0x7f980fa71eb0> and installer None
2025-01-19 23:52:46,304:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator dns-porkbun, Installer None
2025-01-19 23:52:46,305:DEBUG:certbot._internal.client:Registering without email!
2025-01-19 23:52:46,482:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/directory.
2025-01-19 23:52:49,584:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/lsiopy/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network unreachable

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

Traceback (most recent call last):
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connectionpool.py", line 488, in _make_request
    raise new_e
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connectionpool.py", line 464, in _make_request
    self._validate_conn(conn)
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
    conn.connect()
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connection.py", line 704, in connect
    self.sock = sock = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connection.py", line 213, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f980fad11f0>: Failed to establish a new connection: [Errno 101] Network unreachable

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

Traceback (most recent call last):
  File "/lsiopy/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='acme-staging-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f980fad11f0>: Failed to establish a new connection: [Errno 101] Network unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lsiopy/lib/python3.12/site-packages/acme/client.py", line 652, in _send_request
    response = self.session.request(method, url, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='acme-staging-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f980fad11f0>: Failed to establish a new connection: [Errno 101] Network unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/lsiopy/bin/certbot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/main.py", line 1873, in main
    return config.func(config, plugins)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/main.py", line 1561, in certonly
    le_client = _init_le_client(config, auth, installer)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/main.py", line 833, in _init_le_client
    acc, acme = _determine_account(config)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/main.py", line 741, in _determine_account
    acc, acme = client.register(
                ^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/client.py", line 208, in register
    acme = acme_from_config_key(config, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/certbot/_internal/client.py", line 73, in acme_from_config_key
    directory = acme_client.ClientV2.get_directory(config.server, net)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/acme/client.py", line 335, in get_directory
    return messages.Directory.from_json(net.get(url).json())
                                        ^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/acme/client.py", line 710, in get
    self._send_request('GET', url, **kwargs), content_type=content_type)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/acme/client.py", line 674, in _send_request
    raise ValueError(f"Requesting {host}{path}:{err_msg}")
ValueError: Requesting acme-staging-v02.api.letsencrypt.org/directory: Network unreachable
2025-01-19 23:52:49,592:ERROR:certbot._internal.log:An unexpected error occurred:
2025-01-19 23:52:49,593:ERROR:certbot._internal.log:ValueError: Requesting acme-staging-v02.api.letsencrypt.org/directory: Network unreachable

I realize this is a different issue, but I'm both willing to help fix this project up and curious why this container is being so problematic - what special things do you need to do? Why even chmod anything on startup? Why can every container I ever started get network access on this system but yours cannot? Perhaps it's time to go back to basics, use less custom stuff .... ?

I've done some additional troubleshooting on this and it seems that the problem is that this container takes 30 seconds to get its networking up and functional. I've tested this like this:

docker compose -f swag.yml down
docker compose -f swag.yml up -d && docker exec -it swag /bin/bash -c 'while ! ping -c 1 -W 1 -w 1 1.1.1.1 &>/dev/null ; do echo "$(date -Iseconds) NO NETWORK"; done ; echo "$(date -Iseconds) WE BACK!"'

[+] Running 1/1
 ✔ Container swag  Started
2025-01-20T00:35:13+00:00 NO NETWORK
2025-01-20T00:35:14+00:00 NO NETWORK
2025-01-20T00:35:15+00:00 NO NETWORK
2025-01-20T00:35:16+00:00 NO NETWORK
2025-01-20T00:35:17+00:00 NO NETWORK
2025-01-20T00:35:18+00:00 NO NETWORK
2025-01-20T00:35:19+00:00 NO NETWORK
2025-01-20T00:35:20+00:00 NO NETWORK
2025-01-20T00:35:21+00:00 NO NETWORK
2025-01-20T00:35:22+00:00 NO NETWORK
2025-01-20T00:35:23+00:00 NO NETWORK
2025-01-20T00:35:24+00:00 NO NETWORK
2025-01-20T00:35:25+00:00 NO NETWORK
2025-01-20T00:35:26+00:00 NO NETWORK
2025-01-20T00:35:27+00:00 NO NETWORK
2025-01-20T00:35:28+00:00 NO NETWORK
2025-01-20T00:35:29+00:00 NO NETWORK
2025-01-20T00:35:30+00:00 NO NETWORK
2025-01-20T00:35:31+00:00 NO NETWORK
2025-01-20T00:35:32+00:00 NO NETWORK
2025-01-20T00:35:33+00:00 NO NETWORK
2025-01-20T00:35:34+00:00 NO NETWORK
2025-01-20T00:35:35+00:00 NO NETWORK
2025-01-20T00:35:36+00:00 NO NETWORK
2025-01-20T00:35:37+00:00 NO NETWORK
2025-01-20T00:35:38+00:00 NO NETWORK
2025-01-20T00:35:39+00:00 NO NETWORK
2025-01-20T00:35:40+00:00 NO NETWORK
2025-01-20T00:35:41+00:00 NO NETWORK
2025-01-20T00:35:42+00:00 NO NETWORK
2025-01-20T00:35:42+00:00 WE BACK!

for comparison, here is the output from running the same test against my caddy container:

docker compose -f caddy.yml down
docker compose -f caddy.yml up -d && docker exec -it custom-caddy /bin/bash -c 'while ! ping -c 1 -W 1 -w 1 1.1.1.1 &>/dev/null ; do echo "$(date -Iseconds) NO NETWORK"; done ; echo "$(date -Iseconds) WE BACK!"'
[+] Running 1/1
 ✔ Container custom-caddy  Started
2025-01-20T00:33:09+00:00 WE BACK!

It, like every other container, has network connectivity instantly.

Bugs like this just make this project hard to use when its promise is supposed to make everything easier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream issue work-in-progress Stale exempt
Projects
Status: Issues
Development

Successfully merging a pull request may close this issue.