how to configure the timeout of kurento client?

1,178 views
Skip to first unread message

hei...@gmail.com

unread,
Jun 24, 2016, 5:17:02 AM6/24/16
to kurento
hi kurento team, 

When I am testing with the kurento, I get a timeout log when the processOffer, here is the log.

org.kurento.jsonrpc.JsonRpcException: [KurentoClient]  Timeout of 10000 milliseconds waiting from response to request {"id":65777,"method":"invoke","params":{"object":"5a29f312-9166-4ad6-aa01-d6ff61afa26e_kurento.MediaPipeline/a60defc6-4e61-4f43-b304-d73b953c6dd5_kurento.WebRtcEndpoint","operation":"processOffer","operationParams":{"offer":"v=0\r\no=- 3675748116 3675748116 IN IP4 0.0.0.0\r\ns=Kurento Media Server\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=group:BUNDLE audio0 video0\r\nm=audio 1 RTP/SAVPF 96 0\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=rtpmap:96 opus/48000/2\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=mid:audio0\r\na=ssrc:1888060598 cname:user962157393@host-72a40894\r\na=ice-ufrag:YUnr\r\na=ice-pwd:Gfb4501c4B5SMDzehQKshJ\r\na=fingerprint:sha-256 42:14:36:F3:F6:BA:71:02:C9:9E:6F:10:EB:4E:62:2F:CF:F5:61:94:92:EF:0B:B0:40:EF:0D:38:7A:CC:11:0A\r\nm=video 1 RTP/SAVPF 99\r\nb=AS:500\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=rtpmap:99 VP8/90000\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=mid:video0\r\na=rtcp-fb:99 nack\r\na=rtcp-fb:99 nack pli\r\na=rtcp-fb:99 goog-remb\r\na=rtcp-fb:99 ccm fir\r\na=ssrc:1517232932 cname:user962157393@host-72a40894\r\na=ice-ufrag:YUnr\r\na=ice-pwd:Gfb4501c4B5SMDzehQKshJ\r\na=fingerprint:sha-256 42:14:36:F3:F6:BA:71:02:C9:9E:6F:10:EB:4E:62:2F:CF:F5:61:94:92:EF:0B:B0:40:EF:0D:38:7A:CC:11:0A\r\n"},"sessionId":"9bb25c67-ecd8-461c-ac35-a8d558d8f23c"},"jsonrpc":"2.0"}

It seems that the default time out is 10 seconds, how can I modify this timeout value, for example to 100 seconds?

thanks

Ivan Gracia

unread,
Jun 27, 2016, 5:56:23 AM6/27/16
to kurento
Changing that is certainly possible. That's how you'd do it in any of the tutorials.
  @Bean
  public KurentoClient kurentoClient() {
    JsonRpcClient jsonRpcClient = new JsonRpcClientWebSocket(url); //remember to provide URL of KMS here
    jsonRpcClient.setConnectionTimeoutValue(10000); //Value in ms
    return KurentoClient.createFromJsonRpcClient(jsonRpcClient);
  }
In any case, I think the error is somewhere else. It shouldn't take 10 seconds to process that request.

Cheers,

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leonardo Lourenço

unread,
Jan 20, 2020, 9:18:59 AM1/20/20
to kurento
Where do I find this JsonRpcClient class?
To unsubscribe from this group and stop receiving emails from it, send an email to kur...@googlegroups.com.

Micael Gallego

unread,
Jan 20, 2020, 5:13:52 PM1/20/20
to kur...@googlegroups.com

To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/2543967c-6c5c-4c9d-a856-bf717749075c%40googlegroups.com.

Hemrajsinh Gharia

unread,
Apr 17, 2020, 6:09:26 AM4/17/20
to kurento
JsonRpcClient is an abstract class and It is not clear which concrete class to import. JsonRpcClientWebSocket seems not there in kurento-client project. It is part of kurento-jsonrpc project. I am not sure how to use suggested way of KurentoClient.createFromJsonRpcClient(jsonRpcClient).
So I used KurentoClientBuilder as follow:

 KurentoClient kurentoClient = new KurentoClientBuilder()
       
.setKmsWsUri("ws://localhost:8888/kurento")
       
.setConnectionTimeout(20000L)    
       
.onConnectionFailed(() -> {
          log
.error("Kurento connection status: connection attempt failed");
       
})
       
.onConnected(() -> {
          log
.info("Kurento connection status: connected");
       
})
       
.onDisconnected(() -> {
          log
.error("Kurento connection status: disconnected");
       
})
       
.onReconnecting(() -> {
          log
.info("Kurento connection status: reconnecting...");
       
})
       
.onReconnected(sameServer -> {
          log
.info("Kurento connection status: reconnected");
          log
.info("Reconnected to same server: {}", sameServer);
       
})
       
.connect();
To unsubscribe from this group and stop receiving emails from it, send an email to kur...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages