Comments (4)
Hello @alouani-youssef ,
Centrifugo has its own protocol, are you using our bidirectional SDK to connect? If yes - please share the code and also full server logs (I suggest enabling "log_level": "trace"
) - not only last log message.
from centrifugo.
You are sending wrong JSON commands, that's why connection is closed. You need to use our SDKs to communicate with Centrifugo or use proper command structure (described here). See also docs on how to use Postman when you want to debug sth.
from centrifugo.
Hello @FZambia Those are the logs after enabling the log_level trace,
{"level":"debug","method":"GET","status":101,"path":"/connection/websocket","addr":"IP","duration":"269.45µs","time":"2024-03-07T11:02:10Z","message":"http request"} {"level":"trace","client":"e9b6aa27-c385-4cbb-b368-7d232d371570","command":"{\"id\":2}","user":"","time":"2024-03-07T11:02:10Z","message":"<--"} {"level":"info","client":"e9b6aa27-c385-4cbb-b368-7d232d371570","command":"id:2","reason":"bad request","user":"","time":"2024-03-07T11:02:10Z","message":"disconnect after handling command"} {"level":"debug","client":"e9b6aa27-c385-4cbb-b368-7d232d371570","duration":23.967399,"transport":"websocket","time":"2024-03-07T11:02:10Z","message":"client connection completed"} {"level":"debug","client":"e9b6aa27-c385-4cbb-b368-7d232d371570","reason":"bad request","user":"","time":"2024-03-07T11:02:10Z","message":"closing client connection"} {"level":"debug","method":"GET","status":101,"path":"/connection/websocket","addr":"IP","duration":"150.432µs","time":"2024-03-07T11:02:21Z","message":"http request"} {"level":"debug","client":"fd219032-aafe-4621-bf8f-d33026fdb219","transport":"websocket","time":"2024-03-07T11:02:21Z","message":"client connection established"} {"level":"trace","client":"fd219032-aafe-4621-bf8f-d33026fdb219","command":"{\"id\":94}","user":"","time":"2024-03-07T11:02:21Z","message":"<--"} {"level":"info","client":"fd219032-aafe-4621-bf8f-d33026fdb219","command":"id:94","reason":"bad request","user":"","time":"2024-03-07T11:02:21Z","message":"disconnect after handling command"} {"level":"debug","client":"fd219032-aafe-4621-bf8f-d33026fdb219","duration":49.836208,"transport":"websocket","time":"2024-03-07T11:02:21Z","message":"client connection completed"} {"level":"debug","client":"fd219032-aafe-4621-bf8f-d33026fdb219","reason":"bad request","user":"","time":"2024-03-07T11:02:21Z","message":"closing client connection"} {"level":"debug","method":"GET","status":101,"path":"/connection/websocket","addr":"IP","duration":"150.265µs","time":"2024-03-07T11:02:22Z","message":"http request"} {"level":"debug","client":"db7b311c-665e-4532-ac50-76d05f46777c","transport":"websocket","time":"2024-03-07T11:02:22Z","message":"client connection established"} {"level":"trace","client":"db7b311c-665e-4532-ac50-76d05f46777c","command":"{\"id\":3}","user":"","time":"2024-03-07T11:02:22Z","message":"<--"} {"level":"info","client":"db7b311c-665e-4532-ac50-76d05f46777c","command":"id:3","reason":"bad request","user":"","time":"2024-03-07T11:02:22Z","message":"disconnect after handling command"} {"level":"debug","client":"db7b311c-665e-4532-ac50-76d05f46777c","duration":40.359138,"transport":"websocket","time":"2024-03-07T11:02:22Z","message":"client connection completed"} {"level":"debug","client":"db7b311c-665e-4532-ac50-76d05f46777c","reason":"bad request","user":"","time":"2024-03-07T11:02:22Z","message":"closing client connection"} {"level":"debug","method":"GET","status":101,"path":"/connection/websocket","addr":"IP","duration":"87.581µs","time":"2024-03-07T11:02:23Z","message":"http request"} {"level":"debug","client":"0c9e3806-336a-4b6a-8368-6ceee41a563c","transport":"websocket","time":"2024-03-07T11:02:23Z","message":"client connection established"} {"level":"trace","client":"0c9e3806-336a-4b6a-8368-6ceee41a563c","command":"{\"id\":3}","user":"","time":"2024-03-07T11:02:23Z","message":"<--"} {"level":"info","client":"0c9e3806-336a-4b6a-8368-6ceee41a563c","command":"id:3","reason":"bad request","user":"","time":"2024-03-07T11:02:23Z","message":"disconnect after handling command"}
from centrifugo.
Closing, hope it helped. Join our community channels if you have any questions
from centrifugo.
Related Issues (20)
- [feature] serve admin interface via http2 HOT 4
- [feature] Send server time in initial connect response. HOT 2
- [question] Upgrading to 4.1.5 increase in response time HOT 3
- "Websocket Is Closed Before The Connection Is Established" - Web console error HOT 8
- [feature] Support for MessagePack Serialization HOT 2
- How to add multyple aud for a token in config file HOT 1
- [question] History StreamPosition and circular offsets. HOT 7
- [question] Centrifugo customization HOT 13
- [question] Support for Rate Limiting Messages Sent to Clients HOT 2
- [bug] centrifugo-pro not getting OnPublishEvents when using a token with channels claim HOT 4
- [bug] Can't pull history with channel JWT HOT 7
- [bug] With protobuf binary, RPCRequest.Data is empty. HOT 3
- [question] jwt invalid token in subscriptions HOT 3
- `bad request` and `disconnect` immediately after connection established HOT 6
- [question] When using gzip compression, http_stream transport fails to connect because of timeout. HOT 4
- [question] Get list of channels that have history HOT 6
- Android app? HOT 1
- [feature] Package for debian 12 bookworm HOT 1
- [bug] grpc reflection not working HOT 3
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 centrifugo.