Php-fpm fails to start up (502 Bad Gateway, status=226/NAMESPACE)

[details=“Support intro”]

Nextcloud version (eg, 20.0.5): 22.2.3
Operating system and version (eg, Ubuntu 20.04): Manjaro
Apache or nginx version (eg, Apache 2.4.25): nginx 1.20.2
PHP version (eg, 7.4): 8.0.13

Hi there,

Not a nextcloud issue by itself, but after updating today I’m facing some strange issues. After each reboot I see a 502 when trying to access my nextcloud instance. Checking the status of php-fpm shows then the following error:
Jan 03 22:31:17 servername systemd[395]: php-fpm.service: Failed to set up mount namespacing: /run/systemd/unit-root/media/data/nextcloud: No su>
Jan 03 22:31:17 servername systemd[395]: php-fpm.service: Failed at step NAMESPACE spawning /usr/bin/php-fpm: No such file or directory
Jan 03 22:31:17 servername systemd[1]: php-fpm.service: Main process exited, code=exited, status=226/NAMESPACE
Jan 03 22:31:17 servername systemd[1]: php-fpm.service: Failed with result ‘exit-code’.
Jan 03 22:31:17 servername systemd[1]: Failed to start The PHP FastCGI Process Manager.
In order to fix this is tried restarting first php-fpm and the nginx, which both change their status then to active and running. I can then see at least a nextcloud site, but mentioning an internal server error and cryptic technical details, which I can neither find in my nginx access nor error logs.

Do you have an idea or a hint, where to start in order to solve the issue? Did e.g. anything change that would require an adapted config for php8?

Thanks for your help!

This should give a hint. Is php-fpm installed correctly for php8.0? I don’t know Manjaro, in Debian the executables contain the version number. I have /usr/sbin/php-fpm8.0 installed.

Also check where your php-fpm config file is are located. Check the configuration.

Sorry i do not use Manjaro.
But you can read perhaps this at position Install PHP Extensions.

Also, Manjaro seems to be mainly desktop oriented. You might want to install Debian or Ubuntu on the server. This works very reliable, and you get more community support.

Thank you, @eehmke and @devnull , for your hints. I guess I was able to fix the “nextcloud-related” part of my problem, so I have a working instance again.

Based on your advice and a hunch I tested whether php was working properly (after restarting) by running occ maintenance:repair. Here some errors appeared:
"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE."
Here I found someone with the same error message by nextcloud and how to fix it.

Now everything works “fine”, except that after a reboot, php-fpm and nginx show the error mentioned in my original post, which goes away by simply restarting both services. Here I am still wondering what is the cause of this error.

@eehmke : Yes, you are absolutely right, it’s not server distro. As most of my other computers are now running Manjaro, I started it as an experiment and then stuck with it. I guess it’s the “safe” way of having a rolling release for a dummy like me, who is afraid of going arch. :slight_smile:

1 Like