日期:2018年4月-Google Cloud Platform-部署预先设计的解决方案(市场)-Bitnami认证的ownCloud 运行正确(自初次安装以来未修改)
Date: May 08, 2019:
Exception occurred while logging exception: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
#0 /opt/bitnami/apps/owncloud/htdocs/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /opt/bitnami/apps/owncloud/htdocs/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /opt/bitnami/apps/owncloud/htdocs/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /opt/bitnami/apps/owncloud/htdocs/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /opt/bitnami/apps/owncloud/htdocs/lib/private/DB/Connection.php(145): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /opt/bitnami/apps/owncloud/htdocs/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /opt/bitnami/apps/owncloud/htdocs/lib/private/DB/ConnectionFactory.php(145): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(493): OC\DB\ConnectionFactory->getConnection(‘mysql’, Array)
#8 /opt/bitnami/apps/owncloud/htdocs/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#9 /opt/bitnami/apps/owncloud/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#10 /opt/bitnami/apps/owncloud/htdocs/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query(‘DatabaseConnect…’)
#11 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(1160): OC\ServerContainer->query(‘DatabaseConnect…’)
#12 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(370): OC\Server->getDatabaseConnection()
#13 /opt/bitnami/apps/owncloud/htdocs/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#14 /opt/bitnami/apps/owncloud/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet(‘AppConfig’)
#15 /opt/bitnami/apps/owncloud/htdocs/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query(‘AppConfig’)
#16 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(1089): OC\ServerContainer->query(‘AppConfig’)
#17 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(547): OC\Server->getAppConfig()
#18 /opt/bitnami/apps/owncloud/htdocs/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#19 /opt/bitnami/apps/owncloud/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet(‘AppManager’)
#20 /opt/bitnami/apps/owncloud/htdocs/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query(‘AppManager’)
#21 /opt/bitnami/apps/owncloud/htdocs/lib/private/Server.php(1359): OC\ServerContainer->query(‘AppManager’)
#22 /opt/bitnami/apps/owncloud/htdocs/lib/private/legacy/app.php(346): OC\Server->getAppManager()
#23 /opt/bitnami/apps/owncloud/htdocs/lib/private/legacy/app.php(110): OC_App::getEnabledApps()
#24 /opt/bitnami/apps/owncloud/htdocs/lib/base.php(579): OC_App::loadApps(Array)
#25 /opt/bitnami/apps/owncloud/htdocs/lib/base.php(998): OC::init()
#26 /opt/bitnami/apps/owncloud/htdocs/index.php(54): require_once(’/opt/bitnami/ap…’)
#27 {main}
服务器配置:
操作系统:
Debian(9)
Web服务器:
阿帕奇(2.4.29)
数据库:
MySQL(5.7.21)
PHP版本:
PHP(7.0.28)
ownCloud版本:(请参阅ownCloud管理页面)
ownCloud(10.0.7)
config / config.php的内容:
$CONFIG = array ( ‘passwordsalt’ => ‘#####’,
‘secret’ => ‘########’,
‘trusted_domains’ => array ( 0 => ‘127.0.0.1’, 1 => ‘35.194.21.102’, 2 => ‘####.org’, ),
‘datadirectory’ => ‘/opt/bitnami/apps/owncloud/data’,
‘overwrite.cli.url’ => ‘http://localhost’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘10.0.7.2’,
‘dbname’ => ‘b######’,
‘dbhost’ => ‘127.0.0.1:/opt/bitnami/mysql/tmp/mysql.sock’,
‘dbtableprefix’ => 'oc’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘b#_####’,
‘dbpassword’ => ‘#####’,
‘logtimezone’ => ‘UTC’,
‘installed’ => true,
‘instanceid’ => ‘#####’,
‘openssl’ => array ( ‘config’ => ‘/opt/bitnami/common/openssl/openssl.cnf’, ),
答案 0 :(得分:0)
过去使用Owncloud时,我遇到了类似的问题。它经常使数据库崩溃。当我切换到Nextcloud时,问题对我来说已经消失了。我希望这有帮助。