mapcentia / geocloud2

The GC2 framework helps you build a spatial data infrastructure quickly and easily. Powered using open source components for a scalable solution focused on freedom rather than fees.
https://www.osgeo.org/projects/gc2-vidi/
GNU Affero General Public License v3.0
148 stars 67 forks source link

php-fpm in exit loop #127

Closed tausen closed 1 year ago

tausen commented 2 years ago

I'm on Manjaro Linux. Docker version 20.10.18, build b40c2f6b5d. Docker Compose version 2.11.2.

Linux tausen-t430s 5.15.74-3-MANJARO #1 SMP PREEMPT Sat Oct 15 13:39:11 UTC 2022 x86_64 GNU/Linux

I've followed the instructions here. Running docker-compose up seems to start most components (albeit with some warnings, see full log here), but php-fpm keeps exiting with exit code 78:

gc2-vidi-docker-compose-gc2core-1  | [Thu Oct 20 18:10:06.095759 2022] [proxy:error] [pid 49:tid 140436765140736] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php-fpm.sock (localhost) failed
gc2-vidi-docker-compose-gc2core-1  | [Thu Oct 20 18:10:06.095786 2022] [proxy_fcgi:error] [pid 49:tid 140436765140736] [client 127.0.0.1:42830] AH01079: failed to make connection to backend: httpd-UDS
gc2-vidi-docker-compose-gc2core-1  | 127.0.0.1 - - [20/Oct/2022:18:10:06 +0000] "HEAD /fpm-ping HTTP/1.1" 503 169 "-" "curl/7.64.0"
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:06,239 INFO spawned: 'php-fpm' with pid 4196
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:06,285 INFO exited: php-fpm (exit status 78; not expected)
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:07,289 INFO spawned: 'php-fpm' with pid 4218
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:07,345 INFO exited: php-fpm (exit status 78; not expected)
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:09,351 INFO spawned: 'php-fpm' with pid 4260
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:09,404 INFO exited: php-fpm (exit status 78; not expected)
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:12,410 INFO spawned: 'php-fpm' with pid 4321
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:12,464 INFO exited: php-fpm (exit status 78; not expected)
gc2-vidi-docker-compose-gc2core-1  | 2022-10-20 18:10:13,466 INFO gave up: php-fpm entered FATAL state, too many start retries too quickly

This is repeated every ~30s.

Don't know what to expect, but running run-fpm.sh manually yields:

root@b79d73aa603a:/# ./run-fpm.sh 
rm: cannot remove '/var/run/php-fpm.sock': No such file or directory
[20-Oct-2022 18:07:03] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mapscript.so' (tried: /usr/lib/php/20180731/php_mapscript.so (libmapserver.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/php_mapscript.so.so (/usr/lib/php/20180731/php_mapscript.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[20-Oct-2022 18:07:03] ERROR: failed to open error_log (/dev/stderr): Permission denied (13)
[20-Oct-2022 18:07:03] ERROR: failed to post process the configuration
[20-Oct-2022 18:07:03] ERROR: FPM initialization failed

Any suggestions?

mapcentia commented 2 years ago

I'll test the docker-compose file and reply back

mapcentia commented 2 years ago

Just tried the docker-compose file on WSL2 (Ubuntu) without any issues. I'll see if I can test on some Arch based distros.

tausen commented 2 years ago

Thanks for the feedback!

Odd there should be a disconnect even with docker. What Ubuntu and docker/docker-compose versions are you running? Is the Dockerfile for the mapcentia/gc2core image available somewhere?