Discussion:
[Buildbot-commits] [Buildbot] #1786: master fails to send mail with TLS on windows
Buildbot
2011-01-31 19:55:59 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+-----------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Keywords: windows
----------------------+-----------------------
- buildbot 0.8.3p1 on windows server 2008
- mail sending fails, errors in twistd.log.
- this worked fine on ubuntu with buidbot 0.8.3, twisted 10.2.0.
- mail server spec has not changed (it's via gmail)
- master.cfg has not changed.
- I'm wondering if it is something to do with line ending parsing? because
the STARTTLS is advertised by gmail,
but twistd is not picking itup.

twistd.log on master:

{{{

2011-01-31 11:08:14-0800 [-] releaseLocks(<BuildSlave 'builder', current
builder
s: DAVeOrders-continuous,trunk-continuous,rc34-continuous>): []
2011-01-31 11:08:14-0800 [ESMTPSender,client] Unhandled error in Deferred:
2011-01-31 11:08:14-0800 [ESMTPSender,client] Unhandled Error
Traceback (most recent call last):
Failure: twisted.mail.smtp.TLSRequiredError: 502 Server does not
support
secure communication via TLS / SSL
<<< 220 mx.google.com ESMTP g27sm3135774yhc.8
EHLO JIRA.???
<<< 250-mx.google.com at your service, [206.80.15.66]
<<< 250-SIZE 35651584
<<< 250-8BITMIME
<<< 250-STARTTLS
<<< 250 ENHANCEDSTATUSCODES


2011-01-31 11:08:14-0800 [ESMTPSender,client] Unhandled error in Deferred:
2011-01-31 11:08:14-0800 [ESMTPSender,client] Unhandled Error
Traceback (most recent call last):
Failure: twisted.mail.smtp.TLSRequiredError: 502 Server does not
support
secure communication via TLS / SSL
<<< 250-SIZE 35651584
<<< 250-8BITMIME
<<< 250-STARTTLS
<<< 250 ENHANCEDSTATUSCODES


2011-01-31 11:08:14-0800 [ESMTPSender,client] Stopping factory
<twisted.mail.smt
p.ESMTPSenderFactory instance at 0x045B5C38>
2011-01-31 11:08:14-0800 [ESMTPSender,client] Stopping factory
<twisted.mail.smt
p.ESMTPSenderFactory instance at 0x03DE0918>
2011-01-31 11:08:59-0800 [-] SVNPoller polling I???
}}}

master.cfg:

{{{

c['status'].append(mail.MailNotifier(fromaddr="buildbot@???.com",
useTls=True,
relayhost="smtp.gmail.com",
smtpPort=587,
smtpUser="XXX",
smtpPassword="XXXX",

sendToInterestedUsers=False,
extraRecipients=["plm@???.com",
"lee@???.com", "maria@???.com"],

))


c['status'].append(mail.MailNotifier(fromaddr="buildbot@???.com",
useTls=True,
relayhost="smtp.gmail.com",
smtpPort=587,
smtpUser="XXX",
smtpPassword="XXXXX",

sendToInterestedUsers=True,
extraRecipients=["plm@???.com"],
builders=["DAVeOrders-continuous"]
))



}}}


and gmail itself supports tls:
{{{
pro:~ philippe$ telnet smtp.gmail.com 587
Trying 74.125.53.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP v19sm28705867wfh.12
ehlo host giggity.com
250-mx.google.com at your service, [154.5.47.18]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
STARTTLS
220 2.0.0 Ready to start TLS
Connection closed by foreign host.
pro:~ philippe$
}}}
--
Ticket URL: <http://trac.buildbot.net/ticket/1786>
Buildbot <http://buildbot.net/
Buildbot
2011-01-31 19:57:44 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by philippem):

might be some codesmell:

http://twistedmatrix.com/trac/ticket/4796
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
Buildbot
2011-02-02 03:25:56 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by dustin):

That particular ticket looks unrelated, but at any rate I think this is a
problem within Twisted. I assume you're using 10.2.0 on Windows?
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test
Buildbot
2011-02-02 03:42:22 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by philippem):

yes 10.2.0 on xp
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automat
Buildbot
2011-02-02 03:43:05 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by philippem):

sorry, 10.2.0 on windows server 2008 r2
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:4>
Buildbot <http://buildbot.net/>
Build
Buildbot
2011-02-02 04:34:56 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by dustin):

From a brief look at the code, I bet you're exactly right about the line
endings. It uses {{{.splitlines}}} to split the response into distinct
lines, and I bet that expects native line endings.

Can you make a small test program to test this out, and file a Twisted bug
if it doesn't work?
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:5>
Buildbo
Buildbot
2011-02-05 05:34:50 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution:
Keywords: windows |
----------------------+------------------------

Comment (by philippem):

Turns out the failure is due to Twisted not being able to import ssl,
which depends on PyOpenSSL, which is not on the machine. not sure why,
perhaps it's not there in windows by default.

I will install the pyopenssl egg and see what happens.
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test au
Buildbot
2011-02-05 05:51:34 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: closed
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution: invalid
Keywords: windows |
----------------------+------------------------
Changes (by philippem):

* status: new => closed
* resolution: => invalid


Comment:

yes this is due to the missing pre-requisite pyOpenSSL. I installed via
egg and it works. Yay!
thanks
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:7>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
Buildbot
2011-02-05 05:52:15 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: closed
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution: invalid
Keywords: windows |
----------------------+------------------------

Comment (by philippem):

(we were probably both looking at the twisted code and assuming that
self.context was True, but in fact it was None.)
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:8>
Buildbot <http://buildbot.net/>
Buildbot: build/test automa
Buildbot
2011-02-08 07:10:23 UTC
Permalink
#1786: master fails to send mail with TLS on windows
----------------------+------------------------
Reporter: philippem | Owner:
Type: defect | Status: closed
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Resolution: invalid
Keywords: windows |
----------------------+------------------------

Comment (by Dustin J. Mitchell):

Add docs regarding TLSRequiredError

Refs #1786
Changeset: a924f9db43ab2fa92cc9f3f4f577fd50d61c48da
--
Ticket URL: <http://trac.buildbot.net/ticket/1786#comment:9>
Buildbo
Loading...