Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Got request timeout from nodejs api after a long period of inactivity #1

Closed

Description

@tgabi333

I have connected to KMS using kurento-client through secure websocket. It worked as well. I left my node server running with this open connection for a night, - no communication happened and now in the morning i've tried to register a new pipeline.

Using: KMS 6.1.1 on a distant network

{ [Error: Request has timed out]
  request: '{"jsonrpc":"2.0","method":"create","params":{"type":"MediaPipeline","sessionId":"1af516ae-068d-43ff-ac81-1d00ad3e083c"},"id":23}',
  retry: [Function: retry] }
Error: Request has timed out
    at /workspace/videochat/node_modules/kurento-client/lib/KurentoClient.js:332:24
    at /workspace/videochat/node_modules/kurento-client/lib/KurentoClient.js:504:16
    at callback2 (/workspace/videochat/node_modules/promisecallback/index.js:27:25)
    at lib$es6$promise$$internal$$tryCatch (/workspace/videochat/node_modules/es6-promise/dist/es6-promise.js:331:16)
    at lib$es6$promise$$internal$$invokeCallback (/workspace/videochat/node_modules/es6-promise/dist/es6-promise.js:343:17)
    at /workspace/videochat/node_modules/es6-promise/dist/es6-promise.js:891:13
    at lib$es6$promise$asap$$flush (/workspace/videochat/node_modules/es6-promise/dist/es6-promise.js:125:9)
    at process._tickDomainCallback (node.js:381:11)

Looking at the network stats:

tcp        0      0 10.0.2.15:49978         x.x.x.x:8433     ESTABLISHED

And found these lines in the server log:

2015-10-14 10:32:58,718016 2390 [0x00007f6550ff9700]    info KurentoWebSocketTransport WebSocketTransport.cpp:257 keepAliveSessions()  Keep alive 1af516ae-068d-43ff-ac81-1d00ad3e083c

Could you please help me how to keep open the connection?

Activity

  1. jcaden commented on Oct 14, 2015

    @jcaden
    Member

    Can to attach kms log please?

  2. tgabi333 commented on Oct 14, 2015

    @tgabi333
    Author

    [removed links]

    Thank you

  3. jcaden commented on Oct 14, 2015

    @jcaden
    Member

    This request didn't arrived to the server. There should be a problem with the reconnection of the websocket.

  4. added
    bug
    on Oct 14, 2015
  5. igracia commented on Oct 14, 2015

    @igracia
    Contributor

    @rbenitez Could you verify this, please? It seems like an issue in the KurentoClient in JavaScript. We should be reconnecting.

  6. tgabi333 commented on Oct 15, 2015

    @tgabi333
    Author

    same happened today :(

  7. jcaden commented on Oct 15, 2015

    @jcaden
    Member

    I guess it will be happening until reconnection is fixed 😄

  8. tgabi333 commented on Oct 15, 2015

    @tgabi333
    Author

    How can i help, in which repo?

  9. igracia commented on Oct 15, 2015

    @igracia
    Contributor

    We are debugging this. I'll get back to you as soon as we have solid info, but basically once the connection is lost, we are not reconnecting if needed. This happens after a certain idle time. There are workarounds and things that could be done about it, but we have a library that should be reconnecting. It looks like it's not working as it should.

  10. sainttail commented on Nov 30, 2015

    @sainttail

    This still happen with kurento-client-js 6.2, somehow the connection die and reconnect not working so right now I have to capture the request timeout error and call client._re._connection.end() to force reconnection again.

  11. igracia commented on Nov 30, 2015

    @igracia
    Contributor

    @rbenitez Did you have a chance to take a look at this?

  12. rbenitez commented on Nov 30, 2015

    @rbenitez

    Hi @sainttail, please could you tell me which version are you using of kurento-client-js?

    Thanks

  13. sainttail commented on Nov 30, 2015

    @sainttail

    @rbenitez I'm currently using kurento-client-js 6.2.0 which just release recently.

  14. rbenitez commented on Nov 30, 2015

    @rbenitez

    Ok, I will investigate what's the problem. I will tell you something as soon as possible.

    Best

  15. igracia commented on Dec 18, 2015

    @igracia
    Contributor

    @rbenitez Do we have new info on this?

  16. morokhovets commented on Jan 25, 2016

    @morokhovets

    @rbenitez @igracia Is there any progress?
    Or are there any good hacks to work around this issue?

  17. rbenitez commented on Mar 6, 2016

    @rbenitez

    We have implemented a ping/pong mechanism and we have reimplemented the reconnection way, please update kurento-client at master version.

    Best.

  18. dfernandezlop commented on Mar 11, 2016

    @dfernandezlop

    @rbenitez can we close the bug?

  19. rbenitez commented on Mar 11, 2016

    @rbenitez

    Yes.

    Thanks

  20. dfernandezlop commented on Mar 11, 2016

    @dfernandezlop

    Ok, I'm closing the thread.

  21. abhikandoi commented on Dec 3, 2017

    @abhikandoi

    Hey guys I am still facing this issue. I am using kurento-media-server version 6.6.2:

    Here is the version output:

    Version: 6.6.2
    Found modules:
    	Module: 'core' version '6.6.3'
    	Module: 'elements' version '6.6.3'
    	Module: 'filters' version '6.6.2'
    

    I am using the kurento-client version 6.6.0:

    +-- [email protected]
    |  +-- [email protected]
    |  +-- [email protected]
    |  +-- [email protected]
    |  +-- [email protected]
    |  `-- [email protected] (git://github.com/kurentoforks/reconnect-ws.git#7fb7020e3ca1ffeaaa8bb4ddd690cf28c8d02a2b)
    |     +-- [email protected] (git://github.com/kurentoforks/reconnect-core.git#921d43e91578abb2fb2613f585c010c1939cf734)
    

    I get the Error: Request has timed out. A quick hack to fix this would also be appreciated.
    @sainttail can you please share the fix that you mention in this thread?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugjs-api

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions