Last modified: 2014-09-22 02:40:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72223, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70223 - 'Unknown error' in LoadBalancer->reportConnectionError() hides a real database problem
'Unknown error' in LoadBalancer->reportConnectionError() hides a real databas...
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.24rc
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-31 00:16 UTC by Marcin Cieślak
Modified: 2014-09-22 02:40 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Marcin Cieślak 2014-08-31 00:16:41 UTC
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.
Comment 1 Gerrit Notification Bot 2014-08-31 00:19:49 UTC
Change 157488 had a related patch set uploaded by saper:
Do not hide real DB error on first connect

https://gerrit.wikimedia.org/r/157488
Comment 2 Marcin Cieślak 2014-08-31 01:01:19 UTC
The real database problem hidden is actually bug 70225, an instance of a well-known bug 69281.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links