Author Topic: php-fpm not created  (Read 509 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
php-fpm not created
« on: May 31, 2020, 02:17:27 PM »
Last night we had a problem, all our http-sites where out.
In the logs:
May 31 03:27:18 web16 systemd: Stopping CentOS Web Panel service (daemon)...
May 31 03:27:18 web16 systemd: Stopped CentOS Web Panel service (daemon).
May 31 03:27:18 web16 systemd: Starting CentOS Web Panel service (daemon)...
May 31 03:27:18 web16 cwpsrv: cwpsrv: [warn] he "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/cwpsrv/conf.d/api.conf:8
May 31 03:27:18 web16 cwpsrv: cwpsrv:the configuration file /usr/local/cwpsrv/conf/cwpsrv.conf syntax is ok
May 31 03:27:18 web16 cwpsrv: cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test is successful
May 31 03:27:18 web16 cwpsrv: cwpsrv: [warn] he "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/cwpsrv/conf.d/api.conf:8
May 31 03:27:19 web16 systemd: Started CentOS Web Panel service (daemon).
May 31 03:27:19 web16 systemd: Stopping Web server Apache...
May 31 03:27:32 web16 systemd: Stopped Web server Apache.
May 31 03:27:32 web16 systemd: Starting Web server Apache...
May 31 03:27:33 web16 systemd: Started Web server Apache.
May 31 03:27:33 web16 systemd: Reloading Web server Apache.
May 31 03:27:33 web16 apachectl: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
May 31 03:27:33 web16 apachectl: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
May 31 03:27:33 web16 apachectl: no listening sockets available, shutting down
May 31 03:27:33 web16 apachectl: AH00015: Unable to open logs
May 31 03:27:33 web16 apachectl: httpd not running, trying to start
May 31 03:27:33 web16 systemd: httpd.service: control process exited, code=exited status=1
May 31 03:27:33 web16 systemd: Reload failed for Web server Apache.
May 31 03:27:33 web16 systemd: Reloading.
May 31 03:27:34 web16 systemd: Reloading Web server Apache.
May 31 03:27:34 web16 systemd: Reloaded Web server Apache.


We also stumbled on another problem:
May 30 01:08:01 web16 systemd: Reloading The PHP FastCGI Process Manager.
May 30 01:08:01 web16 systemd: Can't open PID file /opt/alt/php-fpm72/usr/var/run/php-fpm.pid (yet?) after reload: No such file or directory
May 30 01:08:01 web16 systemd: Reloaded The PHP FastCGI Process Manager.
May 30 01:08:01 web16 systemd: Reloading The PHP FastCGI Process Manager.
May 30 01:08:01 web16 systemd: Can't open PID file /opt/alt/php-fpm73/usr/var/run/php-fpm.pid (yet?) after reload: No such file or directory
May 30 01:08:01 web16 systemd: Reloaded The PHP FastCGI Process Manager.


This lost one is because the defaulf pid in php-fpm is "none", and it is not configured in the php-fpm config,
however there's an pid configured in the systemd-service.

Fixed it by adding 2 config-files
/opt/alt/php-fpm72/usr/etc/php-fpm.d/global.conf:
[global]
pid = /opt/alt/php-fpm72/usr/var/run/php-fpm.pid


/opt/alt/php-fpm73/usr/etc/php-fpm.d/global.conf:
[global]
pid = /opt/alt/php-fpm73/usr/var/run/php-fpm.pid



@CWP: please fix this in your configuration
« Last Edit: May 31, 2020, 02:24:09 PM by thenob »