Ncp-update fails

[/details]

Nextcloud version:
Operating system and version: Debian GNU/Linux 10 (buster)
Apache or nginx version: latest afaik (I ran sudo apt get and sudo apt upgrade)
PHP version: 8.1.7

when trying to run ncp-update I get a failure:
sudo ncp-update
Downloading updates
Performing updates
Installing nc-restore
[Sun Jun 26 18:03:19.327742 2022] [so:warn] [pid 13532:tid 547885958528] AH01574: module proxy_module is already loaded, skipping
[Sun Jun 26 18:03:19.328262 2022] [so:warn] [pid 13532:tid 547885958528] AH01574: module proxy_http_module is already loaded, skipping
httpd not running, trying to start
Action ‘-k graceful’ failed.
The Apache error log may have more information.
Error while applying update 1.40.0. Exiting…

Apache error log:

[Sun Jun 26 17:42:11.463069 2022] [ssl:emerg] [pid 10458:tid 548032099712] AH02562: Failed to configure certificate mydomain.com:4443:0 (with chain), check /etc/ssl/certs/ssl-cert-snakeoil.pem
[Sun Jun 26 17:42:11.463171 2022] [ssl:emerg] [pid 10458:tid 548032099712] SSL Library Error: error:0909006C:PEM routines:get_name:no start line (Expecting: TRUSTED CERTIFICATE) – Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
[Sun Jun 26 17:42:11.463203 2022] [ssl:emerg] [pid 10458:tid 548032099712] SSL Library Error: error:140DC009:SSL routines:use_certificate_chain_file:PEM lib
AH00016: Configuration Failed

I have renewed mydomain certificates with Letsencrypt using
sudo certbot renew

Since Apache wont start I cannot open nextcloud unfortunately.

in file:
/var/www/nextcloud/config/config.php
I edited this since it worked last:

‘trusted_domains’ =>
array (
0 => ‘mydomain.com’,
1 => ‘my ip1’,
2 => ‘my ip2’,
3 => ‘my ip2’,
),

Any pointers pls?

You did not list your Nextcloud version.
Debian 11 bullseye is required as of some time ago.

Hi just

Apologies, I missed the version:

NextCloudPi v1.39.16 is outdated
update to v1.47.2 through ‘ncp-config’ or type ‘sudo ncp-update’

I can try and upgrade to Debian 11 bullseye.
Is there a walkthrough you could recommend? e.g.:

Make a backup, and then follow any regular distro upgrade guide you want.

cool, upgrade done.

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Retrying update…

sudo ncp-update
Downloading updates
Performing updates
Installing nc-restore
[Sun Jun 26 19:58:57.531289 2022] [so:warn] [pid 3691:tid 547971661888] AH01574: module proxy_module is already loaded, skipping
[Sun Jun 26 19:58:57.531444 2022] [so:warn] [pid 3691:tid 547971661888] AH01574: module proxy_http_module is already loaded, skipping
Running nc-httpsonly
[Sun Jun 26 19:58:57.650948 2022] [so:warn] [pid 3818:tid 548570517568] AH01574: module proxy_module is already loaded, skipping
[Sun Jun 26 19:58:57.651079 2022] [so:warn] [pid 3818:tid 548570517568] AH01574: module proxy_http_module is already loaded, skipping
Forcing HTTPS Off
This version of Nextcloud is not compatible with > PHP 8.0.
You are currently running 8.1.7.Error while applying update 1.40.0. Exiting…

This version of Nextcloud is not compatible with > PHP 8.0.

Ok, I have
sudo apt install php8.0
sudo update-alternatives --set php /usr/bin/php8.0

sudo php -v
PHP 8.0.20 (cli) (built: Jun 14 2022 10:26:20) ( NTS )

upgrade fails now with another error:

sudo ncp-update
Downloading updates
Performing updates
Installing nc-restore
[Sun Jun 26 21:24:35.799466 2022] [so:warn] [pid 12380] AH01574: module proxy_module is already loaded, skipping
[Sun Jun 26 21:24:35.799623 2022] [so:warn] [pid 12380] AH01574: module proxy_http_module is already loaded, skipping
Running nc-httpsonly
[Sun Jun 26 21:24:35.979635 2022] [so:warn] [pid 12411] AH01574: module proxy_module is already loaded, skipping
[Sun Jun 26 21:24:35.979859 2022] [so:warn] [pid 12411] AH01574: module proxy_http_module is already loaded, skipping
Forcing HTTPS Off
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 :87
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues()
#9 /var/www/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC{closure}()
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#13 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#19 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#21 /var/www/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC{closure}()
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#25 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#27 /var/www/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC{closure}()
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#33 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#35 /var/www/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1089): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once(’…’)
#39 /var/www/nextcloud/occ(11): require_once(’…’)
#40 {main}Error while applying update 1.40.0. Exiting…

https://help.nextcloud.com/search?context=topic&context_id=141292&q=database:%20An%20exception%20occurred%20in%20the%20driver:%20could%20not%20find%20driver%20in%20/var/www/nextcloud/lib/private&skip_context=true

Check documentation to make sure you’ve properly included all necessary php modules

https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

Got it working again thank you!
what a miracle. so many dependencies I can hardly believe it.

NextCloudPi updated to version v1.47.2

amazing