Topic on Project:Support desk

DBLoadBalancer Service Exception on Fresh Install of 1.28

8
SystemAssistant (talkcontribs)

Hello MediaWiki Support Team!

I recently installed a fresh version of MediaWiki 1.28 (following the installation requirements and guide provided) on CenOS 6.7, and unfortunately, I have run into an error that I can't seem to get rid of...

What happened was after installing PHP 5.6.30, MySQL 5.1.73, and Apache 2.2.15, I followed the installation steps, making sure to set permissions appropriately on files and folders to make sure I could access the page. Finally I got to the page that begins the installation script, clicked "set up the wiki first", and was greeted by the following error:

[526518699f66c0881f7a63e1] /sysdoc/mw-config/index.php MediaWiki\Services\ServiceDisabledException from line 340 of /var/www/sysdoc/includes/services/ServiceContainer.php: Service disabled: DBLoadBalancer

Backtrace:

#0 /var/www/sysdoc/includes/MediaWikiServices.php(509): MediaWiki\Services\ServiceContainer->getService(string)

#1 /var/www/sysdoc/includes/GlobalFunctions.php(3089): MediaWiki\MediaWikiServices->getDBLoadBalancer()

#2 /var/www/sysdoc/includes/GlobalFunctions.php(3075): wfGetLB(boolean)

#3 /var/www/sysdoc/includes/cache/LinkCache.php(267): wfGetDB(integer)

#4 /var/www/sysdoc/includes/Title.php(3184): LinkCache->addLinkObj(Title)

#5 /var/www/sysdoc/includes/Title.php(934): Title->getArticleID(integer)

#6 /var/www/sysdoc/includes/content/ContentHandler.php(282): Title->getContentModel()

#7 /var/www/sysdoc/includes/Title.php(4684): ContentHandler::getForTitle(Title)

#8 /var/www/sysdoc/includes/parser/Parser.php(867): Title->getPageLanguage()

#9 /var/www/sysdoc/includes/parser/Parser.php(2110): Parser->getTargetLanguage()

#10 /var/www/sysdoc/includes/parser/Parser.php(2075): Parser->replaceInternalLinks2(string)

#11 /var/www/sysdoc/includes/parser/Parser.php(1290): Parser->replaceInternalLinks(string)

#12 /var/www/sysdoc/includes/parser/Parser.php(441): Parser->internalParse(string)

#13 /var/www/sysdoc/includes/installer/Installer.php(675): Parser->parse(string, Title, ParserOptions, boolean)

#14 /var/www/sysdoc/includes/installer/WebInstaller.php(681): Installer->parse(string, boolean)

#15 /var/www/sysdoc/includes/installer/WebInstaller.php(657): WebInstaller->getInfoBox(string, string, string)

#16 /var/www/sysdoc/includes/installer/WebInstaller.php(401): WebInstaller->getErrorBox(string)

#17 /var/www/sysdoc/mw-config/index.php(54): WebInstaller->showError(string, string)

#18 /var/www/sysdoc/mw-config/index.php(38): wfInstallerMain()

#19 {main}

I have tried looking into the error but googling did not return any results other than a post found at:

http://stackoverflow.com/questions/42105209/mediawiki-dbloadbalancer-error-while-setting-up-wiki

Though I looked at the post, it did not seem terribly applicable, but perhaps you think differently. If you could assist me in getting my MediaWiki up and running I would be most appreciative. Thanks and hope to hear from you soon!

J.

Ciencia Al Poder (talkcontribs)

Also reported on task T157890.

Looking at the error stacktrace, looks like it's trying to display an error message, and then the error message contains an internal link somewhere, that it tries to parse (maybe see if it's a red link), and then fails because obviously there's still no database to check for that.

So, basically, the installer is complaining about something, but the error message generates another error itself. Too bad!

There's a qqx trick to display message keys instead of their contents. Maybe you can try appending &uselang=qqx to the URL to see if you can get at least the original error message key to guess what's the original error message. Probably fixing the original error condition you can install it without problems.

SystemAssistant (talkcontribs)

Hello, Ciencia, thank you for your reply! So I tried looking at the error message using the qqx trick you suggested, but it gives me the same output...by "append to the url", you mean it should look something like:

mywiki.com/index.php/?uselang=qqx

in order to get the messages to display as original errors? Sorry if this seems overly simple, this is the first attempt at getting a new wiki up and running after someone nuked my old wiki :(

Thank you again and hope to hear from you soon!

J.

Ciencia Al Poder (talkcontribs)

Part of the stack trace reveals it happens when calling $installer->showError( 'config-session-error', $errors[0] );

The original problem has to do with sessions. But the original message is never printed because of the other errors. Maybe there are permission errors trying to write session files like

SystemAssistant (talkcontribs)

You were absolutely right. The permissions on my php/sessions folder was disallowing writes for users. Fixed the problem immediately. Thank you so much for your help, I would have been stuck for ages otherwise. Thanks again and have a good one!

J.

Eenventer (talkcontribs)

Hi There

I am experiencing the same problem trying to install mediawiki 1.28.1

My stack is Apache 2.4/PHP 7.1/MySQL 5.7 on MacOSX El Capitan

and have ensured that the permissions of the folder that the php session files are written to (session.save_path location) is correct. However I am getting an empty session file put in my sessions folder. I have more details here http://stackoverflow.com/questions/43580767/cryptic-error-dbloadbalancer-error-while-setting-up-mediawiki

I have created a test php script that runs on the same apache server that starts a session and this script has no problems writing a session file to my session.save_path location.

Is there any logging done during the installation that will point me to the root cause of the problem? Because all indications are that the errors being displayed currently are merely red herrings...

Ciencia Al Poder (talkcontribs)

There isn't much logging there, since it's on the installer and you can't set up logging variables.

You can try editing the file (make a backup first and restore it after the tests) mw-config/index.php, after this line:

$errors = $installer->getPhpErrors();

You can add a print_r($errors); to see on the page itselft the contents of this variable (in case it has something useful)

Eenventer (talkcontribs)

So I downloaded the latest source (master) from the GIT repo and configured it locally and low and behold the problem does not happen. I am able to do a clean install. So it appears in version 1.29 alpha the problem has been fixed.