Here’s some more info in case it helps track this down.
I was focussed on getting openvidu working so I could test it shared on my local network. But I didn’t realize that using a self-signed cert with https on the local network causes the websockets in my app (not related to openvidu) to fail. My websockets works over http even with the 192 ip). But when I use http and test openvidu, I am able to connect to a session, but then call to publish
never resolves. So I have something like this…
console.log('*** _testVideoSession.publish');
_testVideoSession.publish(_testVideoPublisher)
.then(() => {
console.log('*** publish ok');
})
.catch((error) => {
console.log('*** publish error');
});
I get nothing after the 1st log. I don’t get publish ok
or publish error
. This happens even when testing on my dev machine (not just other machines on the network).
Here’s the output from the server when attempting to publish…
2020-06-27 19:12:38,525 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,524 [0.0-4443-exec-8] io.openvidu.server.rpc.RpcHandler - After connection established for WebSocket session: t0lg18gafvjom695nc42l9hlff
2020-06-27 19:12:38,538 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,537 [c42l9hlff-e4-t0] io.openvidu.server.core.Session - Token consumed { Session: ses_U26ysCCZQb | Tokens: [wss://192.168.1.26:4443?sessionId=ses_U26ysCCZQb&token=tok_XZBkhCdxeNTy69cQ&role=PUBLISHER&version=2.14.0, wss://192.168.1.26:4443?sessionId=ses_U26ysCCZQb&token=tok_WXxToHPhhVhTT9fE&role=PUBLISHER&version=2.14.0] }
2020-06-27 19:12:38,543 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,543 [c42l9hlff-e4-t0] io.openvidu.server.core.SessionManager - Participant con_IABidMI6hf of session ses_U26ysCCZQb is a final user connecting to this session for the first time
2020-06-27 19:12:38,549 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,549 [c42l9hlff-e4-t0] io.openvidu.server.kurento.core.KurentoSessionManager - KMS less loaded is ws://localhost:8888/kurento with a load of 1.0
2020-06-27 19:12:38,552 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,552 [c42l9hlff-e4-t0] io.openvidu.server.kurento.core.KurentoSessionManager - No session 'ses_U26ysCCZQb' exists yet. Created one on KMS 'kms_VaozABrC' with ip 'localhost'
2020-06-27 19:12:38,560 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,558 [c42l9hlff-e4-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION ses_U26ysCCZQb: Creating MediaPipeline
2020-06-27 19:12:38,578 DEBG 'kms' stdout output:
0:01:01.302487400 8 0x7fb894001cd0 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:513:processMessage: Message: {"id":9,"method":"create","params":{"type":"MediaPipeline","constructorParams":{},"properties":{},"sessionId":"c1ec2bf1-1363-4db4-a3e6-3c2e194075c6"},"jsonrpc":"2.0"}
2020-06-27 19:12:38,579 DEBG 'kms' stdout output:
0:01:01.303270300 8 0x7fb894001cd0 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:515:processMessage: Response: {"id":9,"jsonrpc":"2.0","result":{"sessionId":"c1ec2bf1-1363-4db4-a3e6-3c2e194075c6","value":"1e2fad59-6fce-4614-b606-811e8edca254_kurento.MediaPipeline"}}
2020-06-27 19:12:38,610 DEBG 'kms' stdout output:
0:01:01.334607300 8 0x7fb8780012f0 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:513:processMessage: Message: {"id":10,"method":"subscribe","params":{"type":"Error","object":"1e2fad59-6fce-4614-b606-811e8edca254_kurento.MediaPipeline","sessionId":"c1ec2bf1-1363-4db4-a3e6-3c2e194075c6"},"jsonrpc":"2.0"}
0:01:01.334853100 8 0x7fb8780012f0 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:515:processMessage: Response: {"id":10,"jsonrpc":"2.0","result":{"sessionId":"c1ec2bf1-1363-4db4-a3e6-3c2e194075c6","value":"6f8b7482-cdc5-4824-a51e-6f76f8814d82"}}
2020-06-27 19:12:38,629 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:12:38,626 [c42l9hlff-e4-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION ses_U26ysCCZQb: Added participant [participantPrivateId=t0lg18gafvjom695nc42l9hlff, participantPublicId=con_IABidMI6hf, streaming=false]
When I run my app in localhost instead of the 192 ip it works. I see the same output as above but then it continues with…
2020-06-27 19:09:58,109 DEBG 'openvidu-server' stdout output:
[INFO] 2020-06-27 19:09:58,107 [9umadf1l-e18-t0] io.openvidu.server.rpc.RpcHandler - Participant con_HPV2fJrdq5 is calling method 'publish' in session ses_B4TEZn70rh
2020-06-27 19:09:58,109 DEBG 'kms' stdout output:
0:17:15.432650500 8 0x7f4cc8001d80 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:513:processMessage: Message: {"id":300,"method":"create","params":{"type":"WebRtcEndpoint","constructorParams":{"mediaPipeline":"c1143201-6321-4a93-8b69-9bd370ed7ad0_kurento.MediaPipeline"},"properties":{},"sessionId":"1ff228b8-7dee-446d-9d75-5f06d333c1dd"},"jsonrpc":"2.0"}
2020-06-27 19:09:58,113 DEBG 'kms' stdout output:
0:17:15.436388400 8 0x7f4cc8001d80 INFO KurentoBaseRtpEndpointImpl BaseRtpEndpointImpl.cpp:114:BaseRtpEndpointImpl: No predefined RTP MTU found in config; using default
0:17:15.436583200 8 0x7f4cc8001d80 INFO KurentoWebRtcEndpointImpl WebRtcEndpointImpl.cpp:104:remove_not_supported_codecs_from_array:<kmswebrtcendpoint4> Removing not supported codec 'AMR/8000'
0:17:15.436674900 8 0x7f4cc8001d80 INFO KurentoWebRtcEndpointImpl WebRtcEndpointImpl.cpp:521:WebRtcEndpointImpl: No predefined external IP address found in config; you can set one or default to STUN automatic discovery
0:17:15.436732500 8 0x7f4cc8001d80 INFO KurentoWebRtcEndpointImpl WebRtcEndpointImpl.cpp:532:WebRtcEndpointImpl: No predefined network interfaces found in config; you can set one or default to ICE automatic discovery
This is the same in any browser I’ve tried.
Does this help find the issue, since it’s not related to my cert or sharing on the local network. It seems to just be caused by using the 192 ip. Do the logs or the fact that the publish method never resolves help?
Thanks again.