Opened 5 months ago

Closed 5 months ago

#32906 closed defect (fixed)

GetTor email responder not working

Reported by: cohosh Owned by:
Priority: Very High Milestone:
Component: Applications/GetTor Version:
Severity: Normal Keywords:
Cc: traumschule, hiro, gaba, phw, cohosh Actual Points:
Parent ID: Points:
Reviewer: cohosh Sponsor:

Description

I'm getting a response that reports an error in the process_email script:

This is the mail system at host gettor-01.torproject.org.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<gettor@gettor-01.torproject.org>: Command died with status 1: "python3
    /srv/gettor.torproject.org/home/gettor/scripts/process_email". Command
    output: Traceback (most recent call last):   File
    "/srv/gettor.torproject.org/home/gettor/scripts/process_email", line 52, in
    <module>     settings = options.parse_settings() TypeError:
    parse_settings() missing 2 required positional arguments: 'locale' and
    'config'

Child Tickets

Attachments (1)

0001-Update-call-to-parse_settings-in-process_email.patch (1.3 KB) - added by cohosh 5 months ago.

Download all attachments as: .zip

Change History (12)

comment:2 Changed 5 months ago by cohosh

In trying the attached fix, locally I then got the following logged errors:

2020-01-09T02:04:13+0000 [-] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 460, in callback
            self._startRunCallbacks(result)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
            self._runCallbacks()
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
            _inlineCallbacks(r, g, status)
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
            result = g.send(result)
          File "/srv/gettor.torproject.org/home/gettor/gettor/services/email/sendmail.py", line 200, in get_new
            link_msg = "{}\n{}".format(link_msg, link_str)
          File "/srv/gettor.torproject.org/home/gettor/gettor/utils/strings.py", line 124, in translated
            return strings[k]
        builtins.KeyError: 'links_body'

comment:3 Changed 5 months ago by cohosh

I suspect this is from the same commit, since we split up the 'links_body' string into multiple parts, for now I've just rolled back gettor to commit d3ac24f6af2f2bfffe66abade0376f801ac2e240.

I think the email responder has died though and we need to get it started again somehow.

comment:4 Changed 5 months ago by cohosh

Okay I restarted the gettor service and it's responding to emails again

comment:6 Changed 5 months ago by cohosh

There's another call to parse_settings in the process_email script. See the attached patch. After applying that patch locally to the gettor deployment, I was still getting the errors in comment:2

comment:7 Changed 5 months ago by hiro

Hi, I have updated the PR with some tests cases to avoid having such issues in the future.

https://dip.torproject.org/hiro/gettor/merge_requests/5

I have still to test it locally though, so consider this a WIP still.

comment:8 Changed 5 months ago by hiro

Hi,
I have noticed gettor was producing the same error tonight. Maybe some code snippet was merged that it wasn't supposed to be merged.
So I have applied the patch from my pull request and restarted the service. It's ok now.
The email produced though has a small glitch:

You requested Tor Browser for windows.

You will need only one of the links below to download the bundle. If a link does not work for you, try the next one.

None
Tor Browser 9.0.3 for windows-en-US-64 (gitlab): https://gitlab.com/thetorproject/gettorbrowser/raw/torbrowser-releases/torbrowser-install-9.0.3_en-US.exe
Signature file: https://gitlab.com/thetorproject/gettorbrowser/raw/torbrowser-releases/torbrowser-install-9.0.3_en-US.exe.asc

Tor Browser 9.0.3 for windows-en-US-64 (github): https://github.com/TheTorProject/gettorbrowser/releases/download/torbrowser-release/torbrowser-install-9.0.3_en-US.exe
Signature file: https://github.com/TheTorProject/gettorbrowser/releases/download/torbrowser-release/torbrowser-install-9.0.3_en-US.exe.asc


Should you have issues with any of the links above you can access the following archives:

Download the file: {}

- Google Drive folder: https://drive.google.com/open?id=13CADQTsCwrGsIID09YQbNz2DfRMUoxUU

Download the file: torbrowser-install-9.0.3_en-US.exe


--
GetTor

The string "Download the file: {}" is repeated twice and once the file name isn't printed. I should fix that in the same PR and then I think we can merge it.

Let's talk more on monday.

comment:9 Changed 5 months ago by cohosh

Reviewer: cohosh
Status: newneeds_review

comment:10 Changed 5 months ago by cohosh

It looks like we've lost the Internet Archive download.

comment:11 Changed 5 months ago by cohosh

Resolution: fixed
Status: needs_reviewclosed

Closing, hiro's changes were merged at 55b2cc2c86: https://gitweb.torproject.org/gettor.git/commit/?id=55b2cc2c8699304202423b9e54e3a8aa59846259

The email responder is now working again and the Internet Archive links are back.

Note: See TracTickets for help on using tickets.