Open ghost opened 3 years ago
I'm afraid I don't know much about how NGINX works (both in general, and specifically not as a reverse proxy), so I'm not sure I can be much help here.
I would assume that NGINX would normally be proxying HTTP traffic. Comet doesn't speak HTTP. A quick check of the first documentation I found (https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) indicates that NGINX can handle a few other application-specific protocols (fastcgi, uwsgi, etc) but none of those seem relevant to Comet. I note the comment in your configuration referring to “some stuff for socket” — perhaps that implies you have some configuration to give you a TCP socket, but this is magic with which I have no familiarity.
I'd suggest debugging by taking Comet out of the equation. Use Netcat, or similar, to show you can establish a raw TCP connection through your proxy on the ports you want. When you're sure that's working, we might have some more clues about what's going wrong.
Thank you very much for the quick answer. I will try Netcat as you suggest to make that work!
Good luck — let me know how you get on!
Hi,
I have a broker deployed in a docker swarm, accessible directly (http://whatever.fr:20099), but I would like to be able to subscribe to this broker using an other proxy subdir address: https://my-website.org/whocares/broker.
So far the nginx proxy is configured to proxy_pass https://my-website.org/whocares/broker to http://whatever.fr:8099 with an upstream block:
Using
twistd -n comet --local-ivo=ivo://dom/what#me --receive --remote=my-website.org/whocares/broker:443 --print-event
returns:while trying
twistd -n comet --local-ivo=ivo://dom/what#me --receive --remote=whatever.fr:20099 --print-event
works perfectly.Any help would be welcome to understand and solve (if possible) the problem. Thanks a lot.