Channels & WebSocket - failed: Error during WebSocket handshake: Unexpected response code: 403

1,014 views
Skip to first unread message

stunaz

unread,
Mar 11, 2019, 8:48:13 PM3/11/19
to Django users
Hi,
my set works well in dev, but failed in production

Here is my logs on my server, any advises?


2019-03-11 20:33:22,819 DEBUG    Parsing Redis URI 'redis://localhost:6379'
2019-03-11 20:33:22,819 DEBUG    Creating tcp connection to ('localhost', 6379)
2019-03-11 20:33:22,829 DEBUG    WebSocket closed for ['127.0.0.1', 49358]
2019-03-11 20:33:27,915 DEBUG    Upgraded connection ['127.0.0.1', 49364] to WebSocket
2019-03-11 20:33:27,917 INFO     failing WebSocket opening handshake ('Access denied')
2019-03-11 20:33:27,918 WARNING  dropping connection to peer tcp4:127.0.0.1:49364 with abort=False: Access denied
2019-03-11 20:33:27,919 DEBUG    WebSocket ['127.0.0.1', 49364] rejected by application

Sam Taiwo

unread,
Mar 11, 2019, 10:39:17 PM3/11/19
to django...@googlegroups.com
I'm not sure, but it looks like you are trying to connect to a localhost which is fine locally but not in production. You probably need to change your frontend code to route properly. This is all speculation as you have not shown your application code, I don't think you'll get many good answers...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b8fb8b10-de4f-46b7-bf96-d4ce4ad86993%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages