Last modified: 2011-05-05 15:13:09 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 T30836, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28836 - ForeignDBRepo fails to connect to database server
ForeignDBRepo fails to connect to database server
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 26676
  Show dependency treegraph
 
Reported: 2011-05-05 15:02 UTC by Merlijn van Deen (test)
Modified: 2011-05-05 15:13 UTC (History)
0 users

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


Attachments

Description Merlijn van Deen (test) 2011-05-05 15:02:06 UTC
Using the following configuration from the toolserver:

$wgForeignFileRepos[] = array(
  'class' => 'ForeignDBRepo',
  'name'  => 'shared',
  'url'   => 'http://upload.wikimedia.org/wikipedia/commons/',
  'hashLevels' => 2,
  'dbType' => 'mysql',
  'dbServer' => 'commonswiki-p.rrdb',
  'dbName' => 'commonswiki_p',
  'dbUser' => $wgDBuser,
  'dbPassword' => $wgDBpassword
);

api.php returns the following:

<?xml version="1.0"?>
<api servedby="wolfsbane">
  <error code="internal_api_error_DBConnectionError" info="Exception Caught: DB connection error:  Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)" xml:space="preserve">

#0 /home/valhallasw/src/phase3/includes/db/DatabaseMysql.php(131): DatabaseBase->reportConnectionError(' Can't connect ...')
#1 /home/valhallasw/src/phase3/includes/db/Database.php(518): DatabaseMysql->open(false, 'valhallasw', '...', 'commonswiki_p')
#2 /home/valhallasw/src/phase3/includes/db/Database.php(566): DatabaseBase->__construct(false, 'valhallasw', '...', 'commonswiki_p', 0, 'get from global')
#3 /home/valhallasw/src/phase3/includes/filerepo/ForeignDBRepo.php(47): DatabaseBase::newFromType('mysql', Array)
#4 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(257): ForeignDBRepo->getMasterDB()
#5 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(328): LocalFile->loadFromDB()
#6 /home/valhallasw/src/phase3/includes/filerepo/LocalFile.php(556): LocalFile->load()
#7 /home/valhallasw/src/phase3/includes/filerepo/FileRepo.php(120): LocalFile->exists()
#8 /home/valhallasw/src/phase3/includes/filerepo/FileRepo.php(173): FileRepo->findFile(Object(Title), Array)
#9 /home/valhallasw/src/phase3/includes/filerepo/RepoGroup.php(188): FileRepo->findFiles(Array)
#10 /home/valhallasw/src/phase3/includes/api/ApiQueryImageInfo.php(81): RepoGroup->findFiles(Array)
#11 /home/valhallasw/src/phase3/includes/api/ApiQuery.php(268): ApiQueryImageInfo->execute()
#12 /home/valhallasw/src/phase3/includes/api/ApiMain.php(667): ApiQuery->execute()
#13 /home/valhallasw/src/phase3/includes/api/ApiMain.php(351): ApiMain->executeAction()
#14 /home/valhallasw/src/phase3/includes/api/ApiMain.php(335): ApiMain->executeActionWithErrorHandling()
#15 /home/valhallasw/src/phase3/api.php(130): ApiMain->execute()
#16 /home/valhallasw/src/tsapi/api.php(83): require('/home/valhallas...')
#17 {main}

</error>
</api>

This has probably been introduced in r80864.
Comment 1 Merlijn van Deen (test) 2011-05-05 15:06:44 UTC
Fixed in r87498. However, the same bug seems to exist in another filerepo file:

r1=80864&r2=80863&pathrev=80864">http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/extauth/MediaWiki.php?r1=80864&r2=80863&pathrev=80864

I cannot currently check if the bugfix is correct there.

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


Navigation
Links