Last modified: 2011-05-05 15:13:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 28836 - ForeignDBRepo fails to connect to database server
ForeignDBRepo fails to connect to database server
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
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: ---


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'   => '',
  '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}


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:


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.