Answer the question
In order to leave comments, you need to log in
Websocket(redis) don't want to work connectionRefusedError: [Errno 111] onnect call failed ('134.0.113.144', 6379)?
I'm testing the project on the server. I want to check the work of channels 2. But there are errors in the radish
ConnectionRefusedError: [Errno 111] Connect call failed ('134.0.113.144', 6379)
134.0.113.144 it catches my vps
ALLOWED_HOSTS = ['имя хоста']
REDIS_HOST = 'имя хоста'
REDIS_PORT = 6379
REDIS_DB = 0
INSTALLED_APPS = [
'channels',
'rest_framework',
]
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
"hosts": [('имя хоста', 6379)],
},
},
}
Answer the question
In order to leave comments, you need to log in
Django and Redis have nothing to do with it. You need to make sure that the host where the django project is running can connect to the host where Redis is running.
According to the "bonus", everything works for me only if I put in the debug
STATIC_ROOT = ''
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = 'static/'
STATIC_URL = '/static/'
STATIC_BASE = os.path.join(BASE_DIR, 'static/')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question