[/details]
Nextcloud version (eg, 20.0.5): 25.0.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.4): PHP 7.4.3-4ubuntu2.18
After upgrade from Ubuntu 20.04 to 22.04
Nextcloud version (eg, 20.0.5): 25.0.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52 (Ubuntu)
PHP version (eg, 7.4): PHP 8.1.2-1ubuntu2.11
The issue you are facing:
I upgraded the virtual private server from Ubuntu 20.04 LTS to 22.04 LTS. After the upgrade my NC stopped working. I am getting an error:
This site can’t be reached
nextcloud.abc.eu refused to connect.
Try:
- Checking the connection
- Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Could you help me how to do a proper upgrade from Ubuntu 20.04 to Ubuntu 22.04 where Nextcloud 25.0.6 is installed?
My main reason for the upgrade is that I would like to upgrade PHP from 7.4 to PHP 8.1. PHP 7.4 has been out of support since November 2022.
Is this the first time you’ve seen this error? (Y/N): N
Steps to replicate it:
- upgrade from Ubuntu 20.04 to Ubuntu 22.04
The output of your Nextcloud log in Admin > Logging: No access to GUI
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
nextcloud/config/config.php
<?php
$CONFIG = array (
'instanceid' => 'ABC',
'passwordsalt' => 'ABC',
'secret' => 'ABC',
'trusted_domains' =>
array (
0 => 'abc.eu',
),
'datadirectory' => '/mnt/nfsko/nextcloud_data',
'dbtype' => 'mysql',
'version' => '25.0.6.1',
'overwrite.cli.url' => 'https://abc.eu',
'dbname' => 'abc',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'abc,
'dbpassword' => 'abc',
'installed' => true,
'default_phone_region' => 'DE',
'maintenance' => false,
'loglevel' => 0,
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'abc.d',
'mail_smtpsecure' => 'tls',
'mail_domain' => 'abc.com',
'mail_smtphost' => 'smtp.abc.com',
'mail_smtpauth' => 1,
'mail_smtpname' => 'abc.d',
'mail_smtppassword' => 'abc',
'has_rebuilt_cache' => true,
'app_install_overwrite' =>
array (
0 => 'files_external_dropbox',
1 => 'files_ebookreader',
2 => 'apporder',
3 => 'breezedark',
4 => 'duplicatefinder',
5 => 'electronicsignatures',
6 => 'extract',
7 => 'impersonate',
),
'updater.release.channel' => 'stable',
'opcache.interned_strings_buffer' => 220,
'theme' => '',
'memcache.local' => '\\OC\\Memcache\\APCu',
);```
The output of your Apache/nginx/system log in `/var/log/____`:
/var/log/apache2/nextcloud_error.log
[Sun Apr 30 20:15:44.654208 2023] [access_compat:error] [pid 335] [client 94.218.11.87:53160] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Sun Apr 30 20:33:57.712302 2023] [php7:error] [pid 1855] [client 94.218.11.87:53414] PHP Fatal error: Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:139\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(419): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\\AppConfig->loadConfigValues()\n#7 /var/www/nextcloud/lib/private/AppConfig.php(375): OC\\AppConfig->ge in /var/www/nextcloud/lib/private/DB/Connection.php on line 139
[Sun Apr 30 20:34:05.714664 2023] [php7:error] [pid 6981] [client 94.218.11.87:53416] PHP Fatal error: Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:139\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(419): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\\AppConfig->loadConfigValues()\n#7 /var/www/nextcloud/lib/private/AppConfig.php(375): OC\\AppConfig->ge in /var/www/nextcloud/lib/private/DB/Connection.php on line 139
[Sun Apr 30 20:34:24.715151 2023] [php7:error] [pid 1857] [client 94.218.11.87:53418] PHP Fatal error: Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:139\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(419): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\\AppConfig->loadConfigValues()\n#7 /var/www/nextcloud/lib/private/AppConfig.php(375): OC\\AppConfig->ge in /var/www/nextcloud/lib/private/DB/Connection.php on line 139
/var/log/apache2/nextcloud_access.log
[30/Apr/2023:20:33:04 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 207 238
[30/Apr/2023:20:33:06 +0200] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 -
[30/Apr/2023:20:33:13 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 207 250
[30/Apr/2023:20:33:34 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 500 289
[30/Apr/2023:20:33:57 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 500 -
[30/Apr/2023:20:34:04 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 500 289
[30/Apr/2023:20:34:05 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 500 -
[30/Apr/2023:20:34:24 +0200] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 500 -
[30/Apr/2023:20:34:34 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 500 289
[30/Apr/2023:20:35:04 +0200] "PROPFIND /remote.php/dav/files/janvozar/ HTTP/1.1" 500 289```