Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 10:09 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Jun 10, 2014 12:08 am 
Offline

Joined: Wed Jun 04, 2014 3:29 am
Posts: 7
I am having occasional (hard to reproduce) errors with the YubiX software stack, where the radtest reply message is ""<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>500 Internal Server Error</title>\n</head><body>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error or\nmisconfiguration and was unable to complete\nyour request""

I searched the forum and found a similar error but not for the reasons I think are happening. In my case simply restarting the freeRADIUS server fixes the issue.

After lots of debugging, it appears that the problem is related to the /usr/share/pyshared/yubiauth/client/rest.py attempting to access the database. the only real clue is the following errors in the Apache log:

[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] mod_wsgi (pid=5449): Exception occurred processing WSGI script '/usr/share/pyshared/yubiauth/client/rest.py'.
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] Traceback (most recent call last):
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] resp = self.call_func(req, *args, **self.kwargs)
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] return self.func(req, *args, **kwargs)
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/share/pyshared/yubiauth/client/rest.py", line 66, in ClientMiddleware
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] response = request.get_response(app)
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/yubiauth/util/controller.py", line 52, in __exit__
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self.commit()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/yubiauth/util/controller.py", line 63, in commit
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self.session.commit()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 645, in commit
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self.transaction.commit()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 317, in commit
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] t[1].commit()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1977, in commit
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self._do_commit()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2007, in _do_commit
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self.connection._commit_impl()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1233, in _commit_impl
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] self.engine.dialect.do_commit(self.connection)
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1012, in connection
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] return self._revalidate_connection()
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1018, in _revalidate_connection
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] "Can't reconnect until invalid "
[Thu Jun 05 13:56:08 2014] [error] [client 127.0.0.1] InvalidRequestError: Can't reconnect until invalid transaction is rolled back

i am not quite sure if this is part of the symptoms or the cause, and with all the calls in and out of perl/freeradius/python i am not sure where this error is turning into the 'internal server error' message. one thing for sure is that debugging this tangled stuff is beyond me.

Anybody else seen these issues?

thanks.
jd505


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Wed Jun 18, 2014 2:32 pm 
Offline

Joined: Thu May 01, 2014 7:31 pm
Posts: 6
I'm also seeing this. It seems random and most of the time it goes away on its own, just trying authentication again succeeds.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 23, 2014 2:59 pm 
Offline

Joined: Thu May 01, 2014 7:31 pm
Posts: 6
This was apparently fixed in a recent update from yubico. Works great now, no more 500 errors.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 23, 2014 3:21 pm 
Offline
Site Admin
Site Admin

Joined: Mon Mar 02, 2009 9:51 pm
Posts: 83
Sorry I missed posting about the fix here! Thanks for the update letting us know it now works for you.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 26, 2014 8:09 pm 
Offline

Joined: Wed Jun 04, 2014 3:29 am
Posts: 7
thanks for the information. i will update my systems and test it, and then post back here afterwards.

r.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group