Page MenuHomePhabricator

https://wikistats.wmflabs.org/ is broken
Closed, ResolvedPublic

Description

This failing occures since 10 hours or lower.

wikistats_tests are failing with XML:

ERROR: test_sort (__main__.WikiStatsTestCase)
Test sorted results.
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\wikistats_tests.py", line 27, in test_sort
    data = ws.sorted('wikipedia', 'total')
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 232, in sorted
    return sorted(self.get(table),
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 210, in get
    data = self.xml(table)
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 180, in xml
    tree = cElementTree.parse(f)
  File "<string>", line 62, in parse
  File "<string>", line 38, in parse
ParseError: syntax error: line 1, column 49

also for csv:
see https://api.travis-ci.org/v3/job/462490746/log.txt

wikimedia_sites is failing due to this bug:

C:\pwb\GIT\core>py -2 pwb.py wikimedia_sites

WARNING: WikiStats: unicodecsv package required for using csv in Python 2; falling back to using the larger XML datasets.

Checking family wikibooks:
Traceback (most recent call last):
  File "pwb.py", line 257, in <module>
    if not main():
  File "pwb.py", line 250, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 119, in run_python_file
    main_mod.__dict__)
  File ".\scripts\maintenance\wikimedia_sites.py", line 102, in <module>
    update_family(fam)
  File ".\scripts\maintenance\wikimedia_sites.py", line 54, in update_family
    table = ws.languages_by_size(family)
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 239, in languages_by_size
    return [d['prefix'] for d in self.get(table)]
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 210, in get
    data = self.xml(table)
  File "C:\pwb\GIT\core\pywikibot\data\wikistats.py", line 180, in xml
    tree = cElementTree.parse(f)
  File "<string>", line 62, in parse
  File "<string>", line 38, in parse
cElementTree.ParseError: syntax error: line 1, column 0
<class 'cElementTree.ParseError'>
CRITICAL: Closing network session.

Related Objects

Event Timeline

Xqt triaged this task as High priority.Dec 2 2018, 9:00 PM
Xqt renamed this task from wikistats fails with syntax error to https://wikistats.wmflabs.org/ is broken.Dec 2 2018, 9:07 PM
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139779014863040 [Note] Recovering after a crash using wikistats-kraken-bin
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139779014863040 [Note] Starting crash recovery...
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139779014863040 [Note] Crash recovery finished.
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139778905908992 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exi
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139779014863040 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 02 22:35:03 wikistats-kraken mysqld[9551]: 2018-12-02 22:35:03 139779014863040 [Note] Server socket created on IP: '::'.
Dec 02 22:35:03 wikistats-kraken systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 22:35:03 wikistats-kraken systemd[1]: Failed to start MariaDB 10.2.12 database server.
Dec 02 22:35:03 wikistats-kraken systemd[1]: mariadb.service: Unit entered failed state.

https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#cant-open-privilege-tables

we recently switched to stretch and puppet code for mariadb, removed mariadb package, and data let puppet reinstall it, then the service started again

imported dump from about 2 weeks ago that i had available from the migration. after that fixed privileges to match wikistats config.

service is back now but with outdated data. upgrades are running to change that too.

Dzahn lowered the priority of this task from High to Medium.Dec 2 2018, 11:05 PM

..in progress.. data should be renewed soonish.. but at least it's already not completely broken anymore

From pywikibot side this is solved, @Dzahn thanks a lot

thanks @Xqt I had left it open to remind myself i have to re-add the latest new wikis (because my dump was 2 weeks old that i restored from). also wanted to confirm all updates finished.

we can close here because the "add wikis" ticket has already been reopened separately. and the remaining update issues are unrelated for non-wmf wikis