Page MenuHomePhabricator

Fatal error: Uncaught Error: Class 'MediaWiki\MediaWikiServices' not found - mediawiki_job_translationnotifications
Closed, ResolvedPublic

Description

We got an Icinga alert about systemd state on mmaint1002.

This (often) points to issues with maintenance jobs (formerly crons) running on mwmaint hosts.

In this case it is:

The following units failed: mediawiki_job_translationnotifications-mediawikiwiki.service,mediawiki_job_translationnotifications-metawiki.service

These 2 units run the same command only differing on the wiki used (mediawiki vs metawiki).

The full command line is:

`ExecStart=/usr/local/bin/mw-cli-wrapper /usr/local/bin/mwscript extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki mediawikiwiki
`

I tried to manually run that and got:

 sudo -u www-data /usr/local/bin/mw-cli-wrapper /usr/local/bin/mwscript extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki mediawikiwiki
Fatal error: Uncaught Error: Class 'MediaWiki\MediaWikiServices' not found in /srv/mediawiki/php-1.38.0-wmf.4/extensions/TranslationNotifications/scripts/DigestEmailer.php:29
Stack trace:
#0 /srv/mediawiki/php-1.38.0-wmf.4/maintenance/doMaintenance.php(56): DigestEmailer->__construct()
#1 /srv/mediawiki/php-1.38.0-wmf.4/extensions/TranslationNotifications/scripts/DigestEmailer.php(317): require_once('/srv/mediawiki/...')
#2 /srv/mediawiki/multiversion/MWScript.php(116): require_once('/srv/mediawiki/...')
#3 {main}
  thrown in /srv/mediawiki/php-1.38.0-wmf.4/extensions/TranslationNotifications/scripts/DigestEmailer.php on line 29
Traceback (most recent call last):
  File "/usr/local/bin/mw-cli-wrapper", line 57, in <module>
    subprocess.run(cmd, check=True, shell=True)
  File "/usr/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/usr/local/bin/mwscript extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki mediawikiwiki' returned non-zero exit status 255.

Event Timeline

Dzahn renamed this task from Fatal error: Uncaught Error: Class 'MediaWiki\MediaWikiServices' not found - to Fatal error: Uncaught Error: Class 'MediaWiki\MediaWikiServices' not found - mediawiki_job_translationnotifications.Oct 18 2021, 9:12 PM

Change 731815 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/TranslationNotifications@master] Stop accessing MediaWikiServices in constructor

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

Change 731815 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] Stop accessing MediaWikiServices in constructor

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

Dzahn changed the task status from Open to In Progress.Oct 22 2021, 10:11 PM
Nikerabbit claimed this task.
Nikerabbit subscribed.

Assuming this was fixed.