php-fpm fails every minute with error on webapps.sock (please help!)

flexjoly

Verified User
Joined
Nov 2, 2016
Messages
89
Location
Apeldoorn, Netherlands
Hi,

Building php (56 and 70) on nginx keeps giving errors while starting. Installing goes fine, but the service won't start normally. At last it did started anyhow.
But then it fails again. So DA start restarting it every minute

I have been searching, reïnstalling, rebuilding for 3 or 4 days now.
It is driving me crazy! Sorry for double posting etc. Please help.

We have a new VPS (2 cores, 4 gb memory) with pre-installed CentOs 7 with directAdmin en custombuild 2.0.
First i updated yum etc. Installed epel-release, postgres (and git). Besides epel, anything is just installed from the defaults on centos7.

Updated DA en Custombuild (with plugin) version: 2.0.0 (rev: 1611). Anything, but php, works fine.


directadmin/errortaskq.log keeps repeating these lines:
Code:
2016:11:15-22:52:06: Error restarting service php-fpm70 : uid 0 gid 0 : /usr/bin/systemctl restart php-fpm70.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:52:31: Error starting service php-fpm56 : uid 0 gid 0 : /usr/bin/systemctl start php-fpm56.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:52:36: service php-fpm56 didn't start, re-starting it
2016:11:15-22:53:02: service php-fpm70 wasn't running, starting it
2016:11:15-22:54:06: Error restarting service php-fpm56 : uid 0 gid 0 : /usr/bin/systemctl restart php-fpm56.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:54:32: Error starting service php-fpm70 : uid 0 gid 0 : /usr/bin/systemctl start php-fpm70.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:54:37: service php-fpm70 didn't start, re-starting it
2016:11:15-22:55:02: service php-fpm56 wasn't running, starting it
2016:11:15-22:56:07: Error restarting service php-fpm70 : uid 0 gid 0 : /usr/bin/systemctl restart php-fpm70.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:56:32: Error starting service php-fpm56 : uid 0 gid 0 : /usr/bin/systemctl start php-fpm56.service        >/dev/null 2>/dev/null                      : returned 1
2016:11:15-22:56:37: service php-fpm56 didn't start, re-starting it

PhpPgAdmin works when php does, but when the service failed then we get this error:
Code:
2016/11/15 22:34:11 [crit] 14443#0: *15 connect() to unix:/usr/local/php56/sockets/webapps.sock failed (2: No such file or directory) while connecting to upstream, client: 12.12.12.12, server: xxx.nl, request: "GET /phppgadmin/redirect.php?subject=server&server=localhost%3A5432%3Aallow HTTP/1.1", upstream: "fastcgi://unix:/usr/local/php56/sockets/webapps.sock:", host: "11.11.111.11", referrer: "http://11.11.111.11/phppgadmin/browser.php"
NB. I changed the url and ip-addresses

when php-fpm failed systemctl status gives:
Code:
]# systemctl status php-fpm70
● php-fpm70.service - The PHP FastCGI Process Manager
   Loaded: loaded (/etc/systemd/system/php-fpm70.service; enabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Tue 2016-11-15 23:16:06 CET; 54s ago
  Process: 16272 ExecStart=/usr/local/php70/sbin/php-fpm70 --nodaemonize (code=exited, status=0/SUCCESS)
 Main PID: 16272 (code=exited, status=0/SUCCESS)

Nov 15 23:14:36 xxx.nl systemd[1]: Starting The PHP FastCGI Process Manager...
Nov 15 23:16:06 xxx.nl systemd[1]: php-fpm70.service start operation timed out. Terminating.
Nov 15 23:16:06 xxx.nl systemd[1]: Failed to start The PHP FastCGI Process Manager.
Nov 15 23:16:06 xxx.nl systemd[1]: Unit php-fpm70.service entered failed state.
Nov 15 23:16:06 xxx.nl systemd[1]: php-fpm70.service failed.

Listing of the dir with the sock files:
Code:
]# ls -al /usr/local/php56/sockets/
total 0
drwx------  2 nginx   nginx 90 Nov 15 23:19 .
drwxr-xr-x 10 root    root  95 Nov 15 01:05 ..
srw-rw----  1 admin   nginx  0 Nov 15 23:19 admin.sock
srw-rw----  1 git     nginx  0 Nov 15 23:19 git.sock
srw-rw----  1 hdh     nginx  0 Nov 15 23:19 hdh.sock
srw-rw----  1 rhcore  nginx  0 Nov 15 23:19 rhcore.sock
srw-rw----  1 webapps nginx  0 Nov 15 23:19 webapps.sock

This dir for php7 seems empty and a minute later it has files :confused: :confused:
Code:
# ls -al /usr/local/php70/sockets/
total 0
drwx------  2 nginx nginx  6 Nov 15 23:20 .
drwxr-xr-x 10 root  root  95 Nov 15 01:13 ..

Code:
[root@rhinestone www]# ls -al /usr/local/php70/sockets/
total 0
drwx------  2 nginx   nginx 90 Nov 15 23:21 .
drwxr-xr-x 10 root    root  95 Nov 15 01:13 ..
srw-rw----  1 admin   nginx  0 Nov 15 23:21 admin.sock
srw-rw----  1 git     nginx  0 Nov 15 23:21 git.sock
srw-rw----  1 hdh     nginx  0 Nov 15 23:21 hdh.sock
srw-rw----  1 rhcore  nginx  0 Nov 15 23:21 rhcore.sock
srw-rw----  1 webapps nginx  0 Nov 15 23:21 webapps.sock

php-fpm stops every minute or so and nginx then gives an 502 error.
Also tried to build without 'pgsql', to be sure that is not the trigger. But that did not help. Also building only php56 did not help.

Please help!
Thanks!
flexJoly
 
Our options for custombuild are:
Code:
Executing /usr/local/directadmin/plugins/custombuild/admin/build options.
Nginx: 1.10.1
ModSecurity: 2.9.0
ModSecurity Rule Set: owasp
htscanner: no
Dovecot: 2.2.26.0
Dovecot configuration: no
AWstats: 7.5
Exim: 4.87
exim.conf update: no
BlockCracking: yes
Easy Spam Fighter: yes
SpamAssassin: 3.4.1
SpamAssassin rule updates: daily
ClamAV: 0.99.2
MariaDB: 10.0.28
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
MySQL compress backups: no
PHP (default): 5.6 as php-fpm
PHP (additional): 7.0 as php-fpm
phpMyAdmin: 4.6.4-all-languages
ProFTPD: no
Pure-FTPd: 1.0.43
RoundCube webmail: 1.2.2
Replace "php.ini" with '/usr/local/directadmin/custombuild/build all' and '/usr/local/directadmin/custombuild/build php_ini': no
Cron for notifications and (or) updates: yes
Cron frequency: daily
Auto notifications: yes
Auto notifications email address: mail protected]
Auto updates: yes
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: 1.4.23-20150507_0200
Zend Guard Loader: no
ionCube loader: no
Suhosin: no
Nginx: 1.10.1
ModSecurity: 2.9.0
ModSecurity Rule Set: owasp
htscanner: no
Dovecot: 2.2.26.0
Dovecot configuration: no
AWstats: 7.5
Exim: 4.87
exim.conf update: no
BlockCracking: yes
Easy Spam Fighter: yes
SpamAssassin: 3.4.1
SpamAssassin rule updates: daily
ClamAV: 0.99.2
MariaDB: 10.0.28
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
MySQL compress backups: no
PHP (default): 5.6 as php-fpm
PHP (additional): 7.0 as php-fpm
phpMyAdmin: 4.6.4-all-languages
ProFTPD: no
Pure-FTPd: 1.0.43
RoundCube webmail: 1.2.2
Replace "php.ini" with '/usr/local/directadmin/custombuild/build all' and '/usr/local/directadmin/custombuild/build php_ini': no
Cron for notifications and (or) updates: yes
Cron frequency: daily
Auto notifications: yes
Auto notifications email address: mail protected]
Auto updates: yes
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: 1.4.23-20150507_0200
Zend Guard Loader: no
ionCube loader: no
Suhosin: no
Done!
 
Is this VPS in Produktiv?

Wen not or possible ( and ofcourse backups) try to build rebuild set only 1 php fpm version at a time. ( for testing and so on)

We had something like this before more then 6 maybe 10 months ago, with apache not nginx, not all of the rest is compatible with (php7) and or php fpm, mostly such a thing is causing behauvior like that. ( DOKU 'S ) ( Also not "ALL of rest applications/settings an so on could be used in combi wen 2 PHP versions are in use"mostly also in DOKU somewhere)

OYEAH after this failure only back to PHP5.6 FPM didn't go either, we replaced the image with a backup snapshot image that was faster then finding the causing error.
After that no time to set the extra php 7 version while Produktiv Time window was running close. Also wen testing i came myself to conclusion to get for different php versions different servers is much more eassy to support wen updates ( at the beginning more then 1 year ago php7 DA custombuild updates with some other webapllications did break more then once only updating default) and or settings have to change or look for if the possibilty is there to do so.... ;)

You did have probs before with some other...
http://forum.directadmin.com/showthread.php?t=53956&p=276565#post276565
Complete reboot server same errors? ( maybe ( i suspect) this was a cause with ours, not did a reboot after a ... (update / settings changed, additions made), then not noticed other updates after that where making a mesh while update/change before wasn't 100% ready/right done)


socket http://forum.directadmin.com/showthread.php?t=49969 and http://forum.directadmin.com/showthread.php?t=52249 and http://forum.directadmin.com/showthread.php?t=52249

ofcourse http://forum.directadmin.com/showthread.php?t=44743
 
Last edited:
Back
Top