Open juanluisbaptiste opened 4 years ago
Interesting - I will fire up a local copy. Reading through that it appears the /etc/cont-init.d/30-wordpress file didn't execute properly (if it did it would make a /tmp/state/30-wordpress-init). Hang on and let me see if I can recreate.
thanks for your uber quick response as usual hehe.
tiredofit:wordpress:php5.6
now pushed to registry. There was a missing if statement I fixed in all other branches but for some reason this one didn't get the fix. Tested and all is well!
Thanks, it works. Now I'm trying to figure out why the website works with the php7.0 image and why with this one it does not.
I think php-fpm is failing to start, on this image:
# ps aux|grep php
33 root 0:00 s6-supervise 20-php-fpm
1598 root 0:00 grep php
On a php7.0 image:
bash-4.3# ps aux|grep php
33 root 2:43 s6-supervise 20-php-fpm
1621 nginx 0:04 {php-fpm7} php-fpm: pool www
1622 nginx 0:04 {php-fpm7} php-fpm: pool www
1626 nginx 0:01 {php-fpm7} php-fpm: pool www
That unfortunately I can't recreate. Can you try inside the container to execute /usr/bin/php-fpm5 and see if it outputs any errors for you?
I get this:
[20-Jan-2020 13:44:46] ALERT: [pool www] user has not been defined
[20-Jan-2020 13:44:46] ERROR: failed to post process the configuration
[20-Jan-2020 13:44:46] ERROR: FPM initialization failed
Here's the contents of my /etc/php5/php-fpm.conf - strictly using defaults for container:
bash-4.4# cat php-fpm.conf
error_log = /www/logs/php-fpm/php-fpm.log
log_level = notice
[www]
listen = 0.0.0.0:9000
listen.owner = nginx
listen.group = www-data
pm = dynamic
pm.max_children = 75
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /php-fpm_status
ping.path = /ping
pm.process_idle_timeout = 10s
pm.max_requests = 500
php_flag[display_errors] = on
php_admin_value[memory_limit] = 128M
php_admin_value[post_max_size] = 2G
php_admin_value[upload_max_filesize] = 2G
php_admin_value[output_buffering] = 0
php_admin_value[openssl.cafile] = /etc/ssl/certs/ca-certificates.crt
php_admin_value[openssl.capath] = /etc/ssl/certs
php_admin_value[max_input_nesting_level] = 256
php_admin_value[max_input_vars] = 10000
php_admin_value[max_execution_time] = 180
catch_workers_output = yes
env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
These are the contents of mine, I have not done any custom configuration, just switched tags on the compose file and started it again:
# cat /etc/php5/php-fpm.conf
error_log = /www/logs/php-fpm/php-fpm.log
log_level = notice
[www]
listen = 0.0.0.0:9000
listen.owner = nginx
listen.group = www-data
pm = dynamic
pm.max_children = 75
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /php-fpm_status
ping.path = /ping
pm.process_idle_timeout = 10s
pm.max_requests = 500
php_flag[display_errors] = on
php_admin_value[memory_limit] = 128M
php_admin_value[post_max_size] = 2G
php_admin_value[upload_max_filesize] = 2G
php_admin_value[output_buffering] = 0
php_admin_value[openssl.cafile] = /etc/ssl/certs/ca-certificates.crt
php_admin_value[openssl.capath] = /etc/ssl/certs
php_admin_value[max_input_nesting_level] = 256
php_admin_value[max_input_vars] = 10000
php_admin_value[max_execution_time] = 180
catch_workers_output = yes
env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
Looks the exact same :) We have a mystery on our hands now as your configuration is just fine and PHP should definitely not be throwing that error :P
Damn... but it is just a regular wordpress site, it works perfectly with the php7.0 image but because of an unsupported plugin I need to run it on php5.6 for now.
What other info can I provide you to investigate this ?
These are my env_file values:
FORCE_RESET_PERMISSIONS=false
DB_HOST=mysql-db
DB_NAME=wordpress
DB_USER=wordpress
DB_PASS=xxxxxxx
WORKER_PROCESSES=1
WORKER_CONNECTIONS=512
FPM_MAX_CHILDREN=120
FPM_MAX_REQUESTS=1000
ENABLE_GZIP_COMPRESSION=false
ENABLE_HTTPS_REVERSE_PROXY=FALSE
ADMIN_EMAIL=soporte@xxxx.xxx
ADMIN_USER=admin
ADMIN_PASS=xxxxx
The environment variables look just fine to me. Can you try starting it up without your data emulating a fresh install to see if it continues to happen?
And you are right, short of a couple different PHP options and a different location for config those wordpress images are exactly the same. You could also try replicating it by using the base of tiredofit/nginx-php-fpm/5.6 (set your NGINX_WEBROOT var to /www/wordpress) and it should run as well. The wordpress image just does the fancy setup/config changes which if you have already installed, you shouldn't need..
The environment variables look just fine to me. Can you try starting it up without your data emulating a fresh install to see if it continues to happen?
Just did, same result and same error on php-fpm log:
[20-Jan-2020 13:44:46] ALERT: [pool www] user has not been defined
[20-Jan-2020 13:44:46] ERROR: failed to post process the configuration
[20-Jan-2020 13:44:46] ERROR: FPM initialization failed
You could also try replicating it by using the base of tiredofit/nginx-php-fpm/5.6 (set your NGINX_WEBROOT var to /www/wordpress) and it should run as well. The wordpress image just does the fancy setup/config changes which if you have already installed, you shouldn't need..
Now I will test this.
I was looking again at the container logs and noticed that the initial error is still present. I'm checking if it's that I'm still running the previous version.
Nope, I manually deleted the tiredofit/wordpress:php5.6 image from all the nodes, and redeployed the image, new image pulled and the error still happens.
I'm signing off for the day but first thing in am will try to recreate under a different environment.
I just can't recreate this. I rebuilt a new system and tried every which way to make this break. I found one thing that shouldn't affect anything on an existing install which was related to the database server not being fast enough to take my install on this VM. That's been resolved in the 5.6 version (and was long ago fixed in the 7.x series)..
I will ship this around to some other servers to see if I can get it to happen but I'm stuck right now.
Weird, I went to each swarm node and made sure there was no tiredofit/wordpress:php5.6 images present and then manually pulled the image in one of the manager nodes and launched the app. I will test locally and see what I get.
Hi Dave,
I was testing the php5.6 image and init is currently failing with this error:
It seems there's an init file missing ?