django - talking to a remote redis server using redis-py (python wrapper over redis) -


i have installed redis on independent database server(ec2 instance). , has been installed , configured properly. want webserver, connect it, , make changes key value store.

i have python/django application running on heroku, , using postgresql else, using redis store temporary variable in kv sets.

now, install https://github.com/andymccurdy/redis-py on localserver, , webserver.

to test connection , check if things working well, try following in 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 error - connectionerror: error 111 connecting 54.235.xxx.xxx:6379. connection refused.

how connect? missing?

by default config set bind 127.0.0.1 need find config (/etc/redis/redis.conf on ubuntu) , comment out bind 127.0.0.1 line.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -