Opened 19 years ago
Closed 19 years ago
#4229 closed defect (worksforme)
SMTP error causes stack trace dump
| Reported by: | Owned by: | Emmanuel Blot | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.10.2 |
| Severity: | normal | Keywords: | notification |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
This is happening on every ticket placed or any responce to a ticket. Trac detected an internal error: (10061, 'Connection refused')If you think this really should work and you can reproduce it. Then you should consider to report this problem to the Trac team.
Go to http://trac.edgewall.com/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the python traceback found below.
TracGuide — The Trac User and Administration Guide
Python traceback
Traceback (most recent call last):
File "C:\Python23\lib\site-packages\trac\core.py", line 548, in cgi_start
real_cgi_start()
File "C:\Python23\lib\site-packages\trac\core.py", line 543, in real_cgi_start
dispatch_request(path_info, args, req, env)
File "C:\Python23\lib\site-packages\trac\core.py", line 458, in dispatch_request
module.run()
File "C:\Python23\lib\site-packages\trac\Module.py", line 44, in run
self.render()
File "C:\Python23\lib\site-packages\trac\Ticket.py", line 570, in render
self.save_changes (id)
File "C:\Python23\lib\site-packages\trac\Ticket.py", line 490, in save_changes
tn.notify(ticket, newticket=0, modtime=now)
File "C:\Python23\lib\site-packages\trac\Notify.py", line 228, in notify
NotifyEmail.notify(self, ticket['id'], subject)
File "C:\Python23\lib\site-packages\trac\Notify.py", line 131, in notify
Notify.notify(self, resid)
File "C:\Python23\lib\site-packages\trac\Notify.py", line 79, in notify
self.begin_send()
File "C:\Python23\lib\site-packages\trac\Notify.py", line 139, in begin_send
self.server = smtplib.SMTP(self.smtp_server)
File "C:\Python23\lib\smtplib.py", line 240, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python23\lib\smtplib.py", line 302, in connect
raise socket.error, msg
error: (10061, 'Connection refused')
Attachments (0)
Change History (3)
comment:1 by , 19 years ago
| Description: | modified (diff) |
|---|---|
| Milestone: | → 0.11 |
comment:2 by , 19 years ago
| Keywords: | notification added |
|---|---|
| Owner: | changed from to |
| Priority: | high → normal |
| Severity: | major → normal |
| Status: | new → assigned |
| Summary: | Opps Error → SMTP error causes stack trace dump |
comment:3 by , 19 years ago
| Milestone: | 0.11 |
|---|---|
| Resolution: | → worksforme |
| Status: | assigned → closed |
Actually, no error trace is shown on the web interface in 0.10. To inkie78@…: you probably want to upgrade your Trac installation.
Nevertheless, the traceback is sent to the log file/service:
22:29:41 Trac[web_ui] ERROR: Failure sending notification on creation of ticket #3: (61, 'Connection refused')
Traceback (most recent call last):
File "trac-0.10.2/trac/ticket/web_ui.py", line 196, in _do_create
tn.notify(ticket, newticket=True)
File "trac-0.10.2/trac/ticket/notification.py", line 127, in notify
NotifyEmail.notify(self, ticket.id, subject)
File "trac-0.10.2/trac/notification.py", line 216, in notify
Notify.notify(self, resid)
File "trac-0.10.2/trac/notification.py", line 114, in notify
self.begin_send()
File "trac-0.10.2/trac/notification.py", line 278, in begin_send
self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/smtplib.py", line 244, in __init__
(code, msg) = self.connect(host, port)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/smtplib.py", line 306, in connect
raise socket.error, msg
error: (61, 'Connection refused')
I used "localhost" as the SMTP server, and disabled the server on the host to reproduce this issue.



File "C:\Python23\lib\smtplib.py", line 302, in connect raise socket.error, msg error: (10061, 'Connection refused')This is a misconfiguration on your side, see TracNotification for more info.
But I don't think we should have a stacktrace in this case.
We should report the error in a cleaner way, ideally letting the change proceed and only notifying the user that something went wrong in the change hooks.