[Bug]: NC 24 with php-fpm/php-fcgi can't connect to MariaDB
更新为v.24后,我开始在Apache2错误日志中找到此错误(这是一行,因此我不会将其放入代码块):
[Mon May 09 16:09:01.851585 2022] [proxy_fcgi:error] [pid 1841:tid 140660554856192] [client ] AH01071: Got error 'PHP message: 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/nextcloud/lib/private/DB/Connection.php:139\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()\n#6 /var/www/nextcloud/lib/private/AppConfig.php(176): OC\AppConfig->loadConfigValues()\n#7 /var/www/nextcloud/lib/private/AppConfig.php(367): OC\AppConfig->getApps()\n#8 /var/www/nextcloud/lib/...'
这是我第一次遇到这个错误,鉴于我升级几天后发生了错误,因此令人惊讶。我没有在升级和引发此错误之间进行配置更改。
It was fixed by disabling the apache modules proxy_fcgi proxy_http2 http2 mpm_event
and the php7.4-fpm
config, and reactivating the default apache mpm_prefork php7.4
modules.
php7.4-fpm
,
mpm_event
,
proxy_fcgi
, and
http2
wait a few days (it's possible it was sooner, though everything was fine after the update was complete) find that Nexcloud can't connect to the database
使用PHP-FPM.C时,NextCloud将继续能够连接到数据库
Installation methodManual installation
Operating systemDebian/Ubuntu
PHP engine versionPHP 7.4
Web serverApache(支持)
Database engine version玛丽亚德
Is this bug present after an update or on a fresh install?更新到主要版本(例如22.2.3至23.0.1)
Are you using the Nextcloud Server Encryption module?加密是禁用的
What user-backends are you using? Default user-backend (database) LDAP/ Active Directory SSO - SAML Other Configuration report{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "styx.hell.rodeo" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "24.0.0.12", "overwrite.cli.url": "https:\/\/styx.hell.rodeo", "htaccess.RewriteBase": "\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "filelocking.enabled": true, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "user": "default", "dbindex": 0, "timeout": 1.5 }, "memcache.locking": "\\OC\\Memcache\\Redis", "default_locale": "en_US", "default_phone_region": "US", "mail_smtpsecure": "ssl", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpauthtype": "PLAIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "twofactor_enforced": "false", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "updater.release.channel": "stable", "maintenance": false, "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "theme": "", "loglevel": 2, "app_install_overwrite": [ "apporder", "breezedark", "extract", "metadata", "files_markdown", "news" ], "data-fingerprint": "85956e5b85d35e0b0639becbb141ca26" } }List of activated Apps
Enabled: - accessibility: 1.10.0 - admin_audit: 1.14.0 - apporder: 0.15.0 - breezedark: 24.0.0 - cloud_federation_api: 1.7.0 - contactsinteraction: 1.5.0 - dav: 1.22.0 - deck: 1.7.0 - extract: 1.3.5 - federatedfilesharing: 1.14.0 - federation: 1.14.0 - files: 1.19.0 - files_markdown: 2.3.6 - files_pdfviewer: 2.5.0 - files_rightclick: 1.3.0 - files_sharing: 1.16.2 - files_trashbin: 1.14.0 - files_versions: 1.17.0 - files_videoplayer: 1.13.0 - firstrunwizard: 2.13.0 - logreader: 2.9.0 - lookup_server_connector: 1.12.0 - metadata: 0.16.0 - news: 18.0.1 - nextcloud_announcements: 1.13.0 - notes: 4.3.1 - notifications: 2.12.0 - notify_push: 0.4.0 - oauth2: 1.12.0 - photos: 1.6.0 - privacy: 1.8.0 - provisioning_api: 1.14.0 - serverinfo: 1.14.0 - settings: 1.6.0 - sharebymail: 1.14.0 - support: 1.7.0 - survey_client: 1.12.0 - text: 3.5.1 - theming: 1.15.0 - twofactor_backupcodes: 1.13.0 - twofactor_totp: 6.3.0 - updatenotification: 1.14.0 - viewer: 1.8.0 - workflowengine: 2.6.0 Disabled: - activity: 2.15.0 - bruteforcesettings: 2.4.0 - circles: 22.1.1 - comments: 1.11.0 - dashboard: 7.1.0 - encryption - files_external - forms: 2.5.0 - password_policy: 1.11.0 - recommendations: 1.0.0 - systemtags: 1.11.0 - user_ldap - user_status: 1.1.1 - weather_status: 1.1.0 - workflow_ocr: 1.23.2Nextcloud Signing status
No errors have been found.Nextcloud Logs
nothing relevant in data/nextcloud.log
Additional info Debian 11/稳定的Apache 2.4.53 Mariadb 10.6.7(来自Mariadb.org存储库)
packages 当前并定期更新。
FWIW, I installed/setup another Nextcloud instance on a different machine using the exact same apache2/php/mariadb (with php-fpm proxy_fcgi
etc) with no issues.