linuxserver / docker-swag

Nginx webserver and reverse proxy with php support and a built-in Certbot (Let's Encrypt) client. It also contains fail2ban for intrusion prevention.
https://docs.linuxserver.io/general/swag
GNU General Public License v3.0
2.93k stars 246 forks source link

[BUG] Swag doesn't start on latest version with mods #517

Open Eirikr70 opened 4 weeks ago

Eirikr70 commented 4 weeks ago

Is there an existing issue for this?

Current Behavior

Swag can't reach stable state and doesn't work.

Expected Behavior

Sserver ready

Steps To Reproduce

Debian 12 Bookworm Swag version 2.11.0-ls333 installed with Docker-compose Mods Crowdsec, Maxmind, auto-reload

Environment

- OS:Debian 12 Bookworm
- How docker service was installed: Docker-compose

CPU architecture

x86-64

Docker creation

services:
  swag:
    image: lscr.io/linuxserver/swag:latest
    container_name: swag
    cap_add:
      - NET_ADMIN
    environment:
      - TZ=Europe/Paris
      - URL=beta.tld
      - VALIDATION=http
      - SUBDOMAINS=xx,xx,xx,xx
      - DOCKER_MODS=linuxserver/mods:swag-auto-reload|linuxserver/mods:swag-maxmind|linuxserver/mods:swag-crowdsec
      - CROWDSEC_API_KEY=verysecret
      - CROWDSEC_LAPI_URL=http://192.168.1.102:8081
      - MAXMINDDB_LICENSE_KEY=alsoverysecret
      - MAXMINDDB_USER_ID=xx
      - EMAIL= alpha@beta.tld
      - ONLY_SUBDOMAINS=false #optional
    volumes:
      - ./config:/config
      - /srv/nas/logs:/config/log
      - ./.htpasswd:/etc/nginx/.htpasswd
    ports:
      - xx.xx.xx.xx:443:443
      - xx.xx.xx.xx:80:80 #optional
    restart: on-failure:5
    cpu_shares: 4096

Container logs

...
swag  | **** Configuring CrowdSec nginx Bouncer ****
swag  | **** Adding swag-auto-reload deps to package install list ****
swag  | **** adding libmaxminddb to package install list ****
swag  | **** Successfully configured CrowdSec nginx Bouncer  ****
swag  | [pkg-install-init] **** Installing all mod packages ****
swag  | fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
swag  | fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
swag  | WARNING: fetching http://dl-cdn.alpinelinux.org/alpine/v3.20/main: IO ERROR
swag  | ERROR: unable to select packages:
swag  |   gettext (no such package):
swag  |     required by: world[gettext]
swag  |   inotify-tools (no such package):
swag  |     required by: world[inotify-tools]
swag  |   libmaxminddb (no such package):
swag  |     required by: world[libmaxminddb]
swag  |   lua-sec (no such package):
swag  |     required by: world[lua-sec]
swag  |   lua5.1 (no such package):
swag  |     required by: world[lua5.1]
swag  |   lua5.1-cjson (no such package):
swag  |     required by: world[lua5.1-cjson]
swag  |   nginx-mod-http-lua (no such package):
swag  |     required by: world[nginx-mod-http-lua]
swag  |                  lua-resty-string-0.15-r0[nginx-mod-http-lua]
swag  |   lua (no such package):
swag  |     required by: lua-resty-http-0.17.2-r0[lua]
swag  | Applying the maxmind mod...
swag  | sed: /etc/libmaxminddb.cron.conf: No such file or directory
swag  | sed: /etc/libmaxminddb.cron.conf: No such file or directory
swag  | Applied the maxmind mod
swag  | [custom-init] No custom files found, skipping...
swag  | MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
swag  | /config/nginx
swag  | ./run: line 15: inotifywait: command not found
swag  | [ls.io-init] done.
swag  | nginx: [emerg] unknown directive "lua_package_path" in /etc/nginx/http.d/crowdsec_nginx.conf:1
swag  | Server ready
swag  | MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
swag  | /config/nginx
swag  | ./run: line 15: inotifywait: command not found
swag  | nginx: [emerg] unknown directive "lua_package_path" in /etc/nginx/http.d/crowdsec_nginx.conf:1
swag  | MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
swag  | /config/nginx
swag  | ./run: line 15: inotifywait: command not found
swag  | nginx: [emerg] unknown directive "lua_package_path" in /etc/nginx/http.d/crowdsec_nginx.conf:1
swag  | MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):
swag  | /config/nginx
github-actions[bot] commented 4 weeks ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 4 weeks ago

Test without the maxmind mod

Eirikr70 commented 4 weeks ago

Test without the maxmind mod

It runs flawlessly.

j0nnymoe commented 4 weeks ago

It could be an issue alpines end, as that's the repo it's having an issue with.

Eirikr70 commented 4 weeks ago

I have reverted to previous version while waiting for the resolution. It runs fine although it took Swag a while to start.

axionman commented 3 weeks ago

Hello,

I get the same message since updating SWAG to latest docker image today. Without Crowdsec MOD, it works flawlessly though.

j0nnymoe commented 3 weeks ago

@axionman open a new thread please.