Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 29.0.5): 28.0.3.2
Operating system and version (eg, Ubuntu 24.04): Ubuntu 20.04.6
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.62
PHP version (eg, 8.3): 8.1.29
The issue you are facing:
Hello dear Nextcloud community,
I installed my Nextcloud in a Proxmox container about two years ago.
I recently got a new server and am in the process of migrating the services.
Mariadb runs in one container and Nextcloud with Apache/PHP in the other.
But since both containers are on the new server, I only get an “Internal Server Error” in my browser.
Reading the logs this seems to be the problem:
"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out"
I am grateful for any help.
Is this the first time you’ve seen this error? (Y/N):
Y
Steps to replicate it:
- migrate proxmox lxc container to a new server
The output of your Nextcloud log in Admin > Logging:
No access to the admin page.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
?php
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'xxx.xxx.xxx.xxx',
1 => 'xxxxxxxxxx.xx',
),
'datadirectory' => '/media/zfs0/nextcloud',
'dbtype' => 'mysql',
'version' => '28.0.3.2',
'overwrite.cli.url' => 'https://xxxxxxxxxx.xx/',
'dbname' => 'nextcloud',
'dbhost' => 'xxx.xxx.xxx.xxx:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_nc',
'dbpassword' => 'xxxxxxxxxx',
'installed' => true,
'htaccess.RewriteBase' => '/',
'trusted_proxies' =>
array (
0 => 'xxx.xxx.xxx.xxx/24',
),
'default_locale' => 'xx_XX',
'default_phone_region' => 'XX',
'overwritehost' => 'xxxxxxxxxx.xx',
'overwriteprotocol' => 'https',
'updater.release.channel' => 'stable',
'minimum.supported.desktop.version' => '3.2.0',
'filesystem_check_changes' => 1,
'maintenance' => true,
'theme' => '',
'loglevel' => 0,
'app_install_overwrite' =>
array (
0 => 'calendar',
1 => 'cfg_share_links',
2 => 'contacts',
),
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'maintenance_window_start' => 13,
);
The output of your Apache/nginx/system log in /var/log/____
:
[Sun Aug 11 15:34:55.732916 2024] [http2:warn] [pid 171:tid 171] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and >
[Sun Aug 11 15:34:55.820683 2024] [mpm_prefork:notice] [pid 171:tid 171] AH00163: Apache/2.4.62 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Sun Aug 11 15:34:55.820708 2024] [core:notice] [pid 171:tid 171] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 11 15:34:55.832763 2024] [mpm_prefork:notice] [pid 171:tid 171] AH00171: Graceful restart requested, doing restart
[Sun Aug 11 15:34:55.877863 2024] [http2:warn] [pid 171:tid 171] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and >
[Sun Aug 11 15:34:55.916573 2024] [mpm_prefork:notice] [pid 171:tid 171] AH00163: Apache/2.4.62 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Sun Aug 11 15:34:55.916586 2024] [core:notice] [pid 171:tid 171] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 11 15:51:21.611181 2024] [mpm_prefork:notice] [pid 171:tid 171] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Aug 11 15:51:26.188660 2024] [http2:warn] [pid 154:tid 154] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and >
[Sun Aug 11 15:51:26.279498 2024] [mpm_prefork:notice] [pid 154:tid 154] AH00163: Apache/2.4.62 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Sun Aug 11 15:51:26.279514 2024] [core:notice] [pid 154:tid 154] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 11 16:42:58.166583 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:42:59.167795 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:00.169252 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:01.170710 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:02.172163 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:03.173614 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:04.175065 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:05.176483 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:06.177934 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:07.178456 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:08.179441 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:09.180543 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:10.182018 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:11.183490 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:12.184950 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:13.186401 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:14.187850 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:15.189354 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:16.190777 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:17.192231 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:18.193689 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:19.195134 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:20.196522 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:21.197982 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:22.199437 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:23.200900 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:24.202347 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:25.203792 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:26.205255 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:27.206722 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:28.207383 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:29.208505 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:30.209956 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:31.211239 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:32.212693 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:33.213460 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:43:34.214585 2024] [core:warn] [pid 154:tid 154] (101)Network is unreachable: AH00056: connect to listener on [::]:4443
[Sun Aug 11 16:53:58.219577 2024] [mpm_prefork:notice] [pid 154:tid 154] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Aug 11 18:42:56.329938 2024] [http2:warn] [pid 157:tid 157] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and >
Sun Aug 11 18:42:56.478756 2024] [mpm_prefork:notice] [pid 157:tid 157] AH00163: Apache/2.4.62 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Sun Aug 11 18:42:56.478781 2024] [core:notice] [pid 157:tid 157] AH00094: Command line: '/usr/sbin/apache2'
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
{"reqId":"s2PFHlceWMsPxWVZ5mro","level":3,"time":"2024-08-11T20:26:44+00:00","remoteAddr":"240.0.1.204","user":"--","app":"index","method":"GET","url":"/index.php/204","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","userAgent":"Mozilla/5.0 (Linux) mirall/3.12.0 (build 20570) (Nextcloud, debian-6.1.0-22-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out"}}
{"reqId":"s2PFHlceWMsPxWVZ5mro","level":3,"time":"2024-08-11T20:26:45+00:00","remoteAddr":"240.0.1.204","user":"--","app":"core","method":"GET","url":"/index.php/204","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"Mozilla/5.0 (Linux) mirall/3.12.0 (build 20570) (Nextcloud, debian-6.1.0-22-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"s2PFHlceWMsPxWVZ5mro","level":3,"time":"2024-08-11T20:26:45+00:00","remoteAddr":"240.0.1.204","user":"--","app":"core","method":"GET","url":"/index.php/204","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"Mozilla/5.0 (Linux) mirall/3.12.0 (build 20570) (Nextcloud, debian-6.1.0-22-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Operation now in progress","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":734,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":236,"function":"getAppVersions","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/index.php","line":104,"function":"printExceptionErrorPage","class":"OC_Template","type":"::"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"u2AemmsB0rruDKJqucq5","level":3,"time":"2024-08-11T20:27:53+00:00","remoteAddr":"240.0.1.204","user":"--","app":"index","method":"GET","url":"/index.php/204","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","userAgent":"Mozilla/5.0 (Linux) mirall/3.12.0 (build 20570) (Nextcloud, debian-6.1.0-22-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out"}}
{"reqId":"eT19whrGFcjERM1ylKYx","level":3,"time":"2024-08-11T20:27:57+00:00","remoteAddr":"240.0.1.204","user":"--","app":"index","method":"GET","url":"/","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out"}}
{"reqId":"FKsAxycsiGY47c9tp7fB","level":3,"time":"2024-08-11T20:27:58+00:00","remoteAddr":"240.0.1.204","user":"--","app":"index","method":"GET","url":"/index.php/apps/files/preview-service-worker.js","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0","version":"28.0.3.2","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","Code":2002,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out"}}
Maybe the output of occ helps:
sudo -u www-data php /var/www/nextcloud/occ:
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection timed out in /var/www/nextcloud/lib/private/DB/Connection.php:139
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1654): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1081): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(341): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(377): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(421): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/nextcloud/lib/private/AppConfig.php(187): OC\AppConfig->loadConfigValues()
#8 /var/www/nextcloud/lib/private/AppConfig.php(377): OC\AppConfig->getApps()
#9 /var/www/nextcloud/lib/private/App/AppManager.php(128): OC\AppConfig->getValues()
#10 /var/www/nextcloud/lib/private/App/AppManager.php(149): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/nextcloud/lib/private/legacy/OC_App.php(231): OC\App\AppManager->getInstalledApps()
#12 /var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
#13 /var/www/nextcloud/lib/base.php(700): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /var/www/nextcloud/lib/base.php(1200): OC::init()
#15 /var/www/nextcloud/console.php(48): require_once('...')
#16 /var/www/nextcloud/occ(11): require_once('...')