Aha, it looks like your daphne instance is only listening on localhost:

2017-05-02 07:01:04,853 INFO     Starting server
attcp:port=8000:interface=127.0.0.1, channel layer
firstproject.asgi:channel_layer.

Try binding to all interfaces by passing

-b 0.0.0.0

to Daphne when it starts.

Andrew

On Tue, May 2, 2017 at 1:27 PM, Alex Elson <alexmosenz...@gmail.com> wrote:

> I am using Google Cloud to host my Django project, and I'm trying to run
> it with Nginx. I open two instances of the terminal, one with the command
> "python manage.py runworker" and the other with "daphne
> firstproject.asgi:channel_layer". I am able to connect to my public ip,
> and the page loads the clientside Javascript, but all the 'Channels' parts
> do not seem to work despite all this. What could be wrong? What am I
> forgetting? Thanks for any help.
>
> Here is my response to these commands, as well as my CHANNELS_LAYER in my
> settings file.
>
> $ daphne firstproject.asgi:channel_
> layer
> 2017-05-02 07:01:04,853 INFO     Starting server
> attcp:port=8000:interface=127.0.0.1, channel layer
> firstproject.asgi:channel_layer.
> 2017-05-02 07:01:04,853 INFO     HTTP/2 support enabled
> 2017-05-02 07:01:04,853 INFO     Using busy-loop synchronous mode on
> channel layer
> 2017-05-02 07:01:04,854 INFO     Listening on endpoint
> tcp:port=8000:interface=127.0.0.1
> 127.0.0.1:47296 - - [02/May/2017:07:01:17] "GET /" 200 5801
>
> $ python manage.py runworker
> 2017-05-02 07:06:12,589 - INFO - runworker - Using single-threaded worker.
> 2017-05-02 07:06:12,589 - INFO - runworker - Running worker against
> channel layer default (asgi_redis.core.RedisChannelLayer)
> 2017-05-02 07:06:12,590 - INFO - worker - Listening on channels
> http.request, websocket.connect, websocket.disconnect, websocket.receive
>
> CHANNEL_LAYERS = {
>     "default": {
>         "BACKEND": "asgi_redis.RedisChannelLayer",
>         "CONFIG": {
>             "hosts": [("localhost", 6379)],
>         },
>         "ROUTING": "firstproject.routing.channel_routing",
>     },
> }
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/166ef732-aa07-478e-8b7d-dcd03d7924f1%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/166ef732-aa07-478e-8b7d-dcd03d7924f1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CAFwN1uqL7DRYQbT8gcfmJi3kHM%2Baw9UoijiKe5L9uqOfheg%2BGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to