Dear Vít,

In data Tuesday 23 February 2016 06:21:21, Vít Tuček ha scritto:
> I've just installed Invenio 1.2.1 onto Ubuntu 14.04 and I can't login any
> users due to a server error. There seems to be one precedent:
> https://www.mail-archive.com/project-invenio-general@cern.ch/msg01065.html

Looks like there is some bug in the Redis+Nydus stack in your installation. 
From the backtrace:
[...]
Frame setex in /usr/local/lib/python2.7/dist-packages/redis/client.py at line 
1093
-------------------------------------------------------------------------------
      1090         """
      1091         if isinstance(time, datetime.timedelta):
      1092             time = time.seconds + time.days * 24 * 3600
----> 1093         return self.execute_command('SETEX', name, time, value)
      1094 
      1095     def setnx(self, name, value):
      1096         "Set the value of key ``name`` to ``value`` if key doesn't 
exist"
-------------------------------------------------------------------------------
                        self =  
'StrictRedis<ConnectionPool<Connection<host=127.0.0.1,port=6379,db=0>>>'
                        name =  "'session_e395535da927c663a666f14a384bb545'"
                       value =  '172800'
                        time =  '\'\\x80\\x02}q\\x01(U\\x08_http_ipq\\x02NU\
\t_https_ipq\\x03U\\x0c46.135.42.10q\\x04U\\t_accessedq\\x05GA\\xd5\\xb2\\xfb\
\x02\\xa9(xU\\x08_timeoutq\\x06J\\x00\\xa3\\x02\\x00U\\x08_createdq\\x07GA\
\xd5\\xb2\\xfb\\x02\\xa9(tU\\x05_dataq\\x08}q\\t(U\\tuser_infoq\\n}q\\x0b(U\
\x03uidq\\x0cK\\x02U\\x05agentq\\rUmMozilla/5.0 (Windows NT 6.1; WOW64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36q\
\x0eU\\x17precached_viewclaimlinkq\\x0f\\x89U\\x07sessionq\\x10U 
e395535da927c66 [...]
[...]

There one can see that "value" and "time" variables got swapped!

However in the call inside Invenio these were correct:
[...]
Frame save_in_storage in /usr/local/lib/python2.7/dist-packages/invenio/
session.py at line 624
-------------------------------------------------------------------------------
       621     def save_in_storage(self, sid, session_object, timeout, uid):  
# pylint: disable=W0613
       622         return get_redis().setex(self.generate_key(sid),
       623                                  session_object,
---->  624                                  timeout)
       625 
       626 if CFG_WEBSESSION_STORAGE == 'mysql':
       627     InvenioSession = InvenioSessionMySQL
-------------------------------------------------------------------------------
                        self =  "{'user_info': {'uid': 2, 'agent': 'Mozilla/5.0 
(Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
48.0.2564.116 Safari/537.36', 'precached_viewclaimlink': False, 'session': 
'e395535da927c663a666f14a384bb545', 'precached_useadmin': False, 'group': [], 
'guest': '0', 'precached_usepaperattribution': True, 
'precached_usepaperclaim': True, 'precached_viewsubmissions': False, 
'precached_usegroups': True, 'email': 'gor...@mailinator.com', 
'precached_usealerts': True, 'precached_uses [...]
              session_object =  '\'\\x80\\x02}q\\x01(U\\x08_http_ipq\\x02NU\
\t_https_ipq\\x03U\\x0c46.135.42.10q\\x04U\\t_accessedq\\x05GA\\xd5\\xb2\\xfb\
\x02\\xa9(xU\\x08_timeoutq\\x06J\\x00\\xa3\\x02\\x00U\\x08_createdq\\x07GA\
\xd5\\xb2\\xfb\\x02\\xa9(tU\\x05_dataq\\x08}q\\t(U\\tuser_infoq\\n}q\\x0b(U\
\x03uidq\\x0cK\\x02U\\x05agentq\\rUmMozilla/5.0 (Windows NT 6.1; WOW64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36q\
\x0eU\\x17precached_viewclaimlinkq\\x0f\\x89U\\x07sessionq\\x10U 
e395535da927c66 [...]
                         uid =  '2'
                     timeout =  '172800'
                         sid =  "'e395535da927c663a666f14a384bb545'"
[...]

Which version of Redis python and Nydus (and Redis server) you have?

In particular:

$ pip freeze  | grep  -E "redis|nydus"

Cheers,
        Samuele

-- 
Samuele Kaplun
INSPIRE Service Manager ** <http://inspirehep.net/>

Reply via email to