Error 111 connecting to localhost:6379. Connection refused. Django Heroku
May be not directly related to your question but I was facing same error and it turn out that on my system redis-server package was not installed.
Problem was resolved with,
Ubuntu: sudo apt-get install redis-server
Cent OS: sudo yum install redis
The solution is sudo apt-get install redis-server
.
Don't forget to start your service by sudo service redis-server start
and you can use the command sudo service redis-server {start|stop|restart|force-reload|status}
for reference
Turns out I needed to set up things like this for it to work on Heroku.
redis_url = os.getenv('REDISTOGO_URL')
urlparse.uses_netloc.append('redis')
url = urlparse.urlparse(redis_url)
conn = Redis(host=url.hostname, port=url.port, db=0, password=url.password)