I’m using the VMware image instance of UCS 4.4-with-owncloud.
After a blackout last night, I noticed my ownCloud is not working.
Going to https://ipaddr/univention/portal/
- Can log in
- Can see the main menu
Going to https://ipaddr/owncloud
- Error 502
- Displayed in the browser - Bad Gateway The proxy server received an invalid response from an upstream server. Apache/2.4.25 (Univention) Server at 172.16.30.13 Port 443
I logged into the console, and ran docker logs owncloud_owncloud_1 > ~/oc.log
This seems to be the first sign of trouble after the reboot:
[29.LDAP.sh] no previous installation found
Upgrading server database…
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/owncloud/lib/private/DB/Connection.php:62
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(474): OC\DB\Connection->connect()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(436): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(378): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(843): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/owncloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation()
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(260): OC\DB\Connection->__construct()
#6 /var/www/owncloud/lib/private/DB/ConnectionFactory.php(139): Doctrine\DBAL\DriverManager::getConnection()
#7 /var/www/owncloud/lib/private/Server.php(552): OC\DB\ConnectionFactory->getConnection()
#8 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OC\Server->OC{closure}()
#9 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#10 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query()
#11 /var/www/owncloud/lib/private/Server.php(1260): OC\ServerContainer->query()
#12 /var/www/owncloud/lib/private/Server.php(424): OC\Server->getDatabaseConnection()
#13 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OC\Server->OC{closure}()
#14 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#15 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query()
#16 /var/www/owncloud/lib/private/Server.php(1190): OC\ServerContainer->query()
#17 /var/www/owncloud/lib/private/Server.php(607): OC\Server->getAppConfig()
#18 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OC\Server->OC{closure}()
#19 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#20 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query()
#21 /var/www/owncloud/lib/private/Server.php(1458): OC\ServerContainer->query()
#22 /var/www/owncloud/lib/private/legacy/app.php(344): OC\Server->getAppManager()
#23 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#24 /var/www/owncloud/lib/base.php(590): OC_App::loadApps()
#25 /var/www/owncloud/lib/base.php(1070): OC::init()
#26 /var/www/owncloud/console.php(74): require_once(’/var/www/ownclo…’)
#27 /var/www/owncloud/occ(11): require_once(’/var/www/ownclo…’)
#28 {main}Disabling OpenID Connect app…
Is it possible that the DB was damaged by the hard power cycle? How can I fix this?
This issue has happened to me twice, and I “solved” it with a full reinstall… but don’t want to go through that again!
Please provide specific commands, because I’m new to docker and don’t really know how to troubleshoot this myself.
Thanks in advance!