-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centrifugo on Production Server #20
Comments
I believe that the reason not in Centrifugo itself but in your setup configuration. Though I can't say exactly where the problem comes from without the possibility to investigate this. This looks like missing network connectivity. Try to reduce problem scope. If you are familiar with |
Thank you @FZambia for your help. |
Welcome, maybe also try to use
|
I've connected to my external server via ssh and tested sending request to publish a notification in terminal. I could send a request for publishing a notification via curl successfully. The problem occurs when I enter a Docker container for Django backend inside my external server. Neither Cent library nor Requests package could send a request for publishing a notification. As I understood the problem is in Docker Network. |
@FZambia I solved my problem. The reason was that docker did not send the request directly to https://my-domain/centrifugo/api, since this is the host of the server itself. I solved the problem by creating a separate network in docker and setting static ips for containers. After that, I simply sent requests for publication using the static ip of the container with Centrifugo. |
Glad you solved it, thanks for kind words 👍 |
Hello!
I am using Centrifugo in my Django project as a tool for publishing notifications.
All services (also Centrifugo) are in Docker containers on the same server.
I use Nginx as a proxy server for Centrifugo.
Centrifugo is available on endpoint https://my-domain.io/centrifugo
I try to publish a notification with publish method, but get an error:
HTTPSConnectionPool(host='my-domain.io', port=443): Max retries exceeded with url: /centrifugo/api (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f088e765130>, 'Connection to my-domain.io timed out. (connect timeout=1)'))
Also I try to publish with python requests package and get almost the same error:
But when I run the same commands from my local server, everything works as expected.
What am I doing wrong? Should I use a separate server (droplet) for Centrifugo?
Thank you in advance!
The text was updated successfully, but these errors were encountered: