Nextcloud version (eg, 20.0.5): 25.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.1 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52
PHP version (eg, 7.4): 8.1
I got the nag screen in NC saying PHP 7.4 needed updating, so after SSH’ing into my NC box I saw there was an option to upgrade to 22.04.1 LTS. After doing that it appears that PHP should now be 8.1 as follows…
behome@behome:~$ sudo update-alternatives --config php
There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.1
Nothing to configure.
behome@behome:~$ apt list php8.1-redis
Listing... Done
php8.1-redis/jammy,now 5.3.5+4.3.0-5.1 amd64 [installed,automatic]
behome@behome:~$ sudo a2dismod php7.4
Module php7.4 already disabled
# Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
---
Apache/2.4.52 (Ubuntu) Server at behome.dyndns.info Port 443
I don’t know if this helps find the root cause (I’m just digging around):
root@behome:/var/www/nextcloud# sudo -u www-data php occ status
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud/lib/private/DB/Connection.php:139
root@behome:/var/www/nextcloud# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-02-09 01:13:21 UTC; 1h 12min ago
root@behome:/var/www/nextcloud# sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 10.6.11-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
MariaDB [(none)]> SELECT host, user FROM mysql.user;
+-----------+-------------+
| Host | User |
+-----------+-------------+
| localhost | behome |
| localhost | mariadb.sys |
| localhost | root |
+-----------+-------------+
3 rows in set (0.002 sec)
root@behome:/var/www/nextcloud# mysql -u behome -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 41
Server version: 10.6.11-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
…but I’ve still got “Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”
Get these in my /var/log/apache2/nextcloud.error about every 30 sec or so.
[Thu Feb 09 06:12:31.171072 2023] [proxy_fcgi:error] [pid 1537] [client 192.168.1.10:60245] AH01079: failed to make connection to backend: httpd-UDS
[Thu Feb 09 06:12:33.482561 2023] [proxy:error] [pid 1536] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.4-fpm.sock (*) failed
I only have PHP 8.1 installed
behome@behome:/var/log/apache2$ sudo update-alternatives --config php
There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.1
Any hints on which config file is still configured to 7.4?
Thanks - there was no reference to " :/var/run/php/php7.4-fpm -http.sock" or similar in any of the config files in either directory.
I did a search for “php7.4-fpm” and did find two entries in var/www/nextcloud/core/doc/admin/installation/nginx.html which I then changed to 8.1
Now my error log says [proxy:error] [pid 76604] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.1-fpm.sock (*) failed
Have you tried to stop and disable php7.4, remove all php7.4 packages. Install php8.1 with all your packages, then start and enable the service (php8.1-fpm.service) .
Make sure php7.4 mod is disabled and php8.1 is enabled in Apache2.