What does this code mean, "404 = not found, 404; -32601"? This happens when you enter the room on the Kurento media server.

I work in an Android application where I have streaming video. I am using kurento media server for streaming. I connect to KMS using the following code:

    executor = new LooperExecutor();
    executor.requestStart();

    String wsRoomUri = "wss://192.168.0.104:8433/kurento";
    kurentoRoomAPI = new KurentoRoomAPI(executor, wsRoomUri, this);

    CertificateFactory cf;
    try {
        cf = CertificateFactory.getInstance("X.509");
        InputStream caInput = new BufferedInputStream(getAssets().open("kurento_room_base64.cer"));
        Certificate ca = cf.generateCertificate(caInput);
        kurentoRoomAPI.addTrustedCertificate("ca", ca);
    } catch (CertificateException |IOException e) {
        e.printStackTrace();
    }

    kurentoRoomAPI.useSelfSignedCertificate(true);

    kurentoRoomAPI.connectWebSocket(); 

He is connecting. But when I try to enter the room, it shows an error, and the error:

.vtt.nubotest E/MainActivity: Code:-32601 
04-18 17:30:18.061 11699-11938/fi.vtt.nubotest E/MainActivity: Data:null

I get an error in:

@Override
    public void onRoomError(RoomError error) {
    Toast.makeText(MainActivity.this,"OnError",Toast.LENGTH_SHORT).show();
    Log.e(TAG,"Code:"+ error.getCode());

    Log.e(TAG,"Data:"+ error.getData());
    if(error.getCode() == 104) {
        showFinishingError("Room error", "Username already taken");
    }
}

In the server error log I see the following error in json format:

Response: >{"error":{"code":-32601,"message":"Method not                      
found."},"id":4,"jsonrpc":"2.0"}
+4
source share

Source: https://habr.com/ru/post/1675046/


All Articles