Last modified: 2013-05-07 07:38:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49808, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47808 - internal_api_error when running bot on en.wikipedia.beta.wmflabs.org
internal_api_error when running bot on en.wikipedia.beta.wmflabs.org
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
deployment-prep (beta) (Other open bugs)
unspecified
All Linux
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-28 23:25 UTC by Riley Huntley
Modified: 2013-05-07 07:38 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot of output (15.58 KB, image/png)
2013-04-28 23:26 UTC, Riley Huntley
Details

Description Riley Huntley 2013-04-28 23:25:23 UTC
When running a newsletter delivery bot on http://en.wikipedia.beta.wmflabs.org/ (when testing), I recieve the error: (also see the attachment)

Traceback (most recent call last):
  File "single-wiki-delivery-bot.py", line 197, in <module>
    change_status('Running')
  File "single-wiki-delivery-bot.py", line 35, in change_status
    status_page_obj.edit(status_message, summary='[[WP:BOT|Bot]]: Updated status
  File "/home/riley/wikitools/wikitools/page.py", line 538, in edit
    result = req.query()
  File "/home/riley/wikitools/wikitools/api.py", line 143, in query
    raise APIError(data['error']['code'], data['error']['info'])
wikitools.api.APIError: (u'internal_api_error_MWException', u'Exception Caught:

I get this when running on Windows 7 and linux. Script I was running: https://github.com/RileyHuntley/delivery-bots/blob/master/single-wiki-delivery-bot.py
Comment 1 Riley Huntley 2013-04-28 23:26:10 UTC
Created attachment 12199 [details]
Screenshot of output
Comment 2 MZMcBride 2013-04-28 23:31:11 UTC
---
$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import wikitools
>>> w = wikitools.Wiki('http://en.wikipedia.beta.wmflabs.org/w/api.php')
>>> w.login('M', 'h')
True
>>> p = wikitools.Page(w, 'Test')
>>> p.edit('test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.8-intel/egg/wikitools/page.py", line 538, in edit
  File "build/bdist.macosx-10.8-intel/egg/wikitools/api.py", line 143, in query
wikitools.api.APIError: (u'internal_api_error_MWException', u'Exception Caught: Unable to connect to redis server.')
---

Though it seems to be intermittent. When re-testing, I was able to succesfully edit:

---
>>> p.edit('test')
{u'edit': {u'nochange': u'', u'contentmodel': u'wikitext', u'pageid': 6401, u'result': u'Success', u'title': u'Test'}}
>>> p.edit('test2')
{u'edit': {u'pageid': 6401, u'title': u'Test', u'newtimestamp': u'2013-04-28T23:30:10Z', u'contentmodel': u'wikitext', u'result': u'Success', u'oldrevid': 56971, u'newrevid': 56972}}
>>> p.edit('test3')
{u'edit': {u'pageid': 6401, u'title': u'Test', u'newtimestamp': u'2013-04-28T23:30:17Z', u'contentmodel': u'wikitext', u'result': u'Success', u'oldrevid': 56972, u'newrevid': 56973}}
---

"Exception Caught: Unable to connect to redis server." <-- Is there a log of these exceptions?
Comment 3 Sam Reed (reedy) 2013-04-29 00:05:23 UTC
(In reply to comment #2)
> "Exception Caught: Unable to connect to redis server." <-- Is there a log of
> these exceptions?

AFAIK labs isn't using redis currently..
Comment 4 Sam Reed (reedy) 2013-04-29 00:06:27 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > "Exception Caught: Unable to connect to redis server." <-- Is there a log of
> > these exceptions?
> 
> AFAIK labs isn't using redis currently..

// Cache to hold user sessions in production:
$wgObjectCaches['sessions'] = array(
	'class'   => 'RedisBagOStuff',
	'servers' => $sessionRedis[$wmfDatacenter],
);

// Override for beta:
if( $wmfRealm == 'labs' ) {
	$wgObjectCaches['sessions'] = $wgObjectCaches['memcached-pecl'];
}
Comment 5 Antoine "hashar" Musso (WMF) 2013-05-06 10:40:47 UTC
Might be caused by one of the extension or another part of the mediawiki configuration. Do you still encounter the issue?
Comment 6 MZMcBride 2013-05-07 03:47:00 UTC
I can't reproduce it now.
Comment 7 Antoine "hashar" Musso (WMF) 2013-05-07 07:38:18 UTC
So it has been fixed somehow.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links