Hi,
my server’s OS disk died and I had to reinstall. I restored my docker stuff from backups, but it seems like I am missing something with nextcloud, it only gives “Internal server error” on the browser. The nextcloud containers nginx error log is probably helpful, but I can’t understand it.
My other containers are working.
This is the issue here: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /config/www/nextcloud/lib/private/DB/Connection.php:85
Nextcloud is not able to connect to your SQL server. You’ll need to investigate there.
Thanks!
I really dont know my way around databases. i assume this is not a simple user/password problem?
There are lines for passwordsalt and secret in the nextclouds config.php, could these somehow be wrong?
I could just nuke the mariadb and start a new one, as all my files are intact, but I’d rather not, if this can be fixed somehow.
It’s probably best to start by checking your logs for your SQL server (going to assume it’s out MariaDB container) if it is, do docker logs mariadb and see what the output shows.
Switch your mariadb to this version linuxserver/mariadb:version-110.4.21mariabionic and let it start up cleanly. Once it has, stop the container and then switch back to the main image.
All while nextcloud or anything else that uses it is off.
OK, that solved something. I got the web interface telling me to upgrade:
App update required
Please make sure that the database, the config folder and the data folder have been backed up before proceeding.
I tried to click the update button, but it told me “an error has occurred”. I then tried to do the update via cli:
$docker exec -it -u abc nextcloud php /config/www/nextcloud/occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
An unhandled exception has been thrown:
TypeError: Argument 3 passed to OC\Updater::__construct() must implement interface OCP\ILogger or be null, instance of OC\Log\PsrLoggerAdapter given, called in /config/www/nextcloud/core/Command/Upgrade.php on line 97 and defined in /config/www/nextcloud/lib/private/Updater.php:87
Stack trace:
#0 /config/www/nextcloud/core/Command/Upgrade.php(97): OC\Updater->__construct()
#1 /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#2 /config/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#3 /config/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#4 /config/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#5 /config/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#6 /config/www/nextcloud/console.php(100): OC\Console\Application->run()
#7 /config/www/nextcloud/occ(11): require_once('/config/www/nex...')
#8 {main}
For some reason, I tried occ upgrade yesterday, which tried to upgrade the nextcloud itself. What it really was asking me to do was to update the apps, which worked like it should.
So, j0nnymoe’s instruction in #5 was enough to fix things. Thanks!