I installed redis on an independent database server (ec2 instance). And it was installed and configured properly. Now all I want to do is my web server, I connect to it and make changes to its store of key values.
I have a python / django application running on heroku and I use PostgreSQL for everything else, I use redis only to store some temporary variable in KV sets.
Now I am installing https://github.com/andymccurdy/redis-py on my local server and web server.
To test the connection and see if it works well, I try the following in my environment:
>>> pool = redis.ConnectionPool(host='MY_DBSERVER_IP_ADDRESS', port=6379, db=0) >>> r = redis.Redis(connection_pool=pool) >>> r.set('foo', 'bar')
this gives me an error - ConnectionError: Error 111 connecting 54.235.xxx.xxx:6379. Connection refused. ConnectionError: Error 111 connecting 54.235.xxx.xxx:6379. Connection refused.
How to connect? What am I missing?
source share