Comments (6)
Glad you solved it, thanks for kind words 👍
from pycent.
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 tcpdump
– it can give you insights.
from pycent.
Thank you @FZambia for your help.
I'll keep trying to resolve the problem. I suspect that the problem in my web server configurations.
from pycent.
Welcome, maybe also try to use curl
or similar when making publish request (since this library uses requests
internally so it's not unexpected you got the same error when using requests
manually).
curl --header "Content-Type: application/json" \
--header "Authorization: apikey <YOUR_API_KEY>" \
--request POST \
--data '{"method": "publish", "params": {"channel": "channel", "data": {"value": "test"}}}' \
http://localhost:8000/api
from pycent.
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.
from pycent.
@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.
I apologize for disturbing you. The problem was not with Centrifugo itself, but with the Docker settings.
Thanks for your help and a great open source product like Centrifugo.
from pycent.
Related Issues (20)
- Python 3.3 Error HOT 2
- Publish by user
- Documentation HOT 4
- Introduce insecure skip verify option HOT 1
- How would I go about reading the API constantly? HOT 12
- Latest version does not work with v1 HOT 2
- Generate token for client side HOT 6
- Fix getting history HOT 2
- Missing Parameters HOT 2
- publish data with datetime or Decimal HOT 7
- is this client still receiving updates? HOT 8
- 404 on message publish HOT 2
- Get offset instead of publications for offset field in history response HOT 2
- Request for cent Package Availability in Anaconda
- JSONDecodeError: Expecting value: line 1 column 1 (char 0) HOT 4
- [Question] Broadcast method input parameters HOT 2
- Add license please HOT 1
- Poll the server for number of clients HOT 12
- Use X-API-Sign header to set sign and POST commands in request body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycent.