Opened 15 years ago
Last modified 9 years ago
#4784 new defect
When a user goes away then comes back they are getting this error some times. — at Initial Version
Reported by: | Owned by: | Noah Kantrowitz | |
---|---|---|---|
Priority: | normal | Component: | TracCasPlugin |
Severity: | major | Keywords: | cas |
Cc: | Trac Release: | 0.11 |
Description
When I try to go directly to my trac install and I am logged in to CAS through another application, I am getting the following error. Doesn't happen every time, but haven't detected a pattern yet. Please feel free to ping me with additional questions.
Trac detected an internal error:
IntegrityError: (1062, "Duplicate entry 'aba89c5a0c29a2f81f18e3e4b92627da-192.168.208.103-todd' for key 'PRIMARY'")
This is probably a local installation issue. Found a bug in Trac?
If you think this should work and you can reproduce the problem, you should consider reporting this to the Trac team.
Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.
Trac | 0.11.3 | Python | 2.5.4 (r254:67916, Feb 20 2009, 14:24:45) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] | setuptools | 0.6c9 | MySQL | server: "5.1.30-community-log", client: "5.0.45", thread-safe: 1 | MySQLdb | 1.2.3b1 | Genshi | 0.5.1 | Subversion | 1.5.5 (r34862) | jQuery: | 1.2.6 | ==== Python Traceback ==== Traceback (most recent call last): File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request dispatcher.dispatch(req) File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch resp = chosen_handler.process_request(req) File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 101, in process_request self._do_login(req) File "build/bdist.linux-i686/egg/traccas/traccas.py", line 46, in _do_login super(CasLoginModule, self)._do_login(req) File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 141, in _do_login req.remote_addr, int(time.time()))) File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args) File "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/connections.py", line 35, in defaulterrorhandler raise errorclass(errorvalue) IntegrityError: (1062, "Duplicate entry 'aba89c5a0c29a2f81f18e3e4b92627da-192.168.208.103-todd' for key 'PRIMARY'") a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
|
Python Traceback Most recent call last:
- File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
Code fragment:
- try:
- if not env and env_error:
- raise HTTPInternalError(env_error)
- try:
- dispatcher = RequestDispatcher(env)
- dispatcher.dispatch(req)
- except RequestDone:
- pass
- resp = req._response or []
- except HTTPException, e:
- File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch
Code fragment:
- req.args.get('FORM_TOKEN') != req.form_token:
- raise HTTPBadRequest('Missing or invalid form token. '
- 'Do you have cookies enabled?')
- # Process the request and render the template
- resp = chosen_handler.process_request(req)
- if resp:
- if len(resp) == 2: # Clearsilver
- chrome.populate_hdf(req)
- template, content_type = \
- self._post_process_request(req, *resp)
- File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 101, in process_request
Code fragment:
- def match_request(self, req):
- return re.match('/(login|logout)/?$', req.path_info)
- def process_request(self, req):
- if req.path_info.startswith('/login'):
- self._do_login(req)
- elif req.path_info.startswith('/logout'):
- self._do_logout(req)
- self._redirect_back(req)
- # Internal methods
Local variables: Name Value req <Request "GET u'/login'"> self <traccas.traccas.CasLoginModule object at 0x8d52c2c>
- File "build/bdist.linux-i686/egg/traccas/traccas.py", line 46, in _do_login Local variables: Name Value req <Request "GET u'/login'"> self <traccas.traccas.CasLoginModule object at 0x8d52c2c>
- File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 141, in _do_login
Code fragment:
- cookie = hex_entropy()
- db = self.env.get_db_cnx()
- cursor = db.cursor()
- cursor.execute("INSERT INTO auth_cookie (cookie,name,ipnr,time) "
- "VALUES (%s, %s, %s, %s)", (cookie, remote_user,
- req.remote_addr, int(time.time())))
- db.commit()
- req.authname = remote_user
- req.outcookietrac_auth? = cookie
- req.outcookietrac_auth?path? = req.base_path or '/'
- File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/db/util.py", line 50, in execute
Code fragment:
- def execute(self, sql, args=None):
- # -- In case of SQL errors, uncomment the following 'print' statements
- # print 'execute', repr(sql)
- if args:
- # print repr(args)
- return self.cursor.execute(sql_escape_percent(sql), args)
- return self.cursor.execute(sql)
- def executemany(self, sql, args=None):
- # print 'executemany', repr(sql)
- if args:
- File "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/cursors.py", line 173, in execute Local variables: Name Value ListType <type 'list'> TupleType <type 'tuple'> args ('aba89c5a0c29a2f81f18e3e4b92627da', 'todd', '192.168.208.103', ... charset 'utf8' db <weakproxy at 0x92b0d24 to Connection at 0x937d5ac> exc <class '_mysql_exceptions.IntegrityError'> exc_info <built-in function exc_info> query "INSERT INTO auth_cookie (cookie,name,ipnr,time) VALUES ... self <trac.db.mysql_backend.MySQLUnicodeCursor object at 0x911efec> value IntegrityError(1062, "Duplicate entry ...
- File "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/connections.py", line 35, in defaulterrorhandler Local variables: Name Value error (<class '_mysql_exceptions.IntegrityError'>, IntegrityError(1062, ... errorclass <class '_mysql_exceptions.IntegrityError'> errorvalue IntegrityError(1062, "Duplicate entry ...
File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
dispatcher.dispatch(req)
File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch
resp = chosen_handler.process_request(req)
File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 101, in process_request
self._do_login(req)
File "build/bdist.linux-i686/egg/traccas/traccas.py", line 46, in _do_loginFile "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/auth.py", line 141, in _do_login
req.remote_addr, int(time.time())))
File "/opt/python/python2.5/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/cursors.py", line 173, in executeFile "/opt/python/python2.5/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg/MySQLdb/connections.py", line 35, in defaulterrorhandler
System Information:
User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7 Trac: 0.11.3 Python: 2.5.4 (r254:67916, Feb 20 2009, 14:24:45) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] setuptools: 0.6c9 MySQL: server: "5.1.30-community-log", client: "5.0.45", thread-safe: 1 MySQLdb: 1.2.3b1 Genshi: 0.5.1 Subversion: 1.5.5 (r34862) jQuery: 1.2.6