close

[Solved] Error 111 connecting to localhost:6379. Connection refused. Django Heroku

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Error 111 connecting to localhost:6379. Connection refused. Django Heroku in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Error 111 connecting to localhost:6379. Connection refused. Django Heroku Error Occurs?

Today I get the following error Error 111 connecting to localhost:6379. Connection refused. Django Heroku in python.

How To Solve Error 111 connecting to localhost:6379. Connection refused. Django Heroku Error ?

  1. How To Solve Error 111 connecting to localhost:6379. Connection refused. Django Heroku Error ?

    To Solve Error 111 connecting to localhost:6379. Connection refused. Django Heroku Error 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.

  2. Error 111 connecting to localhost:6379. Connection refused. Django Heroku

    To Solve Error 111 connecting to localhost:6379. Connection refused. Django Heroku Error 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.

Solution 1

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)

Solution 2

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

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read