How to ensure a new participant can connect?

Erik Ortega

New Member
Hello,

I am working on the conference demo to build a videoconference within web browser on a website. However, sometimes like when a crash (on the browser) happens, the connection is not properly closed and the participant can't join again the conference using the same login and same room name. How can I ensure a new participant can always join the conference using the same login and the same room number?. Is there a way to connect while forcing to close previous connections with same login/room?

Best regards,
Erik V. Ortega
 

Max

Administrator
Staff member
Hello
If browser is closed by user, the client will be disconnected properly and all associated resources will be released.
If browser has crashed, it does not send close notification to WCS server and WCS server does not know if user disconnected.
WCS sends keep alive requests to the browser.
See config:
server.properties
Example:
Code:
keep_alive.algorithm       =INTERNAL
keep_alive.server_interval =5000
keep_alive.probes          =10
This means WCS will send internal websocket keep alives and the disconnect event will be raised in 10x5000 = 50.000 ms = 50 seconds
Therefore you can shorten this interval, i.e. 2 seconds:
Code:
keep_alive.server_interval =1000
keep_alive.probes          =2
As an option, you can always generate and use unique login names. Then your streams will not conflict regardless keep alive timeout.
 

Erik Ortega

New Member
Max,
Thanks a lot for your quick reply.
I have thought about unique logins. But that would mean a user might open two browsers during the same call which is not a valid use case for my application.
Thanks for explaining the keep-alive configuration. I will definitely try different values. However, I have seen users not able to reuse their login/room names after even 2 days of a crash. In that cases, the only known solution was to move all participants to a new room or to restart the server. Were you aware about this type of issue?
On the other hand, is there any possibility to ssh in the server and list all current conferences?, and eventually list current participants in each conference?.
Thanks again for your great guidance.
Best regards,
Erik
 

Max

Administrator
Staff member
On the other hand, is there any possibility to ssh in the server and list all current conferences?, and eventually list current participants in each conference?
You can fetch all connections and streams using REST API methods: /stream/find_all and /connection/find_all
Code:
http://host:9091/rest-api/stream/find_all
http://host:9091/rest-api/connection/find_all
or
Code:
https://host:8888/rest-api/stream/find_all
https://host:8888/rest-api/connection/find_all
Using these two REST methods, you can build list of rooms and its participants / streams.
REST API docs
https://flashphoner.com/docs/wcs5/wcs_docs/html/en/wcs-rest-api/
Were you aware about this type of issue?
We had similar issue in the past but it was fixed.
We will recheck this on latest builds. I will inform you through this thread once we have any progress here.
 

Max

Administrator
Staff member
We have fixed this issue in build 2449.
The disconnect should work properly now, at least by keep alive in 50 seconds by default.
 

Erik Ortega

New Member
Great. Thanks for looking into that.
How can I check what build do I have on a AWS-EC2 instance?. Is it on ../conf/WCS.version?. It seems that I am on 5.0.2016.
Any suggested way to upgrade a server that it is on on AWS?.

On the other hand, I have issues with using the REST API. The response keeps sending me to login page:
Code:
Content-Length:    0 byte
Date:   
2017 Sep 13 14:49:41+1m 57s
Location:    http://[IP]:9091/login.xhtml
Server:    Apache-Coyote/1.1
Set-Cookie:   
JSESSIONID=33 B, session, HttpOnly
I have tried adding the admin credentials to my request on my REST client, but it does not work. Did I miss any necessary setup?
 

Max

Administrator
Staff member
Any suggested way to upgrade a server that it is on on AWS?
Try this over ssh:
Code:
sudo service webcallserver update
It should update server to the latest one.
I have tried adding the admin credentials to my request on my REST client, but it does not work. Did I miss any necessary setup?
It should be fixed in the latest build. Please check after update.
 

Erik Ortega

New Member
Thanks, the update command does work well.
The REST API does work in the latest build. The server is no longer accepting connections on DNS (only IP) but I hope it will come back after a sanity reboot.
Thanks a lot!.
 
Top