Internal Server Error - Unable to Complete Your Request

Nextcloud version (eg, 20.0.5): I’m trying to find it, it was the newest version as of 1.5 months ago but should be pretty current
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Server version: Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.4): PHP 7.4.18

The issue you are facing:
I’m no longer able to access my nextcloud storage from the downloaded desktop client on windows, linux, and the browser, using both remote and local IP. I get this error

Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

It’s a simple headless ubuntu server, I’ve got a slightly weird setup as I was trying to follow guides and they didn’t make it clear where they wanted me to put things, my OS is on a flash drive, so my nextcloud everything should be on the separate raid through zpool. I did find this log file under var/log/apache2/error.log

[Wed May 05 00:00:05.233639 2021] [mpm_prefork:notice] [pid 1291] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed May 05 00:00:05.233817 2021] [core:notice] [pid 1291] AH00094: Command line: '/usr/sbin/apache2'
[Wed May 05 00:00:30.308099 2021] [php7:error] [pid 276721] [client 192.168.50.1:51251] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 00:00:52.227795 2021] [php7:error] [pid 276722] [client 192.168.50.1:51260] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 14:07:54.945315 2021] [php7:error] [pid 276737] [client 192.168.50.1:63600] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 14:07:55.061574 2021] [php7:error] [pid 276724] [client 192.168.50.1:63602] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:19.941742 2021] [php7:error] [pid 303893] [client 192.168.50.1:64459] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:19.999965 2021] [php7:error] [pid 276725] [client 192.168.50.1:64463] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:21.306942 2021] [php7:error] [pid 276737] [client 192.168.50.1:64466] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:33.267558 2021] [php7:error] [pid 276723] [client 192.168.50.1:64468] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:34.655049 2021] [php7:error] [pid 276724] [client 192.168.50.1:64469] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:34.902419 2021] [php7:error] [pid 303893] [client 192.168.50.1:64470] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:37.461309 2021] [php7:error] [pid 276722] [client 192.168.50.1:64471] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:12:38.725323 2021] [php7:error] [pid 276725] [client 192.168.50.1:64472] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(286): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/private/AppConfig.php(301): in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 85
[Wed May 05 17:21:03.526413 2021] [mpm_prefork:notice] [pid 1291] AH00169: caught SIGTERM, shutting down
[Wed May 05 17:21:04.072648 2021] [mpm_prefork:notice] [pid 321720] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed May 05 17:21:04.072833 2021] [core:notice] [pid 321720] AH00094: Command line: '/usr/sbin/apache2'
[Wed May 05 17:22:35.180942 2021] [mpm_prefork:notice] [pid 321720] AH00169: caught SIGTERM, shutting down
[Wed May 05 17:42:11.046589 2021] [mpm_prefork:notice] [pid 1308] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Wed May 05 17:42:11.069403 2021] [core:notice] [pid 1308] AH00094: Command line: '/usr/sbin/apache2'

I can get the test apache server page if I throw in public or local ip. One Idea, yesterday it seemed there were unused php packages ubuntu recommended removing using apt auto remove, that made sense to me through the various reinstalls and different guides, I had different versions installed so I figured it was left over. I also never set up ssl.

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

Steps to replicate it:

  1. Attempt to connect to server

The output of your Nextcloud log in Admin > Logging:
Don’t think I can access that

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
I seem to have two nextcloud directories, one on the OS, one on the raid.

OS: 
jamess7995@leviathan:~$ cd nextcloud
jamess7995@leviathan:~/nextcloud$ ls
3rdparty  apps  AUTHORS  config  console.php  COPYING  core  cron.php  index.html  index.php  lib  occ  ocm-provider  ocs  ocs-provider  public.php  remote.php  resources  robots.txt  status.php  themes  updater  version.php
jamess7995@leviathan:~/nextcloud$ cd config
jamess7995@leviathan:~/nextcloud/config$ ls
CAN_INSTALL  config.sample.php
jamess7995@leviathan:~/nextcloud/config$
new-pool / raid
jamess7995@leviathan:~$ cd /new-pool
jamess7995@leviathan:/new-pool$ ls
Highwind  Home  nextcloud  Parents  Scipio
jamess7995@leviathan:/new-pool$ cd nextcloud
-bash: cd: nextcloud: Permission denied
jamess7995@leviathan:/new-pool$ su
Password:
root@leviathan:/new-pool# cd nextcloud
root@leviathan:/new-pool/nextcloud# ls
appdata_oc83rdaogq84  index.html  jamess7995  nextcloud.log
root@leviathan:/new-pool/nextcloud# cd jamess7995
root@leviathan:/new-pool/nextcloud/jamess7995# ls
cache  files  files_trashbin  files_versions  uploads
root@leviathan:/new-pool/nextcloud/jamess7995# cd
root@leviathan:~# cd /new-pool/nextcloud/appdata_oc83rdaogq84
root@leviathan:/new-pool/nextcloud/appdata_oc83rdaogq84# ls
appstore  avatar  css  identityproof  js  preview  richdocuments  theming

The output of your Apache/nginx/system log in /var/log/____:
There’s a little bit here so I’ll paste ls

jamess7995@leviathan:~/nextcloud/config$ cd
jamess7995@leviathan:~$ cd /var/log/apache2
jamess7995@leviathan:/var/log/apache2$ ls
access.log    access.log.10.gz  access.log.12.gz  access.log.14.gz  access.log.3.gz  access.log.5.gz  access.log.7.gz  access.log.9.gz  error.log.1      error.log.11.gz  error.log.13.gz  error.log.2.gz  error.log.4.gz  error.log.6.gz  error.log.8.gz  other_vhosts_access.log
access.log.1  access.log.11.gz  access.log.13.gz  access.log.2.gz   access.log.4.gz  access.log.6.gz  access.log.8.gz  error.log        error.log.10.gz  error.log.12.gz  error.log.14.gz  error.log.3.gz  error.log.5.gz  error.log.7.gz  error.log.9.gz

In case anyone is like me, I have it working for now, maybe I was right and uninstalled things I shouldn’t of, for now it’s working, I found a guide for install and reinstalled these guys

sudo apt install imagemagick php-imagick libapache2-mod-php7.4 php7.4-common php7.4-mysql php7.4-fpm php7.4-gd php7.4-json php7.4-curl php7.4-zip php7.4-xml php7.4-mbstring php7.4-bz2 php7.4-intl php7.4-bcmath php7.4-gmp
1 Like