serverinfo
serverinfo copied to clipboard
[Bug]: serverinfo page not showing up (using postgres 13)
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
I recently updated from 26 -> 27 -> 28.0.3 and I don't know when this error appeared. When I click click on Administration -> System in web interface an exception occurs. The database server is the postgres debian package from bullseye: 13.14-0+deb11u1 (postgres 13) and should be OK according to requirements: PostgreSQL 12/13/14/15/16
Steps to reproduce
click on Administration -> System
Expected behavior
system info shows up
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [X] 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": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https://***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "28.0.3.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"forcessl": true,
"appstore.experimental.enabled": false,
"loglevel": 0,
"debug": false,
"trashbin_retention_obligation": "auto",
"updatechecker": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0
},
"updater.release.channel": "stable",
"has_internet_connection": true,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": "",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "DE",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtpauth": 1,
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"maintenance_window_start": 5
}
}
List of activated Apps
No response
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{
"reqId": "XXXXXXXX",
"level": 0,
"time": "2024-03-06TXXXXXXXX",
"remoteAddr": "XXXXXXXX",
"user": "XXXXXXXX",
"app": "PHP",
"method": "GET",
"url": "/settings/admin/serverinfo",
"message": "Creation of dynamic property OCA\\FirstRunWizard\\Settings\\Personal::$urlGenerator is deprecated at XXXXXXXX/apps/firstrunwizard/lib/Settings/Personal.php#40",
"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
"version": "28.0.3.2",
"data": {
"app": "PHP"
}
}
{
"reqId": "XXXXXXXX",
"level": 3,
"time": "2024-03-06TXXXXXXXX",
"remoteAddr": "XXXXXXXX",
"user": "XXXXXXXX",
"app": "PHP",
"method": "GET",
"url": "/settings/admin/serverinfo",
"message": "Trying to access array offset on value of type bool at XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php#132",
"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
"version": "28.0.3.2",
"data": {
"app": "PHP"
}
}
{
"reqId": "XXXXXXXX",
"level": 3,
"time": "2024-03-06TXXXXXXXX",
"remoteAddr": "XXXXXXXX",
"user": "XXXXXXXX",
"app": "index",
"method": "GET",
"url": "/settings/admin/serverinfo",
"message": "An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
"version": "28.0.3.2",
"exception": {
"Exception": "OC\\DB\\Exceptions\\DbalException",
"Message": "An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"Code": 7,
"Trace": [
{
"file": "XXXXXXXX/lib/private/DB/ConnectionAdapter.php",
"line": 72,
"function": "wrap",
"class": "OC\\DB\\Exceptions\\DbalException",
"type": "::"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 134,
"function": "executeQuery",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 48,
"function": "databaseSize",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/Settings/AdminSettings.php",
"line": 88,
"function": "getDatabaseStatistics",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 129,
"function": "getForm",
"class": "OCA\\ServerInfo\\Settings\\AdminSettings",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 86,
"function": "formatSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 149,
"function": "getSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 71,
"function": "getIndexResponse",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "index",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "XXXXXXXX/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "XXXXXXXX/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "XXXXXXXX/lib/private/DB/Exceptions/DbalException.php",
"Line": 71,
"Previous": {
"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
"Message": "An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"Code": 7,
"Trace": [
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1938,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter",
"type": "->"
},
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1880,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1105,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/ConnectionAdapter.php",
"line": 69,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 134,
"function": "executeQuery",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 48,
"function": "databaseSize",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/Settings/AdminSettings.php",
"line": 88,
"function": "getDatabaseStatistics",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 129,
"function": "getForm",
"class": "OCA\\ServerInfo\\Settings\\AdminSettings",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 86,
"function": "formatSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 149,
"function": "getSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 71,
"function": "getIndexResponse",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "index",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "XXXXXXXX/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "XXXXXXXX/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "XXXXXXXX/3rdparty/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php",
"Line": 87,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"Message": "SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"Code": 7,
"Trace": [
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php",
"line": 76,
"function": "new",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"type": "::"
},
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1100,
"function": "query",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/ConnectionAdapter.php",
"line": 69,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 134,
"function": "executeQuery",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 48,
"function": "databaseSize",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/Settings/AdminSettings.php",
"line": 88,
"function": "getDatabaseStatistics",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 129,
"function": "getForm",
"class": "OCA\\ServerInfo\\Settings\\AdminSettings",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 86,
"function": "formatSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 149,
"function": "getSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 71,
"function": "getIndexResponse",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "index",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "XXXXXXXX/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "XXXXXXXX/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "XXXXXXXX/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
"Line": 28,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"Code": "42883",
"Trace": [
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php",
"line": 71,
"function": "query",
"class": "PDO",
"type": "->"
},
{
"file": "XXXXXXXX/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1100,
"function": "query",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/DB/ConnectionAdapter.php",
"line": 69,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 134,
"function": "executeQuery",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/DatabaseStatistics.php",
"line": 48,
"function": "databaseSize",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/serverinfo/lib/Settings/AdminSettings.php",
"line": 88,
"function": "getDatabaseStatistics",
"class": "OCA\\ServerInfo\\DatabaseStatistics",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 129,
"function": "getForm",
"class": "OCA\\ServerInfo\\Settings\\AdminSettings",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 86,
"function": "formatSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 149,
"function": "getSettings",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/apps/settings/lib/Controller/AdminSettingsController.php",
"line": 71,
"function": "getIndexResponse",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "index",
"class": "OCA\\Settings\\Controller\\AdminSettingsController",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "XXXXXXXX/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "XXXXXXXX/lib/base.php",
"line": 1069,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "XXXXXXXX/index.php",
"line": 39,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "XXXXXXXX/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php",
"Line": 71
}
}
},
"message": "An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.",
"exception": {},
"CustomMessage": "An exceptionoccurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function pg_database_size() does not exist\nLINE 1: SELECT pg_database_size() as size\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts."
}
}
Additional info
postgres command line works just fine:
some.name=# SELECT pg_database_size('some.name');
user and db name contain dots ('.')
Undefined function: 7 ERROR: function pg_database_size() does not exist
We should handle this exception better. Can your user execute pg_database_size?
We should handle this exception better. Can your user execute pg_database_size?
Thank you for asking. This is the other change I did recently: I changed dbname and dbuser from "nextcloud" to my domain name (lets say my.domain). So now it contains dots (.). For authentication I use peer authentication: the system user's name who runs nextcloud is my.domain as well and no password is needed.
The user can execute pg_database_size:
root@server:/var# sudo -u my.domain -c "SELECT pg_database_size('my.domain');"
pg_database_size
------------------
41855535
(1 row)