Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4981 closed defect (worksforme)

Occasional urlopen error upon login after authenticating to CAS

Reported by: toddplank@… Owned by: Noah Kantrowitz
Priority: normal Component: TracCasPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


Occasionally during login I receive an error after authenticating to CAS. When I first connect to Trac as a guest, the site works normally. Then after clicking login, I authenticate to CAS, and when I'm returned to Trac, I receive the error below. When one user receives the error, everyone trying to login at that time also receives the error. After a short period (15-20 min) the error stops appearing and I can login normally.

After authenticating to CAS, I arrive on the following URI:

The error I receive is:

Traceback (most recent call last):
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 367, in send_error
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 688, in render_template
    data = self.populate_data(req, data)
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 596, in populate_data
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 194, in __getattr__
    value = self.callbacks[name](self)
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 464, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "D:\applications\python25\lib\site-packages\trac-\trac\ticket\", line 162, in get_navigation_items
    if 'TICKET_CREATE' in req.perm:
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 194, in __getattr__
    value = self.callbacks[name](self)
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 261, in _get_perm
    return PermissionCache(self.env, self.authenticate(req))
  File "D:\applications\python25\lib\site-packages\trac-\trac\web\", line 132, in authenticate
    authname = authenticator.authenticate(req)
  File "d:\clients\trac\plugins\traccas-1.0-py2.5.egg\traccas\", line 34, in authenticate
    valid, user = self.cas.validate_ticket(req.abs_href.login(), ticket)
  File "d:\clients\trac\plugins\traccas-1.0-py2.5.egg\traccas\", line 41, in validate_ticket
    f = urllib2.urlopen(self.validate_url(service, ticket))
  File "D:\applications\python25\lib\", line 124, in urlopen
    return, data)
  File "D:\applications\python25\lib\", line 381, in open
    response = self._open(req, data)
  File "D:\applications\python25\lib\", line 399, in _open
    '_open', req)
  File "D:\applications\python25\lib\", line 360, in _call_chain
    result = func(*args)
  File "D:\applications\python25\lib\", line 1115, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "D:\applications\python25\lib\", line 1082, in do_open
    raise URLError(err)
URLError: <urlopen error (11001, 'getaddrinfo failed')>

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by Noah Kantrowitz

Check the DNS settings on the Trac server, sounds like it periodically can't resolve the hostname of the CAS server to verify the ticket.

comment:2 Changed 9 years ago by anonymous

Resolution: worksforme
Status: newclosed

Bingo. That was it. Thank you for that idea.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.