[ZBX-24771] Zabbix-Web Image auf Basis von Ubuntu not working Created: 2024 Jul 03 Updated: 2024 Jul 05 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 7.0.0 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Stefan Hölzle | Assignee: | Alexey Pustovalov |
Resolution: | Unresolved | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Steps to reproduce:
Result: 2024-07-03 07:29:31,897 INFO RPC interface 'supervisor' initialized 2024-07-03 07:29:31,897 INFO RPC interface 'supervisor' initialized 2024-07-03 07:29:31,897 INFO supervisord started with pid 6 2024-07-03 07:29:31,897 INFO supervisord started with pid 6 2024-07-03 07:29:32,900 INFO spawned: 'nginx' with pid 18 2024-07-03 07:29:32,900 INFO spawned: 'nginx' with pid 18 2024-07-03 07:29:32,902 INFO spawned: 'php-fpm8.3' with pid 19 2024-07-03 07:29:32,902 INFO spawned: 'php-fpm8.3' with pid 19 [03-Jul-2024 07:29:33] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:33] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:33] ERROR: FPM initialization failed [03-Jul-2024 07:29:33] ERROR: FPM initialization failed 2024-07-03 07:29:33,063 WARN exited: php-fpm8.3 (exit status 78; not expected) 2024-07-03 07:29:33,063 WARN exited: php-fpm8.3 (exit status 78; not expected) 2024/07/03 07:29:33 [crit] 20#20: *1 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "POST /zabbix.php?action=widget.svggraph.view HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" 10.76.184.82 - - [03/Jul/2024:07:29:33 +0000] "POST /zabbix.php?action=widget.svggraph.view HTTP/1.0" 502 166 "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.76.76.130" 2024-07-03 07:29:34,174 INFO spawned: 'php-fpm8.3' with pid 25 2024-07-03 07:29:34,174 INFO spawned: 'php-fpm8.3' with pid 25 [03-Jul-2024 07:29:34] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:34] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:34] ERROR: FPM initialization failed [03-Jul-2024 07:29:34] ERROR: FPM initialization failed 2024-07-03 07:29:34,230 WARN exited: php-fpm8.3 (exit status 78; not expected) 2024-07-03 07:29:34,230 WARN exited: php-fpm8.3 (exit status 78; not expected) 2024/07/03 07:29:35 [crit] 21#21: *3 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "POST /jsrpc.php?output=json-rpc HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" 2024-07-03 07:29:35,171 INFO success: nginx entered RUNNING state, process has stayed up for > than 2 seconds (startsecs) 2024-07-03 07:29:35,171 INFO success: nginx entered RUNNING state, process has stayed up for > than 2 seconds (startsecs) 10.76.184.82 - - [03/Jul/2024:07:29:35 +0000] "POST /jsrpc.php?output=json-rpc HTTP/1.0" 502 166 "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.76.76.130" 2024/07/03 07:29:36 [crit] 22#22: *5 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "GET /zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now" 10.76.184.82 - - [03/Jul/2024:07:29:36 +0000] "GET /zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now HTTP/1.0" 502 166 "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0" "10.76.76.130" 2024/07/03 07:29:36 [crit] 23#23: *7 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "POST /zabbix.php?action=notifications.get&output=ajax HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" 2024-07-03 07:29:36,246 INFO spawned: 'php-fpm8.3' with pid 26 2024-07-03 07:29:36,246 INFO spawned: 'php-fpm8.3' with pid 26 2024/07/03 07:29:36 [crit] 24#24: *8 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "POST /zabbix.php?action=widget.svggraph.view HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" 10.76.184.82 - - [03/Jul/2024:07:29:36 +0000] "POST /zabbix.php?action=widget.svggraph.view HTTP/1.0" 502 166 "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.76.76.130" 10.76.184.82 - - [03/Jul/2024:07:29:36 +0000] "POST /zabbix.php?action=notifications.get&output=ajax HTTP/1.0" 502 166 "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-3M&to=now" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" "10.76.76.130" [03-Jul-2024 07:29:36] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:36] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:36] ERROR: FPM initialization failed [03-Jul-2024 07:29:36] ERROR: FPM initialization failed 2024/07/03 07:29:36 [crit] 20#20: *11 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.76.184.82, server: zabbix, request: "GET /zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "zabbix.cda.server.lan", referrer: "https://zabbix.cda.server.lan/zabbix.php?action=dashboard.view&dashboardid=1&from=now-7d&to=now" 2024-07-03 07:29:36,729 WARN exited: php-fpm8.3 (exit status 78; not expected) 2024-07-03 07:29:36,729 WARN exited: php-fpm8.3 (exit status 78; not expected) |
Comments |
Comment by Alexey Pustovalov [ 2024 Jul 03 ] |
Please share inspect output for the container. |
Comment by Stefan Hölzle [ 2024 Jul 03 ] |
dotneft, here is the inspect output of the container: [ { "Id": "9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86", "Created": "2024-07-03T12:18:52.820863474Z", "Path": "docker-entrypoint.sh", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 26197, "ExitCode": 0, "Error": "", "StartedAt": "2024-07-03T12:18:53.29773871Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:485ef8ee3559376424d7ca934ccac762a83a57acb1fc73f27e637c497bdd98ab", "ResolvConfPath": "/opt/docker/containers/9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86/resolv.conf", "HostnamePath": "/opt/docker/containers/9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86/hostname", "HostsPath": "/opt/docker/containers/9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86/hosts", "LogPath": "/opt/docker/containers/9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86/9eab28124c60391d04d0590329253f578c8035c377e8afcd2422dc6bbf464f86-json.log", "Name": "/zabbix-web", "RestartCount": 0, "Driver": "btrfs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": [ "/opt/data/www-data/zabbix-web/ssl:/etc/ssl/nginx:rw", "/opt/data/www-data/zabbix-web/ssl/ca-certificates.crt:/etc/openldap/certs/ca-certificates.crt:rw", "/opt/data/www-data/zabbix-web/ssl/ca-certificates.crt:/etc/ssl/pgsql/ca-certificates.crt:rw", "/opt/data/www-data/zabbix-web/ldap/ldap.conf:/etc/openldap/ldap.conf:rw" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "8443/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "8643" } ] }, "RestartPolicy": { "Name": "unless-stopped", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": null, "GroupAdd": null, "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": null, "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ], "Init": true }, "GraphDriver": { "Data": null, "Name": "btrfs" }, "Mounts": [ { "Type": "bind", "Source": "/opt/data/www-data/zabbix-web/ssl/ca-certificates.crt", "Destination": "/etc/openldap/certs/ca-certificates.crt", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/opt/data/www-data/zabbix-web/ssl/ca-certificates.crt", "Destination": "/etc/ssl/pgsql/ca-certificates.crt", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/opt/data/www-data/zabbix-web/ldap/ldap.conf", "Destination": "/etc/openldap/ldap.conf", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/opt/data/www-data/zabbix-web/ssl", "Destination": "/etc/ssl/nginx", "Mode": "rw", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "9eab28124c60", "Domainname": "", "User": "root", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "8080/tcp": {}, "8443/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "POSTGRES_USER=zabbix-db-user", "DB_SERVER_SCHEMA=zabbix-db-schema", "ZBX_DB_CA_FILE=/etc/ssl/pgsql/ca-certificates.crt", "ZBX_SERVER_HOST=hostname..", "POSTGRES_PASSWORD=db-password", "DB_SERVER_HOST=db-hostname", "POSTGRES_DB=zabbix-db", "ZBX_SERVER_NAME=Zabbix", "DB_SERVER_PORT=5432", "ZBX_DB_ENCRYPTION=true", "PHP_TZ=Europe/Berlin", "ZBX_DB_VERIFY_HOST=true", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "ZBX_VERSION=7.0.0", "ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git" ], "Cmd": null, "Image": "zabbix/zabbix-web-nginx-pgsql:7.0-ubuntu-latest", "Volumes": null, "WorkingDir": "/usr/share/zabbix", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": null, "Labels": { "org.opencontainers.image.authors": "Alexey Pustovalov <[email protected]>", "org.opencontainers.image.created": "2024-06-21T09:52:09.720Z", "org.opencontainers.image.description": "Zabbix web-interface based on Nginx web server with PostgreSQL database support", "org.opencontainers.image.documentation": "https://www.zabbix.com/documentation/7.0/manual/installation/containers", "org.opencontainers.image.licenses": "AGPL v3.0", "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.revision": "48a86dfa8de7a3d43a392de11aac95d792983e71", "org.opencontainers.image.source": "https://git.zabbix.com/scm/zbx/zabbix.git", "org.opencontainers.image.title": "Zabbix web-interface (Nginx, PostgreSQL)", "org.opencontainers.image.url": "https://zabbix.com/", "org.opencontainers.image.vendor": "Zabbix SIA", "org.opencontainers.image.version": "7.0.0" }, "StopSignal": "SIGTERM" }, "NetworkSettings": { "Bridge": "", "SandboxID": "2ccfbd6fa8daff6ad0e18b9dab6fd885ff4756d43abc1c3da075e56b9c25ed1e", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "8080/tcp": null, "8443/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "8643" } ] }, "SandboxKey": "/var/run/docker/netns/2ccfbd6fa8da", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "cd84455f68db9e78611b545258f67944096af03d3a6d359aeda1b6b555da38a7", "Gateway": "192.168.122.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "192.168.122.2", "IPPrefixLen": 23, "IPv6Gateway": "", "MacAddress": "02:42:c0:a8:7a:02", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "899f169d51b00916fe5e7be873c6cd5fbfb430fec4059715b80c7070dcb1461e", "EndpointID": "cd84455f68db9e78611b545258f67944096af03d3a6d359aeda1b6b555da38a7", "Gateway": "192.168.122.1", "IPAddress": "192.168.122.2", "IPPrefixLen": 23, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:c0:a8:7a:02", "DriverOpts": null } } } } ] |
Comment by Alexey Pustovalov [ 2024 Jul 03 ] |
It looks like you override /etc/nginx / /etc/php directory. What you have the command output: grep -R nginx /etc/php/ |
Comment by Stefan Hölzle [ 2024 Jul 03 ] |
Is that good enough? $ docker run --entrypoint /bin/bash -it --rm zabbix/zabbix-web-nginx-pgsql:7.0-ubuntu-latest zabbix@dec7b8db7bd5:/usr/share/zabbix$ grep -R nginx /etc/php/ zabbix@dec7b8db7bd5:/usr/share/zabbix$ |
Comment by Alexey Pustovalov [ 2024 Jul 03 ] |
Nope, I'm asking the command output from the container where you have such error: [03-Jul-2024 07:29:33] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) [03-Jul-2024 07:29:33] ERROR: [pool zabbix] cannot get uid for user 'nginx': Success (0) Official image does not have "nginx" user in the configuration files |
Comment by Stefan Hölzle [ 2024 Jul 03 ] |
Ok, here it is: $ docker exec -it zabbix-web bash root@9eab28124c60:/usr/share/zabbix# grep -R nginx /etc/php /etc/php/8.3/fpm/pool.d/zabbix.conf:listen.owner = nginx /etc/php/8.3/fpm/pool.d/zabbix.conf:listen.group = nginx |
Comment by Alexey Pustovalov [ 2024 Jul 03 ] |
So, you use some modified image, not our official. As you see "zabbix/zabbix-web-nginx-pgsql:7.0-ubuntu-latest" does not have "nginx" in /etc/php/8.3/fpm/pool.d/zabbix.conf. |
Comment by Stefan Hölzle [ 2024 Jul 03 ] |
I use the unmodified image from docker hub that is mirrored to another image registry. $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE zabbix/zabbix-web-nginx-pgsql 7.0-ubuntu-latest 485ef8ee3559 12 days ago 439MB internal.registry/mirror/docker.io/zabbix/zabbix-web-nginx-pgsql 7.0-ubuntu-latest 485ef8ee3559 12 days ago 439MB $ docker inspect 485ef8ee3559 [ { "Id": "sha256:485ef8ee3559376424d7ca934ccac762a83a57acb1fc73f27e637c497bdd98ab", "RepoTags": [ "zabbix/zabbix-web-nginx-pgsql:7.0-ubuntu-latest", "internal.registry/mirror/docker.io/zabbix/zabbix-web-nginx-pgsql:7.0-ubuntu-latest" ], "RepoDigests": [ "zabbix/zabbix-web-nginx-pgsql@sha256:a9ec4f90071ccc682207a5191c1e63246c91cb9884539ebed436ceaf29f93f91", "internal.registry/mirror/docker.io/zabbix/zabbix-web-nginx-pgsql@sha256:42452b3d98cc402312695e632107d15017ba5da58514f314f0c23650a18e6dfb" ], ... "RootFS": { "Type": "layers", "Layers": [ "sha256:a30a5965a4f7d9d5ff76a46eb8939f58e95be844de1ac4a4b452d5d31158fdea", "sha256:2262818091ae76112717f71b4b65d42f7f3e3b26397707888d6f591f4465d55e", "sha256:cae02e138015ddf0932b25252280121e56db6dbea741d7a6f6a51d7f55baa1bb", "sha256:326dc8a38c82ee9f5c364f92e74c21180905ddfa3b0021e0b6a8becbc0f754ee", "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef", "sha256:f8bfc277e3fb1ed77d022858ba7438bb8cd10f2e4cf2107db7116268ef863cf3" ] }, ... Digest from DockerHub: sha256:a9ec4f90071ccc682207a5191c1e63246c91cb9884539ebed436ceaf29f93f91 |
Comment by Alexey Pustovalov [ 2024 Jul 03 ] |
anyway docker run --entrypoint /bin/bash -it --rm zabbix/zabbix-web-nginx-pgsql@sha256:a9ec4f90071ccc682207a5191c1e63246c91cb9884539ebed436ceaf29f93f91 no output for "grep -R nginx /etc/php/". Try to remove container and start again. |
Comment by Stefan Hölzle [ 2024 Jul 04 ] |
My container runs as root. With the alpine image, this is not an issue, because there is a user nginx in passwd. |
Comment by Alexey Pustovalov [ 2024 Jul 04 ] |
Why do you run it under "root"? But, anyway, thanks! The issue must be fixed for "root" user. |
Comment by Alexey Pustovalov [ 2024 Jul 05 ] |
Fixed issue. Please check in 4-6 hours. |