Django development server showing Error 61 Connection Refused with Redis

MiniGunnR

I am trying to follow the tutorial on read the docs for Django Channels. In the settings.py file I am trying to change the inmemory BACKEND to the redis backend with the following code:

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "asgi_redis.RedisChannelLayer",
        "CONFIG": {
            "hosts": [("localhost", 6379)],
        },
        "ROUTING": "chan.routing.channel_routing",
    },
}

However, the moment I do this, the console which is running the runserver command shows the following error:

ConnectionError: Error 61 connecting to localhost:6379. Connection refused.

How can I fix this?

MicroPyramid

Please make sure if redis is installed on your system and it is running. To check if redis is running use

 redis-cli

then it will take you to redis console, then if you type ping it will return PONG if redis is running or not.

If you don't have redis in your system, please visit Redis Quick Start.

For Mac OS X: Go to terminal and type brew install redis.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Django allauth example [Errno 61] Connection refused

Docker Redis Django connection refused

Django connection mysql error, showing the target computer actively refused

Redis+Docker+Django - Error 111 Connection Refused

selenium:socket.error: [Errno 61] Connection refused

Sendmail Errno[61] Connection Refused

Vapor Connection refused (errno 61)

Error 111 connection refused (Python, celery, redis)

docker-compose + django + redis - Error 111 connecting to 127.0.0.1:6379. Connection refused

Socket error:- Target machine refused connection to server

Heroku Django: Operational Error Connection refused

Selenium - urllib.error.URLError: <urlopen error [Errno 61] Connection refused>

Redis Docker connection refused

Docker Redis Connection refused

Cannot connect to mongodb errno:61 Connection refused

React native NSPOSIXErrorDomain Code=61 "Connection refused"

Email cannot be sent in Python.[Errno 61] Connection refused error happens

After connecting to remote database, migrating gives error: Errno61, Connection Refused

Looping through driver.get() giving ConnectionRefusedError: [Errno 61] Connection refused error

Error occured with redis HMSEET, dial tcp :6379: connect: connection refused

Connection Refused error when connecting to Kubernetes Redis Service

error while executing datadog-agent info command : instance #0 [ERROR]: 'Failed connection [Errno 61] Connection refused'

sbt throws [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/

django redis with django showing ulimit error

Putty fatal error: Network error: connection refused (ubunty server)

Websocket server connection refused

Netcat Server Connection Refused

Connection refused by Domino Server

Prometheus - Django : connection refused

TOP Ranking

HotTag

Archive