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.


Messages - 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 / Re: php-fpm segfault
« on: January 29, 2021, 03:28:49 PM »
I rebuilt php 7.3  - it was originally showing php 7.3.0 - rebuilt to the latest 7.3.26 I believe.

I have not had a single crash since



3
CentOS 7 Problems / Re: php-fpm segfault
« on: January 11, 2021, 10:16:53 PM »
# curl http://dl1.centos-webpanel.com/files/s_scripts/sinfo.sh|sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   899  100   899    0     0   2852      0 --:--:-- --:--:-- --:--:--  2844
===============================================
Kernel:
Linux web3.x.com 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

CPU info:
model name   : AMD EPYC 7601 32-Core Processor

Release:
CentOS Linux release 7.9.2009 (Core)

Arch:
x86_64

Virtualization Type:
kvm

Memory:
              total        used        free      shared  buff/cache   available
Mem:           3789         836         347         353        2605        2313
Swap:          2303         113        2190

MySQL info:
mysql  Ver 15.1 Distrib 10.2.36-MariaDB, for Linux (x86_64) using readline 5.1

Disk Info:
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  184M  1.7G  10% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda         79G   22G   53G  30% /
tmpfs           379M     0  379M   0% /run/user/0


#
# /etc/fstab
# Created by anaconda on Thu Aug 16 14:02:01 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/sda /                       ext4    defaults        1 1
/dev/sdb none                    swap    defaults        0 0

/swapfile swap swap defaults 0 0

Apache PHP info:
PHP 7.3.0 (cli) (built: Dec 21 2018 17:34:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies

Apache start script check:
grep: /etc/init.d/httpd: No such file or directory

CWP Admin check:
/usr/local/cwpsrv/htdocs/admin

CWP version:
0.9.8.1031
===============================================

4
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.




5
PHP / Re: PHP Selector
« on: December 21, 2018, 05:07:34 PM »
WebServer Settings>WebServers Domain Conf

Select Username > View /Edit Configuration

Scroll down to last option block and select version

Thank you very much!  ;)


That's just it -- no matter how many times I start the "build" I never get past the inital screen so I can never select the web server settings for users because it is never populated.

Select a user, "create configuration", select one option ... drop down menu is empty :(

6
PHP / Re: PHP Selector
« on: December 07, 2018, 08:15:43 PM »
For the most part my CWP install runs and I never have to touch it

Today I logged in to add an email address

Every menu item from the main menu takes me to the PHP selector - I cannot do ANYTHING else within CWP

I just paid for the pro option hoping that will give more access but at the moment, the only access within CWP is to the PHP selector which does not appear to work.

7
CentOS 7 Problems / Re: Transfer cwp to cwp
« on: September 10, 2018, 04:43:44 PM »
Has any progress been made on this?

I can run the curl command above -

old -> new
# curl -k 'https://web3.mydomain.com:2304/v1/account 'xxxxxx=list'TdJCh5
{"status":"OK","msj":[{"package_name":"default","idpackage":"1","id":"1","backup":"on","username":"test123","email":"xxxx@gmail.com","setup_date":"2018-09-10 16:35:56","ip_address":"45.79.215.115","domain":"test123.com"}]}[root@web2 ~]#


[root@web2 ~]#  tail -f /var/log/cwp/account_transfer.log
2018-09-10 16:11:33 Verifying...!
2018-09-10 16:11:34 initiating account creation fabric
2018-09-10 16:11:35 account creation fabric
2018-09-10 16:11:35 {status:Error,msj:error in key,format:JSON}
2018-09-10 16:11:35 Error trying to create the account fabric
2018-09-10 16:34:08 Verifying...!
2018-09-10 16:34:09 initiating account creation mackenzi
2018-09-10 16:34:09 account creation mackenzi
2018-09-10 16:34:09 {status:Error,msj:error in key,format:JSON}
2018-09-10 16:34:09 Error trying to create the account mackenzi


Is there any option to run this from the command line?
years ago I wrote this script doing a cpanel to cpanel copy but /scripts/pkgacct does not seem to be available here in cwp

https://gitlab.com/geolaw/scripts/blob/master/cpacct.pl




8
Updated last week and just found out my own cgi scripts weren't working

DOH!

I have these options enabled in httpd.conf

LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgid_module modules/mod_cgid.so

and my scripts started working again.
hope this helps.


Pages: [1]