Page MenuHomePhabricator

LoginNotify attempts to connect to wiki '0'
Closed, ResolvedPublic5 Estimated Story Points

Description

Seen in prod on test wiki, not reproduceable on demand:

2017-06-07 08:23:58 [WTe4GwpAIDQAAC3YgmkAAABY] mw1182 testwiki 1.30.0-wmf.4 exception ERROR: [WTe4GwpAIDQAAC3YgmkAAABY] /w/index.php?title=Special
:UserLogin&returnto=Main+Page   Wikimedia\Rdbms\DBConnectionError from line 788 of /srv/mediawiki/php-1.30.0-wmf.4/includes/libs/rdbms/database/Da
tabase.php: Cannot access the database: Access denied for user 'wikiuser'@'10.64.%' to database '0' (10.64.32.136) {"exception_id":"WTe4GwpAIDQAAC
3YgmkAAABY","caught_by":"mwe_handler"}
[Exception Wikimedia\Rdbms\DBConnectionError] (/srv/mediawiki/php-1.30.0-wmf.4/includes/libs/rdbms/database/Database.php:788) Cannot access the database: Access denied for user 'wikiuser'@'10.64.%' to database '0' (10.64.32.136)
  #0 /srv/mediawiki/php-1.30.0-wmf.4/includes/libs/rdbms/loadbalancer/LoadBalancer.php(995): Wikimedia\Rdbms\Database->reportConnectionError(string)
  #1 /srv/mediawiki/php-1.30.0-wmf.4/includes/libs/rdbms/loadbalancer/LoadBalancer.php(666): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  #2 /srv/mediawiki/php-1.30.0-wmf.4/extensions/LoginNotify/LoginNotify_body.php(214): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, integer)
  #3 /srv/mediawiki/php-1.30.0-wmf.4/extensions/LoginNotify/LoginNotify_body.php(113): LoginNotify->isUserInCheckUser(User)
  #4 /srv/mediawiki/php-1.30.0-wmf.4/extensions/LoginNotify/LoginNotify_body.php(634): LoginNotify->isFromKnownIP(User)
  #5 /srv/mediawiki/php-1.30.0-wmf.4/extensions/LoginNotify/LoginNotify.hooks.php(157): LoginNotify->recordFailure(User)
  #6 /srv/mediawiki/php-1.30.0-wmf.4/extensions/LoginNotify/LoginNotify.hooks.php(131): LoginNotifyHooks::doFailedLogin(User)
  #7 /srv/mediawiki/php-1.30.0-wmf.4/includes/Hooks.php(186): LoginNotifyHooks::onAuthManagerLoginAuthenticateAudit(MediaWiki\Auth\AuthenticationResponse, NULL, string)
  #8 /srv/mediawiki/php-1.30.0-wmf.4/includes/auth/AuthManager.php(470): Hooks::run(string, array)
  #9 /srv/mediawiki/php-1.30.0-wmf.4/includes/auth/AuthManager.php(382): MediaWiki\Auth\AuthManager->continueAuthentication(array)
  #10 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
  #11 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)
  #12 /srv/mediawiki/php-1.30.0-wmf.4/includes/htmlform/HTMLForm.php(663): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
  #13 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()
  #14 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/LoginSignupSpecialPage.php(305): AuthManagerSpecialPage->trySubmit()
  #15 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/SpecialPage.php(522): LoginSignupSpecialPage->execute(NULL)
  #16 /srv/mediawiki/php-1.30.0-wmf.4/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
  #17 /srv/mediawiki/php-1.30.0-wmf.4/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
  #18 /srv/mediawiki/php-1.30.0-wmf.4/includes/MediaWiki.php(862): MediaWiki->performRequest()
  #19 /srv/mediawiki/php-1.30.0-wmf.4/includes/MediaWiki.php(523): MediaWiki->main()
  #20 /srv/mediawiki/php-1.30.0-wmf.4/index.php(43): MediaWiki->run()
  #21 /srv/mediawiki/w/index.php(3): include(string)
  #22 {main}

Event Timeline

Change 357737 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/LoginNotify@master] Add debug logging for DB connection errors

https://gerrit.wikimedia.org/r/357737

Change 357743 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/LoginNotify@wmf/1.30.0-wmf.4] Add debug logging for DB connection errors

https://gerrit.wikimedia.org/r/357743

Change 357737 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@master] Add debug logging for DB connection errors

https://gerrit.wikimedia.org/r/357737

Change 357743 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@wmf/1.30.0-wmf.4] Add debug logging for DB connection errors

https://gerrit.wikimedia.org/r/357743

Change 358152 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/LoginNotify@master] Use info itself instead of array index

https://gerrit.wikimedia.org/r/358152

Change 358152 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@master] Use info itself instead of array index

https://gerrit.wikimedia.org/r/358152

Latest patch needs to be tested on Test Wikipedia and then have the debugging code removed once we know it fixes the problem. If it doesn't fix the problem we need to implement a new fix.

kaldari set the point value for this task to 5.

Change 359246 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/LoginNotify@master] Clean up debugging code

https://gerrit.wikimedia.org/r/359246

Change 359246 merged by jenkins-bot:
[mediawiki/extensions/LoginNotify@master] Clean up debugging code

https://gerrit.wikimedia.org/r/359246

kaldari claimed this task.
kaldari edited projects, added Community-Tech-Sprint; removed Community-Tech.
kaldari moved this task from Ready to Q1 2018-19 on the Community-Tech-Sprint board.