Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#4229 closed defect (worksforme)

SMTP error causes stack trace dump

Reported by: inkie78@… 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 Christian Boos)

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 Christian Boos, 17 years ago

Description: modified (diff)
Milestone: 0.11
  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.

comment:2 by Emmanuel Blot, 17 years ago

Keywords: notification added
Owner: changed from Jonas Borgström to Emmanuel Blot
Priority: highnormal
Severity: majornormal
Status: newassigned
Summary: Opps ErrorSMTP error causes stack trace dump

The specified Trac version is inconsistent with the actual trace: at best, the trace comes from 0.9.x series. inkie78, can you update the version field with your actual Trac release? TIA.

I'm not sure whether this issue still exists in 0.10, I will cross check

comment:3 by Emmanuel Blot, 17 years ago

Milestone: 0.11
Resolution: worksforme
Status: assignedclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Emmanuel Blot.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Emmanuel Blot to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.