django-rq 使用 django_redis, redis.conf 未设置 password , 突然报 NOAUTH Authentication required.
settings :
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/0",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
redis.conf, requirepass 行 未打开注释
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
#requirepass foobared
django-rq exception
2017-01-13 02:50:13,312 DEBG 'rqworker_high' stderr output:
output = self.handle(*args, **options)
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/django_rq/management/commands/rqworker.py", line 76, in handle
w.work(burst=options.get('burst', False))
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/rq/worker.py", line 340, in work
self.register_birth()
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/rq/worker.py", line 206, in register_birth
if self.connection.exists(self.key) and \
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/redis/client.py", line 838, in exists
2017-01-13 02:50:13,312 DEBG 'rqworker_high' stderr output:
return self.execute_command('EXISTS', name)
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/redis/client.py", line 565, in execute_command
return self.parse_response(connection, command_name, **options)
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/redis/client.py", line 577, in parse_response
2017-01-13 02:50:13,312 DEBG 'rqworker_high' stderr output:
response = connection.read_response()
File "/home/ec2-user/Envs/dev/local/lib/python2.7/site-packages/redis/connection.py", line 574, in read_response
raise response
2017-01-13 02:50:13,313 DEBG 'rqworker_high' stderr output:
redis.exceptions.ResponseError: NOAUTH Authentication required.
1
xiaodiyu 2017-01-14 00:38:40 +08:00
Try restarting redis server without the redis.conf file.
|