from gluon.contrib.redis_utils import RConn
from gluon.contrib.redis_cache import RedisCache
from gluon.contrib.redis_session import RedisSession
rconn = RConn('localhost', 6379)
cache.redis = RedisCache(redis_conn = rconn, debug = True)
sessiondb = RedisSession(redis_conn = rconn, session_expiry = False)
session.connect(request, response, db = sessiondb)
Traceback (most recent call last):
File "/Users/sugizo/web2py/gluon/main.py", line 461, in wsgibase
session._try_store_in_db(request, response)
File "/Users/sugizo/web2py/gluon/globals.py", line 1224, in _try_store_in_db
record_id = table.insert(**dd)
File "/Users/sugizo/web2py/gluon/contrib/redis_session.py", line 137, in insert
newid = str(self.db.r_server.incr(self.serial))
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/client.py", line 1011, in incr
return self.execute_command('INCRBY', name, amount)
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/client.py", line 667, in execute_command
connection.send_command(*args)
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 493, in connect
self.on_connect()
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 567, in on_connect
if nativestr(self.read_response()) != 'OK':
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 629, in read_response
raise response
ResponseError: invalid DB index
requirepass password
rconn = RConn('localhost', 6379, 'password')
#sessiondb = RedisSession(redis_conn = rconn, session_expiry = False)
#session.connect(request, response, db = sessiondb)
Traceback (most recent call last):
File "/Users/sugizo/web2py/gluon/main.py", line 461, in wsgibase
session._try_store_in_db(request, response)
File "/Users/sugizo/web2py/gluon/globals.py", line 1224, in _try_store_in_db
record_id = table.insert(**dd)
File "/Users/sugizo/web2py/gluon/contrib/redis_session.py", line 137, in insert
newid = str(self.db.r_server.incr(self.serial))
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/client.py", line 1011, in incr
return self.execute_command('INCRBY', name, amount)
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/client.py", line 667, in execute_command
connection.send_command(*args)
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 585, in send_packed_command
self.connect()
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 493, in connect
self.on_connect()
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 567, in on_connect
if nativestr(self.read_response()) != 'OK':
File "/Users/MacBookPro/miniconda3/envs/python2_prod/lib/python2.7/site-packages/redis/connection.py", line 629, in read_response
raise response
ResponseError: NOAUTH Authentication required.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is in your issue web2py the only moving part?? Nothing change on OS and Redis side??
As it mention in the final trace back above there seems to need a password to be setup in your redis connection string... Perhap you forgot that you set one or there is a default one defined in you Linux box or in the new version of Redis????
requirepass password
rconn = RConn('localhost', 6379, 'password')
$ ./src/redis-cli -h localhost -p 6379 -a password
Warning: Using a password with '-a' option on the command line interface may not be safe.
localhost:6379> ping
PONG
localhost:6379>
$ ./src/redis-cli -a password monitor
Warning: Using a password with '-a' option on the command line interface may not be safe.
OK
1530331699.614717 [0 127.0.0.1:53577] "AUTH" "password"
1530331699.615113 [0 127.0.0.1:53577] "COMMAND"
1530331707.001400 [0 127.0.0.1:53577] "ping"
curl -L -O -C - http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
sed -i '' 's/# requirepass foobared/requirepass password/g' redis-stable/redis.conf
mv redis-stable/ redis
cd redis
make
./src/redis-server ./redis.conf