OpenSight / janus-cloud

a cluster solution for Janus WebRTC server, by API proxy approach
GNU Affero General Public License v3.0
207 stars 49 forks source link

Reconnect janus failed #16

Closed telinx closed 3 years ago

telinx commented 3 years ago

reconnect janus cloud in 2 seconds

{"janus": "claim", "transaction": "l6u02dI18dT8", "session_id": "3709398412711189"}

received from janus cloud

{
   "janus": "error",
   "session_id": 3709398412711189,
   "transaction": "l6u02dI18dT8",
   "error": {
      "code": 458,
      "reason": "No such session 3709398412711189",
      "traceback": [
         "  File \"/usr/local/lib/python3.6/dist-packages/januscloud/proxy/core/request.py\", line 295, in incoming_request\n    response = handler(request)\n",
         "  File \"/usr/local/lib/python3.6/dist-packages/januscloud/proxy/core/request.py\", line 187, in _handle_claim\n    session = self._get_session(request)\n",
         "  File \"/usr/local/lib/python3.6/dist-packages/januscloud/proxy/core/request.py\", line 120, in _get_session\n    session = self._frontend_session_mgr.find_session(request.session_id)\n",
         "  File \"/usr/local/lib/python3.6/dist-packages/januscloud/proxy/core/frontend_session.py\", line 124, in find_session\n    raise JanusCloudError('No such session {}'.format(session_id), JANUS_ERROR_SESSION_NOT_FOUND)\n"
      ]
   }
}

Is my configuration file wrong? thank you.

jamken commented 3 years ago

why use a "claim" reqeust, the "claim" reqeust is used to take control of the session from the other ws connection, it should not be used for normal case unless you know what is going on.

from the response, janus-cloud indicates the session 3709398412711189 does not exist. Maybe this session is timeout (session default timeout is 60s) and destroyed. Please check the log of janus-cloud.

telinx commented 3 years ago

Thank you for your reply