Invalid Path error

145 views
Skip to first unread message

Thomas Schemmer

unread,
Nov 15, 2016, 1:37:30 PM11/15/16
to kurento

Hi Everyone,

im currently trying to set up a development server using kurento, the current step is to enable wss / https.
I can access the https websites without problems, but when i try to start a connection in my browser with the javascript command

var ws = new WebSocket('wss://' + location.hostname + ':8433/streamWS');

i get the following KMS log output:
2016-11-15 19:17:46,439279 2561 [0x00007f2e8cff9700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:444 openHandler()  Client connected from https://192.168.0.125:8443
2016-11-15 19:17:46,439348 2561 [0x00007f2e8cff9700]   error KurentoWebSocketTransport WebSocketTransport.cpp:455 openHandler()  Invalid path "/streamWS", closing connection
2016-11-15 19:17:46,490731 2561 [0x00007f2e877fe700]   debug KurentoWebSocketTransport WebSocketTransport.cpp:495 closeHandler()  Connection closed

Chrome throws an error on sendMesage, saying that "WebSocket is already in CLOSING or CLOSED state."

I did add the path to my Spring Boot App with
final static String DEFAULT_KMS_WS_URI = "wss://localhost:8433/kurento";

 
@Bean
 
public KurentoClient kurentoClient() {
 
return KurentoClient.create(System.getProperty("kms.url", DEFAULT_KMS_WS_URI));
 
}

public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
 registry
.addHandler(streamHandler(), "/streamWS").setAllowedOrigins("*");
 
}

The https port is 8443, wss port is 8433. Is that correct? I mean, the kms gets the request (log), it just cant parse the path.
I am using a selfsigned .pem for kurento (following docs) and a selfsigned .p12 (following drissamri) for spring boot.
It used to work, when i was using ws and port 8080.

Would be glad if someone could point out my error ;)

Have a nice evening!
Thomas
Reply all
Reply to author
Forward
0 new messages