I am trying to run the multichat project from django channels-examples on a server. It works locally on a windows machine but when I put this on the linux server and start it with runserver it does not:
./manage.py runserver
Then when I call up the website, it is shown correctly but as soon as the JS sends it websocket request I always get this reponse:
[2016/08/02 14:35:48] HTTP GET /chat/stream/ 404 [0.04, 127.0.0.1:40186]
....(many lines of this)
So the websocket request is handled as an http request. The response should be this:
[2016/08/02 16:34:45] WebSocket CONNECT /chat/stream/ [127.0.0.1:60250]
I have no clue where this is going wrong. The routing of http versus websocket seems to be done somewhere deep inside daphne/twisted/...
My channel settings are (if that is of any help at all):
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [(redis_host, 62031)],
},
"ROUTING": "multichat.routing.channel_routing",
},
}
Twisted version is 16.2.0.
Any help or hint in what direction to look is very appreciated.