-
-
Notifications
You must be signed in to change notification settings - Fork 235
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
WebSocket is already in CLOSING or CLOSED state. #638
Comments
@olzii are you using a reverse proxy for the websockets like nginx?, if so please make sure that the timeout is long enough or you need to handle gracefully the ws reconnec. |
Yes, i am using Nginx proxy. Default proxy timeout was 60 seconds, lets try to change it. |
I have changed timeout to 310 seconds: proxy_read_timeout 310s; After 5 minute 10 seconds, it received Websocket closed error again. |
nat1to1 is public ip? |
Yes it is public ip. Here is my Nginx proxy config :
|
I shut it down because of the ICE problem. The solution is to change the value of configuration file NAT1to1 to public ip.Other reasons for the closure have not yet been encountered |
|
@Y1nPengfei Making "icelite=false" has no effect, result is same. |
NGINX to reverse proxy websockets AND enable SSL If i increase proxy_read_timeout value to 86400, it is working. |
offtop: I use traefik and I don't have any problems with websocket |
I have the exact same issue, anyone found a solution? i'm using NGINX and Kubernetes + the connection is over https |
The solution is simple, just increase the timeout or gracefully recover from websocket reconnect. |
Your environment.
What did you do?
I was trying this example (Pion/Ion-Sfu One to Many) and deployed ION SFU and Vue example on real server.
What happened?
SFU and WebSocket is working without any problem about 1 minute and closing automatically.
And saying this error on browser console : 'WebSocket is already in CLOSING or CLOSED state.'
On server side, it has following log:
The text was updated successfully, but these errors were encountered: