解决redis.exceptions.AuthenticationError: Client sent AUTH, but no password is set

Traceback (most recent call last):
  File "C:\Users\mypc\Desktop\proxy_pool\proxy_pool-master\db\redisClient.py", line 144, in test
    self.getCount()
  File "C:\Users\mypc\Desktop\proxy_pool\proxy_pool-master\db\redisClient.py", line 130, in getCount
    proxies = self.getAll(https=False)
  File "C:\Users\mypc\Desktop\proxy_pool\proxy_pool-master\db\redisClient.py", line 112, in getAll
    items = self.__conn.hvals(self.name)
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\client.py", line 3084, in hvals
    return self.execute_command('HVALS', name)
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\client.py", line 898, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\connection.py", line 1379, in get_connection
    connection.connect()
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\connection.py", line 567, in connect
    self.on_connect()
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\connection.py", line 643, in on_connect
    auth_response = self.read_response()
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\connection.py", line 739, in read_response
    response = self._parser.read_response()
  File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\redis\connection.py", line 340, in read_response
    raise error
redis.exceptions.AuthenticationError: Client sent AUTH, but no password is set
2021-06-09 16:06:08,143 launcher.py[line:39] INFO exit!
 

1.重启redis

关闭:redis-cli shutdown 或者 kill redis进程的pid

2.重启

redis-server.exe redis.windows.conf

3.auth myPassword

4.PING

已解决

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值