On a freshly installed PostgreSQL wiki I had a problem with the database connection:
## Database settings $wgDBtype = "postgres"; $wgDBserver = ""; $wgDBname = "clitest01"; $wgDBuser = "wikiuser"; $wgDBpassword = "*passwd*";
Installation went fine but those settings didn't work for some reason (this is another bug).
Wiki reports only:
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Cannot contact the database server: No database connection)
Backtrace:#0 w/includes/db/LoadBalancer.php(752): DatabaseBase->reportConnectionError('Unknown error (...') #1 w/includes/db/LoadBalancer.php(475): LoadBalancer->reportConnectionError() #2 w/includes/GlobalFunctions.php(3618): LoadBalancer->getConnection(-1, Array, false) #3 w/includes/page/WikiPage.php(379): wfGetDB(-1) #4 w/includes/page/WikiPage.php(462): WikiPage->loadPageData() #5 w/includes/page/WikiPage.php(515): WikiPage->exists() #6 w/includes/page/WikiPage.php(222): WikiPage->getContentModel() #7 w/includes/page/WikiPage.php(208): WikiPage->getContentHandler() #8 w/includes/actions/Action.php(96): WikiPage->getActionOverrides() #9 w/includes/actions/Action.php(149): Action::factory('view', Object(WikiPage), Object(RequestContext)) #10 w/includes/MediaWiki.php(164): Action::getActionName(Object(RequestContext)) #11 w/includes/MediaWiki.php(533): MediaWiki->getAction() #12 w/includes/MediaWiki.php(460): MediaWiki->main() #13 w/index.php(46): MediaWiki->run() #14 {main}
After commenting out the "ugly hack" in LoadBalancer::reallyOpenConnection() I am getting a real cause for the problem:
(Cannot contact the database server: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?)
Backtrace:
#0 w/includes/db/Database.php(822): DatabasePostgres->open('', 'wikiuser', 'minitest', 'clitest01') #1 w/includes/db/Database.php(919): DatabaseBase->__construct(Array) #2 w/includes/db/LoadBalancer.php(717): DatabaseBase::factory('postgres', Array) #3 w/includes/db/LoadBalancer.php(591): LoadBalancer->reallyOpenConnection(Array, false) #4 w/includes/db/LoadBalancer.php(471): LoadBalancer->openConnection(0, false) #5 w/includes/GlobalFunctions.php(3618): LoadBalancer->getConnection(-1, Array, false) #6 w/includes/page/WikiPage.php(379): wfGetDB(-1) #7 w/includes/page/WikiPage.php(462): WikiPage->loadPageData() #8 w/includes/page/WikiPage.php(515): WikiPage->exists() #9 w/includes/page/WikiPage.php(222): WikiPage->getContentModel() #10 w/includes/page/WikiPage.php(208): WikiPage->getContentHandler() #11 w/includes/actions/Action.php(96): WikiPage->getActionOverrides() #12 w/includes/actions/Action.php(149): Action::factory('view', Object(WikiPage), Object(RequestContext)) #13 w/includes/MediaWiki.php(164): Action::getActionName(Object(RequestContext)) #14 w/includes/MediaWiki.php(533): MediaWiki->getAction() #15 w/includes/MediaWiki.php(460): MediaWiki->main() #16 w/index.php(46): MediaWiki->run() #17 {main}
... which is some pg-specific installer problem we are working on it now.
Version: 1.24rc
Severity: major
See Also: T72225: Freshly installed wiki fails with "Permission denied" on PostgreSQL socket