• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved PHP 8.0, 8.1 not starting

Nicola Urbinati

Basic Pleskian
Server operating system version
Ubuntu 18.04
Plesk version and microupdate number
Version 18.0.46
Hi,

Just installed PHP 8.0 and 8.1, but the services do not start properly.
In the GUI, under the services tool, they are given as:
8.0: not started
8.1: not configured

They both give the same result with:

Code:
● plesk-php81-fpm.service - The PHP 8.1.9 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/plesk-php81-fpm.service; disabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/plesk-php81-fpm.service.d
           └─limit_nofile.conf
   Active: failed (Result: exit-code) since Wed 2022-08-24 11:49:02 CEST; 2min 49s ago
  Process: 21210 ExecStart=/opt/plesk/php/8.1/sbin/php-fpm --nodaemonize (code=exited, status=226/NAMESPACE)
 Main PID: 21210 (code=exited, status=226/NAMESPACE)

Aug 24 11:49:02 srvurb01.urbaman.it systemd[1]: Starting The PHP 8.1.9 FastCGI Process Manager...
Aug 24 11:49:02 srvurb01.urbaman.it systemd[21210]: plesk-php81-fpm.service: Failed to set up mount namespacing: No such file or directory
Aug 24 11:49:02 srvurb01.urbaman.it systemd[21210]: plesk-php81-fpm.service: Failed at step NAMESPACE spawning /opt/plesk/php/8.1/sbin/php-fpm: No such file or directory
Aug 24 11:49:02 srvurb01.urbaman.it systemd[1]: plesk-php81-fpm.service: Main process exited, code=exited, status=226/NAMESPACE
Aug 24 11:49:02 srvurb01.urbaman.it systemd[1]: plesk-php81-fpm.service: Failed with result 'exit-code'.
Aug 24 11:49:02 srvurb01.urbaman.it systemd[1]: Failed to start The PHP 8.1.9 FastCGI Process Manager.

Same result if I configure for a domain (or try to manually start) 8.0

Thig is that the dir and file exists:

Code:
# ls -la /opt/plesk/php/8.1/sbin/php-fpm
-rwxr-xr-x 1 root root 6320240 Aug  5 07:34 /opt/plesk/php/8.1/sbin/php-fpm

plesk repair web did not solve.

Cannot find any tip about the given error.

Thank you very much,
 
One of the reasons why php-fpm can't be started is that you ran out of i-nodes. Check it with

# df -i
 
Hi, here's the output:

Code:
# df -i
Filesystem       Inodes   IUsed    IFree IUse% Mounted on
udev            3853394     383  3853011    1% /dev
tmpfs           3859354    3068  3856286    1% /run
/dev/sda2      52371456 2062042 50309414    4% /
tmpfs           3859354       2  3859352    1% /dev/shm
tmpfs           3859354      16  3859338    1% /run/lock
tmpfs           3859354      18  3859336    1% /sys/fs/cgroup
tmpfs           3859354       1  3859353    1% /run/shm
/usr/tmpDSK     3859354      30  3859324    1% /tmp
/dev/loop0        10858   10858        0  100% /snap/core18/2538
/dev/loop1        12849   12849        0  100% /snap/core/13425
/dev/loop2           35      35        0  100% /snap/canonical-livepatch/81
/dev/loop3        12849   12849        0  100% /snap/core/13308
/dev/loop4        10857   10857        0  100% /snap/core18/2409
/dev/sda1         61056     314    60742    1% /boot
tmpfs           3859354      12  3859342    1% /run/user/1000
 
Hi,

Just installed PHP 8.0 and 8.1, but the services do not start properly.
In the GUI, under the services tool, they are given as:
8.0: not started
8.1: not configured
Have you actually configured a website to use the PHP version? If there is no website that uses the version, the service cannot be started, because configurations are missing.
 
For a WordPress site, go to WordPress Admin Panel > Settings > WP Super Cache > Delete Cache
From Domains > domain.com > PHP Settings, switch to a different PHP version and then back to 8.1

See if that helps. If not, then try the following:

1. Check if AppArmor is on with the command aa-status. Output will be long if it's enabled.
2. If yes, then check what it has blocked with command grep apparmor /var/log/dmesg
3. It may show php-fpm as denied. In that case, try this:

Override the service unit config by creating this file
Code:
vi /etc/systemd/system/plesk-php81-fpm.service.d/override.conf
and adding this content to it:
Code:
[Service]
PrivateTmp=false
apply the changes
Code:
systemctl daemon-reload
then start the PHP-FPM service (make sure at least 1 site has this PHP version in use).
Code:
systemctl start plesk-php81-fpm
 
Part two (AppArmor settings) could be successful as similar descriptions regarding other daemons can be found by other users on the Internet.
 
Hi,

Code:
grep apparmor /var/log/dmesg
gives file not found.

The php81 .service file is in /lib/systemd/system directory, and setting PrivateTemp = false throws the very same error.

Code:
Aug 24 11:49:02 srvurb01.urbaman.it systemd[21210]: plesk-php81-fpm.service: Failed to set up mount namespacing: No such file or directory
Aug 24 11:49:02 srvurb01.urbaman.it systemd[21210]: plesk-php81-fpm.service: Failed at step NAMESPACE spawning /opt/plesk/php/8.1/sbin/php-fpm: No such file or directory
 
Ok,

I found out that any domain/site I switch from 7.4 to 8.0 or 8.4, does not produce the conf file in /opt/plesk/php/8.x/etc/php-fpm.d/

The service than does not start not having the file.

How can I properly set up php 8.0/8.4 for the system?

Thank you.
 
Ok, going on with the analisys:

The files seem to be there for a while, then they go away:

Code:
root@srvurb01# ls -la /opt/plesk/php/8.0/etc/php-fpm.d/
total 16
drwxr-xr-x 2 root root 4096 Aug 31 19:29 .
drwxr-xr-x 4 root root 4096 Aug 31 19:11 ..
-rw-r--r-- 1 root root 1042 Aug 31 19:29 plesk-service.localdomain.conf
-rw-r--r-- 1 root root 1299 Aug 31 19:29 worldsinperil.it.conf
root@srvurb01# ls -la /opt/plesk/php/8.0/etc/php-fpm.d/
total 8
drwxr-xr-x 2 root root 4096 Aug 31 19:30 .
drwxr-xr-x 4 root root 4096 Aug 31 19:11 ..
root@srvurb01# ls -la /opt/plesk/php/8.0/etc/php-fpm.d/
total 8
drwxr-xr-x 2 root root 4096 Aug 31 19:30 .
drwxr-xr-x 4 root root 4096 Aug 31 19:11 ..
root@srvurb01# ls -la /opt/plesk/php/8.0/etc/php-fpm.d/
total 8
drwxr-xr-x 2 root root 4096 Aug 31 19:30 .
drwxr-xr-x 4 root root 4096 Aug 31 19:11 ..
root@srvurb01# ls -la /opt/plesk/php/8.0/etc/php-fpm.d/
total 8
drwxr-xr-x 2 root root 4096 Aug 31 19:30 .
drwxr-xr-x 4 root root 4096 Aug 31 19:11 ..
 
Have you tried to fix it with

# plesk repair web -php-handlers -php-fpm-configuration

?
 
Hi,

Yes I did.

Actually it seems lfd swrvice from csf or probably cxs service were gulty of the situation.
Uninstalled them, reinstalled plesk firewall, and everything was warking as expected.

Thank you.
 
Back
Top