Page MenuHomePhabricator

CopyPatrol has stopped
Closed, ResolvedPublic

Description

The CopyPatrol bot has stopped, as there's been no new reports for about 16 hours. MusikAnimal is investigating log-in issues.

Event Timeline

Diannaa created this task.Jun 26 2020, 6:39 PM
Restricted Application added a project: Community-Tech. · View Herald TranscriptJun 26 2020, 8:14 PM
MusikAnimal added a comment.EditedJun 26 2020, 8:19 PM

Backtrace (password is NOT shown):

Password for user EranBot on wikipedia:en (no characters will be shown): WARNING: /usr/lib/python2.7/getpass.py:83: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)

Warning: Password input may be echoed.
Traceback (most recent call last):
  File "/data/project/eranbot/gitPlagiabot/plagiabot/plagiabot.py", line 854, in <module>
    main()
  File "/data/project/eranbot/gitPlagiabot/plagiabot/plagiabot.py", line 842, in main
    report_log.page_triage = page_triage
  File "/mnt/nfs/labstore-secondary-tools-project/eranbot/gitPlagiabot/plagiabot/report_logger.py", line 52, in page_triage
    if val and not self.site.has_group('copyviobot'):
  File "/data/project/eranbot/pywikibot/core/pywikibot/site.py", line 2309, in has_group
    self.login(sysop)
  File "/data/project/eranbot/pywikibot/core/pywikibot/site.py", line 2099, in login
    if login_manager.login(retry=True, autocreate=autocreate):
  File "/data/project/eranbot/pywikibot/core/pywikibot/login.py", line 307, in login
    password=True)
  File "/data/project/eranbot/pywikibot/core/pywikibot/bot.py", line 468, in input
    data = ui.input(question, password=password, default=default, force=force)
  File "/data/project/eranbot/pywikibot/core/pywikibot/userinterfaces/terminal_interface_base.py", line 293, in input
    text = self._input_reraise_cntl_c(password)
  File "/data/project/eranbot/pywikibot/core/pywikibot/userinterfaces/terminal_interface_base.py", line 307, in _input_reraise_cntl_c
    text = getpass.getpass('')
  File "/usr/lib/python2.7/getpass.py", line 83, in unix_getpass
    passwd = fallback_getpass(prompt, stream)
  File "/usr/lib/python2.7/getpass.py", line 118, in fallback_getpass
    return _raw_input(prompt, stream)
  File "/usr/lib/python2.7/getpass.py", line 135, in _raw_input
    raise EOFError
EOFError

I don't know what to make of it, but it sounds like an issue with logging in, and the timing matches up with when login sessions were reset yesterday. So my guess is it's related to that. I know some bots keep their sessions alive with cookies, so my thought was to simply delete them. After digging I can't seem to find where that would be, or even the credentials themselves for that matter. We may need @eranroz's help here. (Side note -- I'm currently taking a course on Python, so maybe I'll be of more help in the future :)

JJMC89 added a subscriber: JJMC89.Jun 26 2020, 8:51 PM

Since eranbot is using pywikibot, I would expect the cookies to be in $HOME/.pywikibot/pywikibot.lwp and the password to be in $HOME/.pywikibot/user-config.py (or the config to specify a password file).

Based on the trackback, I don't think deleting the cookies file will help. The credentials aren't where I would expect them.

i reinitialize the credentials - should solve that

JJMC89 closed this task as Resolved.Jun 27 2020, 7:00 AM
JJMC89 assigned this task to eranroz.
JJMC89 removed a subscriber: JJMC89.
Diannaa reopened this task as Open.Jul 1 2020, 4:35 PM

The bot appears to have stopped again; there's been no new reports for about four hours. Thanks.

Proc added a subscriber: Proc.Jul 1 2020, 5:15 PM
Diannaa closed this task as Resolved.Jul 1 2020, 8:56 PM

The tool has been functioning properly for several hours - closing again for now. Thanks.

Diannaa reopened this task as Open.Fri, Jul 10, 11:38 AM

The bot appears to have stopped again; there's been no new reports for about 16 hours. Thanks

Diannaa added a subscriber: L3X1.Fri, Jul 10, 11:39 AM

Same issue -- all sessions were forced to logout recently due to a security issue. I used history to find the command Eran used to reinitialize the credentials, but I need the password to proceed. @eranroz could you create a file with the credentials on Toolforge (and of course run chmod 400 on it :) ?

Appears to be restarted.

Phil

eranroz closed this task as Resolved.Sat, Jul 11, 8:18 AM

restarted the session, should work now.