Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - geolaw

Pages: [1]
1
PHP / php-fpm74 systemd warnings on extranneous lvalues
« on: January 29, 2021, 03:36:06 PM »
I recent installed php7.4 in the php selector

It seems to be working properly, however, the php-fpm74 unit file seems to contain a bunch of unrecognized

systemctl status shows :
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:31] Unknown lvalue 'ProtectKernelModules' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:38] Unknown lvalue 'ProtectKernelTunables' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:44] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:47] Unknown lvalue 'RestrictRealtime' in section 'Service'
Jan 28 03:47:33 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:54] Unknown lvalue 'RestrictNamespaces' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:31] Unknown lvalue 'ProtectKernelModules' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:38] Unknown lvalue 'ProtectKernelTunables' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:44] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:47] Unknown lvalue 'RestrictRealtime' in section 'Service'
Jan 29 03:20:32 web3.geolaw.com systemd[1]: [/usr/lib/systemd/system/php-fpm74.service:54] Unknown lvalue 'RestrictNamespaces' in section 'Service'



# cat /usr/lib/systemd/system/php-fpm74.service |grep -v ^#

[Unit]
Description=The PHP FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/alt/php-fpm74/usr/var/run/php-fpm.pid
ExecStart=/opt/alt/php-fpm74/usr/sbin/php-fpm --nodaemonize --fpm-config /opt/alt/php-fpm74/usr/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
ProtectSystem=full
PrivateDevices=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictNamespaces=true

[Install]
WantedBy=multi-user.target


As compared to the php-fpm73 unit file which does not contain all of those extra lvalues

[Unit]
Description=The PHP FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/alt/php-fpm73/usr/var/run/php-fpm.pid
ExecStart=/opt/alt/php-fpm73/usr/sbin/php-fpm --nodaemonize --fpm-config /opt/alt/php-fpm73/usr/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target


I could probably copy the 7.3 unit file over 7.4 and tweak it, but like I said, php 7.4 is working

2
CentOS 7 Problems / php-fpm segfault
« on: January 11, 2021, 09:52:04 PM »
I've recently started having php-fpm (for php-fpm73) start segfaulting :

Jan 11 21:11:41 kern info kernel php-fpm[1397]: segfault at 104 ip 0000000000957c52 sp 00007ffd3b6526c0 error 4 in php-fpm[400000+da8000]
Jan 11 21:11:41 daemon notice systemd php-fpm73.service: main process exited, code=killed, status=11/SEGV
Jan 11 21:11:41 daemon notice systemd Unit php-fpm73.service entered failed state.
Jan 11 21:11:41 daemon warning systemd php-fpm73.service failed.

I was thinking that maybe I had done something that rebuilt php-fpm but as you can see, all the datestamps are old :

[root@web3 conf]# ls -lart /opt/alt/php-fpm73/usr/sbin/
total 48532
-rwxr-xr-x 1 root root 49687528 Dec 17  2018 php-fpm
drwxr-xr-x 2 root root     4096 Dec 17  2018 .
drwxr-xr-x 9 root root     4096 Dec 17  2018 ..
[root@web3 conf]# ls -lart /opt/alt/php-fpm73/usr/etc/p
pear.conf             php-fpm.conf          php-fpm.conf.default  php-fpm.d/           
[root@web3 conf]# ls -lart /opt/alt/php-fpm73/usr/etc/p*
-rw-r--r-- 1 root root 5417 Dec 17  2018 /opt/alt/php-fpm73/usr/etc/php-fpm.conf.default
-rw-r--r-- 1 root root 1321 Dec 17  2018 /opt/alt/php-fpm73/usr/etc/pear.conf
-rw-r--r-- 1 root root   52 Dec 17  2018 /opt/alt/php-fpm73/usr/etc/php-fpm.conf

/opt/alt/php-fpm73/usr/etc/php-fpm.d:
total 40
-rw-r--r-- 1 root root 19252 Dec 17  2018 www.conf.default
-rw-r--r-- 1 root root    58 Dec 17  2018 users.conf
drwxr-xr-x 3 root root  4096 Dec 17  2018 .
-rw-r--r-- 1 root root   632 Dec 17  2018 cwpsvc.conf
drwxr-xr-x 2 root root  4096 Jan  9 16:29 users
drwxr-xr-x 3 root root  4096 Jan 11 16:10 ..

Even my users configs are a couple months old.
running cwp pro on centos 7
all recent updates except for a mysql update

I did change the DNS on one site recently to make it live off my VPS but these are all fairly small websites with little traffic.

monit appears to be restarting things for now, but I would like to track this down if anyone can assist.




Pages: [1]