redis error: Error 10061 connecting to xx.xx.xx.xxx:6379

created at 07-22-2021 views: 9

When setting up redis external services, use another service to access redis, prompting an error message:

Error 10061 connecting to 192.168.3.99:6379

background

  1. Modify the redis.conf file
  2. Use another server to connect to redis
import redis

con = redis.Redis(host='192.168.3.212', port=9001)

con.set('aa', 'aa')

if __name__ == '__main__':
    print con.get('aa')

error

Error 10061 connecting to 192.168.3.99:6379

Solution

Restart redis, because the redis.conf file is modified, but redis is not restarted, and the configuration information is not modified.

created at:07-22-2021
edited at: 07-22-2021: