Wikimedia Developer Support

[MediaWiki-l] UnexpectedValueException from line 961 of /var/www/html/.../loadbalancer/LoadBalancer.php


#1

Hi Everyone,

We just upgraded from MediaWiki 1.31.1 to 1.31.2. Upon restart we
countered (https://www.cryptopp.com/wiki/):

    [XPoMh74trMB6BmTtXzPnBgAAAAY] /wiki/ UnexpectedValueException from
    line 961 of
/var/www/html/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php:
    Got connection to 'my_wiki-wikicryptopp_', but expected local domain
    ('my_wiki-my_wiki-wikicryptopp_').
    ...

According to https://www.mediawiki.org/wiki/Download, 1.31.2 is the
latest download. I'm guessing is sidesteps the typos discussed at
https://lists.wikimedia.org/pipermail/mediawiki-l/2019-June/047999.html,
so there were no maintenance releases afterwards. (Or is there a
1.31.3 somewhere?)

# grep -i -E 'my|cryptopp' LocalSettings.php
$wgServer = '//www.cryptopp.com';
$wgEmergencyContact = "noreply@cryptopp.com";
$wgPasswordSender = "noreply@cryptopp.com";
$wgDBtype = "mysql";
$wgDBname = "my_wiki";
$wgDBprefix = "wikicryptopp_";

How should we proceed?

Thanks in advance.


#2

The immediate maintenance release for 1.27 was due to an issue that only
affected that version, hence no release of 1.31.3 (or any other version)

I'd like to try and clear up some confusion in your post.

Line 961 in 1.31.2 isn't a line that gives the error that you're claiming,
nor does anywhere in that file [1] throw that error.

However, in 1.32.2 it does [2].

It looks like you've upgraded from 1.31.1 to 1.32.2, not to 1.31.2 as you
claim. This seems to be confirmed on [3], but your wiki also seems to be ok
from a cursory browse around.

Are you still having issues? Or have they resolved themselves? If so, can
you tell me when and where you see the error when using your wiki, and we
can try and help you work out where to proceed.

Thanks!

Sam

[1]


[2]

[3] https://www.cryptopp.com/wiki/Special:Version


#3

The two my_wiki prefixes came from $wgDBmwschema:

    # Schemas for Postgres
    $wgDBmwschema = $wgDBname;
    $wgDBts2schema = "public";

We run MySQL. It was fine in 1.31.1 and below, but it started getting
parsed after the 1.31.1 update.

Jeff


#4

Are you still having problems?

As above, you're not running 1.31.1, you're running 1.32.1...


#5

Are you still having problems?

No.

As above, you're not running 1.31.1, you're running 1.32.1...

We tried 1.31.2, and then 1.32.2 hoping it would fix it. We stayed at 1.32.2.

There was one more error after that, but I don't recall the message.

Jeff


#6

The other thing we had to add was:

    $wgResourceLoaderLESSVars = false;

It surfaced from https://www.mediawiki.org/wiki/Topic:Uv7tk3kq7csou5po .

Jeff


#7

Would you remind removing it again, and telling us where it's broken/what the
actual error message is?

$wgResourceLoaderLESSVars was removed in 1.32, but I'm guessing there's some
extension you're using that still has a usage of it, and should be fixed


#8

As I understand things, it is needed for Mobile FrontEnd.
https://www.mediawiki.org/wiki/Extension:MobileFrontend

Jeff


#9

Did you update the extension when you updated MediaWiki core? There is usages
of that variable in the 1.31 version of MobileFrontend, but they've been
removed in the 1.32 version.

The version of the extension should match the version of MediaWiki core
you're using, else you might get errors like this

$ git clone
"ssh://reedy@gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend"
Cloning into 'MobileFrontend'...
remote: Counting objects: 2291, done
remote: Finding sources: 100% (92/92)
remote: Getting sizes: 100% (67/67)
remote: Compressing objects: 100% (673532/673532)
remote: Total 107395 (delta 28), reused 107334 (delta 9)
Receiving objects: 100% (107395/107395), 25.05 MiB | 4.82 MiB/s, done.
Resolving deltas: 100% (86465/86465), done.
$ cd MobileFrontend/
$ git checkout REL1_32
Branch 'REL1_32' set up to track remote branch 'REL1_32' from 'origin'.
Switched to a new branch 'REL1_32'
$ grep -R git clone
"ssh://reedy@gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend"^C
$ grep -R ResourceLoaderLESSVars *
$ git checkout REL1_31
Branch 'REL1_31' set up to track remote branch 'REL1_31' from 'origin'.
Switched to a new branch 'REL1_31'
$ grep -R ResourceLoaderLESSVars *
includes/MobileFrontend.hooks.php: $lessVars = $config->get(
'ResourceLoaderLESSVars' );
includes/MobileFrontend.hooks.php: $lessVars = $config->get(
'ResourceLoaderLESSVars' );