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.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.