linuxserver / docker-mods

Documentation and Examples of base container modifications
GNU General Public License v3.0
1.06k stars 280 forks source link

Dashboard Docker mod for SWAG is not working on RPi4 #333

Closed evanre closed 2 years ago

evanre commented 2 years ago

Hey, I've installed and set up the Dashboard for SWAG, and it seems not working in my case. After pointing subdomain on the folder the page stay blank, I tried to check the logs, but they were empty, debug mode in PHP also thinks everything is okay.

So, I started to debug the PHP code and find out that /dasboard/www/index.php:255 returns nothing.

$goaccess = shell_exec("/usr/local/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb);

I also tried to manually exec the /usr/local/bin/goaccess, and it says, "No such file or directory" seems like some lack of dependencies. I came up that the goaccess binary is built incorrectly. At least these commands resolved the problem:

rm /usr/local/bin/goaccess
apk add goaccess
ln -s /usr/bin/goaccess /usr/local/bin/goaccess

PS. I'm running my Docker environment on Raspberry Pi 4 4gb with LibreElec OS.

The logs from swag:

Recreating swag ... done
2022-02-19T15:24:23.902631000Z [mod-init] Curl/JQ was not found on this system for Docker mods installing
2022-02-19T15:24:23.950165000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
2022-02-19T15:24:24.559911000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
2022-02-19T15:24:25.035247000Z (1/1) Installing jq (1.6-r1)
2022-02-19T15:24:25.073839000Z Executing busybox-1.33.1-r6.trigger
2022-02-19T15:24:25.100801000Z OK: 218 MiB in 228 packages
2022-02-19T15:24:25.178023000Z [mod-init] Attempting to run Docker Modification Logic
2022-02-19T15:24:25.351464000Z [mod-init] Applying linuxserver/mods:swag-imagemagick files to container
2022-02-19T15:24:26.625857000Z [mod-init] Applying linuxserver/mods:swag-dashboard files to container
2022-02-19T15:24:28.036216000Z [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2022-02-19T15:24:28.159800000Z [s6-init] ensuring user provided files have correct perms...exited 0.
2022-02-19T15:24:28.162347000Z [fix-attrs.d] applying ownership & permissions fixes...
2022-02-19T15:24:28.164247000Z [fix-attrs.d] done.
2022-02-19T15:24:28.168540000Z [cont-init.d] executing container initialization scripts...
2022-02-19T15:24:28.171487000Z [cont-init.d] 01-envfile: executing...
2022-02-19T15:24:28.181904000Z [cont-init.d] 01-envfile: exited 0.
2022-02-19T15:24:28.184408000Z [cont-init.d] 02-tamper-check: executing...
2022-02-19T15:24:28.206173000Z [cont-init.d] 02-tamper-check: exited 0.
2022-02-19T15:24:28.209507000Z [cont-init.d] 10-adduser: executing...
2022-02-19T15:24:28.287005000Z -------------------------------------
2022-02-19T15:24:28.287138000Z           _         ()
2022-02-19T15:24:28.287252000Z          | |  ___   _    __
2022-02-19T15:24:28.287379000Z          | | / __| | |  /  \
2022-02-19T15:24:28.287486000Z          | | \__ \ | | | () |
2022-02-19T15:24:28.287595000Z          |_| |___/ |_|  \__/
2022-02-19T15:24:28.287941000Z Brought to you by linuxserver.io
2022-02-19T15:24:28.288050000Z -------------------------------------
2022-02-19T15:24:28.288296000Z To support the app dev(s) visit:
2022-02-19T15:24:28.289337000Z Certbot: https://supporters.eff.org/donate/support-work-on-certbot
2022-02-19T15:24:28.290494000Z To support LSIO projects visit:
2022-02-19T15:24:28.290619000Z https://www.linuxserver.io/donate/
2022-02-19T15:24:28.290752000Z -------------------------------------
2022-02-19T15:24:28.290863000Z GID/UID
2022-02-19T15:24:28.290974000Z -------------------------------------
2022-02-19T15:24:28.296584000Z User uid:    1000
2022-02-19T15:24:28.296698000Z User gid:    1000
2022-02-19T15:24:28.296799000Z -------------------------------------
2022-02-19T15:24:28.308337000Z [cont-init.d] 10-adduser: exited 0.
2022-02-19T15:24:28.311021000Z [cont-init.d] 20-config: executing...
2022-02-19T15:24:28.437824000Z [cont-init.d] 20-config: exited 0.
2022-02-19T15:24:28.440892000Z [cont-init.d] 30-keygen: executing...
2022-02-19T15:24:28.448781000Z using keys found in /config/keys
2022-02-19T15:24:28.450109000Z [cont-init.d] 30-keygen: exited 0.
2022-02-19T15:24:28.453291000Z [cont-init.d] 50-config: executing...
2022-02-19T15:24:28.461127000Z Variables set:
2022-02-19T15:24:28.461381000Z PUID=1000
2022-02-19T15:24:28.461510000Z PGID=1000
2022-02-19T15:24:28.461763000Z TZ=/////////////
2022-02-19T15:24:28.461875000Z URL=/////////////
2022-02-19T15:24:28.461979000Z SUBDOMAINS=wildcard
2022-02-19T15:24:28.462083000Z EXTRA_DOMAINS=
2022-02-19T15:24:28.462187000Z ONLY_SUBDOMAINS=false
2022-02-19T15:24:28.462292000Z VALIDATION=dns
2022-02-19T15:24:28.462406000Z CERTPROVIDER=
2022-02-19T15:24:28.462511000Z DNSPLUGIN=cloudflare
2022-02-19T15:24:28.462613000Z EMAIL=/////////////
2022-02-19T15:24:28.462717000Z STAGING=
2022-02-19T15:24:28.653052000Z Using Let\'s Encrypt as the cert provider
2022-02-19T15:24:28.653321000Z SUBDOMAINS entered, processing
2022-02-19T15:24:28.653459000Z Wildcard cert for ///////////// will be requested
2022-02-19T15:24:28.653575000Z E-mail address entered: /////////////
2022-02-19T15:24:28.671367000Z dns validation via cloudflare plugin is selected
2022-02-19T15:24:28.754297000Z Certificate exists; parameters unchanged; starting nginx
2022-02-19T15:24:35.878861000Z [cont-init.d] 50-config: exited 0.
2022-02-19T15:24:35.881416000Z [cont-init.d] 60-renew: executing...
2022-02-19T15:24:35.928767000Z The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
2022-02-19T15:24:35.930071000Z [cont-init.d] 60-renew: exited 0.
2022-02-19T15:24:35.933178000Z [cont-init.d] 70-templates: executing...
2022-02-19T15:24:35.993102000Z **** The following nginx confs have different version dates than the defaults that are shipped. ****
2022-02-19T15:24:35.993389000Z **** This may be due to user customization or an update to the defaults. ****
2022-02-19T15:24:35.993531000Z **** To update them to the latest defaults shipped within the image, delete these files and restart the container. ****
2022-02-19T15:24:35.993650000Z **** If they are user customized, check the date version at the top and compare to the upstream changelog via the link. ****
2022-02-19T15:24:35.993764000Z /config/nginx/ssl.conf
2022-02-19T15:24:35.993874000Z /config/nginx/proxy.conf
2022-02-19T15:24:35.994003000Z /config/nginx/nginx.conf
2022-02-19T15:24:36.003929000Z [cont-init.d] 70-templates: exited 0.
2022-02-19T15:24:36.006560000Z [cont-init.d] 90-custom-folders: executing...
2022-02-19T15:24:36.021797000Z [cont-init.d] 90-custom-folders: exited 0.
2022-02-19T15:24:36.024603000Z [cont-init.d] 98-dashboard-config: executing...
2022-02-19T15:24:36.033003000Z Applying the SWAG dashboard mod...
2022-02-19T15:24:36.035778000Z **** Installing/updating goaccess ****
2022-02-19T15:24:36.114463000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
2022-02-19T15:24:36.579008000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
2022-02-19T15:24:37.188803000Z OK: 218 MiB in 228 packages
2022-02-19T15:24:37.272184000Z Applied the SWAG dashboard mod
2022-02-19T15:24:37.273648000Z [cont-init.d] 98-dashboard-config: exited 0.
2022-02-19T15:24:37.276493000Z [cont-init.d] 98-imagemagick: executing...
2022-02-19T15:24:37.284904000Z **** installing imagemagick ****
2022-02-19T15:24:37.312474000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
2022-02-19T15:24:37.542157000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
2022-02-19T15:24:37.969707000Z (1/30) Installing fontconfig (2.13.1-r4)
2022-02-19T15:24:38.021277000Z (2/30) Installing lcms2 (2.12-r1)
2022-02-19T15:24:38.050403000Z (3/30) Installing libltdl (2.4.6-r7)
2022-02-19T15:24:38.075435000Z (4/30) Installing imagemagick-libs (7.0.11.14-r0)
2022-02-19T15:24:38.158748000Z (5/30) Installing libxrender (0.9.10-r3)
2022-02-19T15:24:38.190687000Z (6/30) Installing pixman (0.40.0-r2)
2022-02-19T15:24:38.227475000Z (7/30) Installing cairo (1.16.0-r3)
2022-02-19T15:24:38.276801000Z (8/30) Installing dbus-libs (1.12.20-r2)
2022-02-19T15:24:38.308556000Z (9/30) Installing avahi-libs (0.8-r5)
2022-02-19T15:24:38.338715000Z (10/30) Installing cups-libs (2.3.3-r2)
2022-02-19T15:24:38.374520000Z (11/30) Installing jbig2dec (0.19-r0)
2022-02-19T15:24:38.402800000Z (12/30) Installing tiff (4.2.0-r1)
2022-02-19T15:24:38.437289000Z (13/30) Installing ghostscript (9.54.0-r1)
2022-02-19T15:24:39.440169000Z (14/30) Installing aom-libs (1.0.0-r3)
2022-02-19T15:24:39.508616000Z (15/30) Installing libde265 (1.0.8-r1)
2022-02-19T15:24:39.549547000Z (16/30) Installing x265-libs (3.4-r0)
2022-02-19T15:24:39.591668000Z (17/30) Installing libheif (1.12.0-r0)
2022-02-19T15:24:39.633192000Z (18/30) Installing cairo-gobject (1.16.0-r3)
2022-02-19T15:24:39.660806000Z (19/30) Installing pkgconf (1.7.4-r0)
2022-02-19T15:24:39.689665000Z (20/30) Installing shared-mime-info (2.1-r0)
2022-02-19T15:24:39.750963000Z (21/30) Installing gdk-pixbuf (2.42.6-r0)
2022-02-19T15:24:39.789538000Z (22/30) Installing libxft (2.3.3-r0)
2022-02-19T15:24:39.812973000Z (23/30) Installing fribidi (1.0.10-r0)
2022-02-19T15:24:39.841500000Z (24/30) Installing graphite2 (1.3.14-r0)
2022-02-19T15:24:39.876725000Z (25/30) Installing harfbuzz (2.8.1-r0)
2022-02-19T15:24:39.927115000Z (26/30) Installing pango (1.48.5-r0)
2022-02-19T15:24:39.969546000Z (27/30) Installing librsvg (2.50.4-r1)
2022-02-19T15:24:40.146384000Z (28/30) Installing imagemagick (7.0.11.14-r0)
2022-02-19T15:24:40.286786000Z (29/30) Installing libgomp (10.3.1_git20210424-r2)
2022-02-19T15:24:40.321447000Z (30/30) Installing php7-pecl-imagick (3.5.0-r1)
2022-02-19T15:24:40.355539000Z Executing busybox-1.33.1-r6.trigger
2022-02-19T15:24:40.362383000Z Executing fontconfig-2.13.1-r4.trigger
2022-02-19T15:24:42.386534000Z Executing shared-mime-info-2.1-r0.trigger
2022-02-19T15:25:01.227296000Z Executing gdk-pixbuf-2.42.6-r0.trigger
2022-02-19T15:25:01.290120000Z OK: 293 MiB in 258 packages
2022-02-19T15:25:01.381883000Z [cont-init.d] 98-imagemagick: exited 0.
2022-02-19T15:25:01.386895000Z [cont-init.d] 99-custom-files: executing...
2022-02-19T15:25:01.409192000Z [custom-init] files found in /config/custom-cont-init.d executing
2022-02-19T15:25:01.412387000Z [custom-init] init.sh: executing...
2022-02-19T15:25:01.415884000Z **** custom init start ****
2022-02-19T15:25:01.416158000Z **** installing fileman utils ****
2022-02-19T15:25:01.449853000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
2022-02-19T15:25:01.831027000Z fetch http://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
2022-02-19T15:25:02.472831000Z (1/4) Installing zlib-dev (1.2.11-r3)
2022-02-19T15:25:02.500291000Z (2/4) Installing xz-dev (5.2.5-r0)
2022-02-19T15:25:02.542336000Z (3/4) Installing libzip-dev (1.7.3-r2)
2022-02-19T15:25:02.569047000Z (4/4) Installing oniguruma-dev (6.9.7.1-r0)
2022-02-19T15:25:02.615297000Z Executing busybox-1.33.1-r6.trigger
2022-02-19T15:25:02.645265000Z OK: 294 MiB in 262 packages
2022-02-19T15:25:02.725839000Z **** custom init finished ****
2022-02-19T15:25:02.726993000Z [custom-init] init.sh: exited 0
2022-02-19T15:25:02.731117000Z [cont-init.d] 99-custom-files: exited 0.
2022-02-19T15:25:02.732817000Z [cont-init.d] done.
2022-02-19T15:25:02.734821000Z [services.d] starting services
2022-02-19T15:25:02.775036000Z [services.d] done.
2022-02-19T15:25:05.107458000Z Server ready
Roxedus commented 2 years ago

Post logs

aptalca commented 2 years ago

can you exec in to the container and do uname -a? or from the host terminal, do docker exec -it swag uname -a

evanre commented 2 years ago

@aptalca

Pi4:~ # docker exec -it swag uname -a
Linux 48a0e6ecdb2c 5.10.52 #1 SMP Wed Aug 11 14:10:51 CEST 2021 aarch64 GNU/Linux
aptalca commented 2 years ago

That's just it. Your kernel is 64bit but you're using the 32bit image for swag. The mod looks at the kernel and uses the 64bit binary, which doesn't work in the 32bit image

evanre commented 2 years ago

Wow, didn't know that, usually not specifying the tag (go with "latest"). Specified the image: lscr.io/linuxserver/swag:arm64v8-latest and it worked just great. Thanks!