Modify

Opened 12 years ago

Closed 12 years ago

#10617 closed defect (invalid)

gaierror: [Errno -2] Name or service not known

Reported by: anonymous Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: email notification
Cc: Trac Release: 0.12

Description

How to Reproduce

While doing a POST operation on /register, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'd32eaf122e7d05bdd564f9d9',
 'action': u'create',
 'email': u'camel_flying@163.com',
 'name': u'cad',
 'password': u'afa',
 'password_confirm': u'afa',
 'username': u'afaa'}

User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

System Information

Trac 0.12.2
Babel 0.9.6
Docutils 0.7
Genshi 0.6
mod_python 3.3.1
psycopg2 2.4.2
Pygments 1.4
Python 2.7.2+ (default, Jul 20 2012, 22:32:25)
[GCC 4.6.1]
pytz 2010b
RPC 1.1.2-r12168
setuptools 0.6
Subversion 1.6.12 (r955767)
jQuery 1.4.2

Enabled Plugins

TracAccountManager 0.3.2
TracPyDotOrgTheme 2.0
TracReportManager 0.1
TracThemeEngine 2.0.1
TracTicketTemplate 0.7
TracTocMacro 11.0.0.3
TracWikiPrintPlugin 1.9.2
TracXMLRPC 1.1.2-r12168

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/web_ui.py", line 456, in process_request
    _create_user(req, self.env)
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/web_ui.py", line 148, in _create_user
    acctmgr.set_password(username, password)
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/api.py", line 295, in set_password
    self._notify('created', user, password)
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/api.py", line 458, in _notify
    getattr(l, func)(*args)
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/notification.py", line 39, in user_created
    notifier.notify(username, 'New user registration')
  File "/usr/local/lib/python2.7/dist-packages/TracAccountManager-0.3.2-py2.7.egg/acct_mgr/notification.py", line 89, in notify
    NotifyEmail.notify(self, username, subject)
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/notification.py", line 324, in notify
    Notify.notify(self, resid)
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/notification.py", line 226, in notify
    self.send(torcpts, ccrcpts)
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/notification.py", line 469, in send
    msg.as_string())
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/notification.py", line 119, in send_email
    self.email_sender.send(from_addr, recipients, message)
  File "/usr/local/lib/python2.7/dist-packages/Trac-0.12.2-py2.7.egg/trac/notification.py", line 150, in send
    server = smtplib.SMTP(self.smtp_server, self.smtp_port)
  File "/usr/lib/python2.7/smtplib.py", line 249, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 309, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python2.7/smtplib.py", line 284, in _get_socket
    return socket.create_connection((port, host), timeout)
  File "/usr/lib/python2.7/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by Ryan J Ollos

Cc: anonymous added; Steffen Hoffmann removed
Component: SELECT A HACKAccountManagerPlugin
Owner: changed from anonymous to Steffen Hoffmann

comment:2 Changed 12 years ago by Steffen Hoffmann

Keywords: email notification added
Resolution: invalid
Status: newclosed

While the trace-back springs from a call of AcctMgr during a new-user-registration action, it runs fine through TracNotification. The failure is in the sender socket inititialization for the configured SMTP client. socket.py doesn't work, obviously for the getaddrinfo doesn't yield a valid connection, right? So this is most likely a local installation/configuration issue, and the OP needs to fix the email setup in [notification] rather than hoping that this is a plugin issue.

As a side-note, please don't let us without

  • some human-written not about the issue and how to reproduce
  • a valid email address, since anonymous bug reports tend to not work for plugin maintainers - they have a hard time to reach back to the reporter, if they get any additional feedback on the subject at all

so all-in-all this is a negative example, how you shouldn't throw your issues back at developers, respectfully.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.