Problems with a db error Doctrine\DBAL\Exception

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

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 :heart:

Nextcloud version (eg, 20.0.5): 28.0.5.1
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.59
PHP version (eg, 7.4): PHP 8.3.7

The issue you are facing:
Hi
I cannot backup up via nextcloudpi and my log seems to be spamming those DB errors.

I previously had the deepl, the right-click menu and the splash apps, which seemed to be untested, but I since removed them. No idea if that’s related tough.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. To be honest, not really sure.
  2. Could possibly be related to the installed apps above

What I also did is, I had a problem with the imagick module, have now read the posts about security.

I execute the following commands, but reverted all of them:

apt install php-imagick
apt-get install php8.1-imagick
apt-get install php8.3-imagick # -> Was already installed as expected

Reverted them:

apt remove php-imagick
apt remove php8.1-imagick
apt clean && apt autoclean && apt autoremove

Rebooted the server and my problems below with the DB are still persistent

The output of your Nextcloud log in Admin > Logging:

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 10:10:01 PM	

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 10:05:01 PM	

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 10:00:01 PM	

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 9:55:01 PM	

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 9:50:01 PM	

Error	cron	
Exception
Failed to connect to the database: An exception occurred in the driver: could not find driver
Exception thrown: Doctrine\DBAL\Exception

May 29, 2024, 9:45:01 P

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '{mysalt}',
  'secret' => '{mysecret}',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    7 => 'nextcloudpi',
    5 => 'nextcloudpi.local',
    8 => 'nextcloudpi.lan',
    3 => 'nextcloudpi',
    11 => '{pubip}',
    1 => '10.10.20.14',
    14 => 'nextcloud.home',
    20 => '{sub2.domain.tld}',
    21 => '{sub.domain.tld}',
  ),
  'datadirectory' => '/opt/ncdata/data',
  'dbtype' => 'mysql',
  'version' => '28.0.5.1',
  'overwrite.cli.url' => 'https://nextcloudpi/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '{mydbuser_obfuscated}',
  'dbpassword' => '{mydbpassword_obfuscated}',
  'installed' => true,
  'instanceid' => 'oc55fg5jcnox',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '{mypw_obfuscated}',
  ),
  'tempdirectory' => '/opt/ncdata/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'nextcloudpi.com',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/opt/ncdata/data/nextcloud.log',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    0 => '10.10.20.13',
    1 => '10.10.20.13',
  ),
  'loglevel' => '2',
  'log_type' => 'file',
  'app_install_overwrite' =>
  array (
    0 => 'unsplash',
    1 => 'transmission',
    2 => 'files_markdown',
    3 => 'files_rightclick',
  ),
  'maintenance_window_start' => 3,
  'default_phone_region' => 'CH',
);

The output of your Apache/nginx/system log in /var/log/____:

[Wed May 29 22:14:15.224145 2024] [authz_host:error] [pid 249:tid 129263044921024] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Wed May 29 22:14:15.228379 2024] [authz_host:error] [pid 249:tid 129262908606144] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /img/download.svg failed, reason: unable to get the remote host name
[Wed May 29 22:14:15.231743 2024] [authz_host:error] [pid 249:tid 129263023949504] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /img/delete.svg failed, reason: unable to get the remote host name
[Wed May 29 22:14:15.330052 2024] [authz_host:error] [pid 249:tid 129263034435264] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Wed May 29 22:14:15.375483 2024] [authz_host:error] [pid 249:tid 129263034435264] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Wed May 29 22:14:33.386634 2024] [authz_host:error] [pid 249:tid 129262971520704] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /img/red-circle.svg failed, reason: unable to get the remote host name, referer: https://10.10.20.14:4443/css/ncp.css
[Wed May 29 22:14:33.429443 2024] [authz_host:error] [pid 249:tid 129262971520704] [remote 192.168.1.200:52223] AH01753: access check of 'localhost' to /img/red-circle.svg failed, reason: unable to get the remote host name, referer: https://10.10.20.14:4443/css/ncp.css```

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.

[PASTE HERE](https://pastebin.com/TXQvPx6X)

Huge thanks for any help, really appreciate it!

Hey! Thanks for your post! Just to check – does this problem still persist after a restart of the raspberry pi?

Hi,
Thanks for the reply,

It’s a debian LXC hosted on Proxmox.

As far as I can remember it persisted after a reboot.

But I could fix it via the following commands:

apt-get install -y php8.3-pgsql php8.3-zip php8.3-dom php8.3-xml php8.3-xmlreader php8.3-xmlwriter php8.3-mbstring php8.3-gd php8.3-simplexml php8.3-curl

Sepcifically the package php8.3-pgsql uninstalling and reinstalling fixed the db error, then I got an error telling me that other packages are missing, which could be fixed by installing the others. No idea how this happened, because I installed this instance just like 6 days ago

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.