Video not recording - OpenVidu Pro 2.14.0

We installed OpenVideo Pro with 2 separate instance of KMS, After we stop the recording we get the following log. The file is missing in recording folder. What could be the issue

{“sessionId”:“ses_XZc5XYUmoP”,“timestamp”:1591394388690,“startTime”:1591394158127,“duration”:0.0,“reason”:“recordingStoppedByServer”,“id”:“ses_XZc5XYUmoP”,“name”:“ses_XZc5XYUmoP”,“outputMode”:“INDIVIDUAL”,“hasAudio”:true,“hasVideo”:true,“size”:0,“status”:“stopped”,“event”:“recordingStatusChanged”,“elastic_type”:“cdr”}
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,707 [0.0-5443-exec-5] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping single stream recorder for stream str_CAM_ZeH9_con_WT6uFMlRb6 in session ses_XZc5XYUmoP
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,720 [ventExec-e7-t17] io.openvidu.server.recording.service.SingleStreamRecordingService - Recording stopped event for stream str_CAM_SWgq_con_Egv66WTMvX
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,770 [ventExec-e7-t17] io.openvidu.server.recording.service.SingleStreamRecordingService - Recording stopped event for stream str_CAM_ZeH9_con_WT6uFMlRb6
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,774 [0.0-5443-exec-5] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading recording ses_XZc5XYUmoP from 10.10.12.5
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,778 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading file from http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_ZeH9_con_WT6uFMlRb6.webm
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,779 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading file from http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_SWgq_con_Egv66WTMvX.webm
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,802 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - File http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_ZeH9_con_WT6uFMlRb6.webm is 0 KB in size
e[36mopenvidu-server_1 |e[0m [INFO] 2020-06-05 21:59:48,802 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - File http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_SWgq_con_Egv66WTMvX.webm is 0 KB in size
e[36mopenvidu-server_1 |e[0m [ERROR] 2020-06-05 21:59:48,802 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /storage/openvidu/recordings/ses_XZc5XYUmoP/str_CAM_ZeH9_con_WT6uFMlRb6.webm: http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_ZeH9_con_WT6uFMlRb6.webm
e[36mopenvidu-server_1 |e[0m [ERROR] 2020-06-05 21:59:48,802 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /storage/openvidu/recordings/ses_XZc5XYUmoP/str_CAM_SWgq_con_Egv66WTMvX.webm: http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_SWgq_con_Egv66WTMvX.webm
e[36mopenvidu-server_1 |e[0m [ERROR] 2020-06-05 21:59:48,802 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_ZeH9_con_WT6uFMlRb6.webm
e[36mopenvidu-server_1 |e[0m [ERROR] 2020-06-05 21:59:48,803 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.10.12.5/recordings/ses_XZc5XYUmoP/str_CAM_SWgq_con_Egv66WTMvX.webm

Individual recordings are recorded by Kurento Media Server.

Can you share with us Kurento Media Server logs to see if there are something to guide us to the problem root?

Hi Micael,

I have performed fresh transaction and shared the logs of OpenVidu and KMS in dropbox

Thanks
Prabu R

Are you aware of these errors?

e[36mopenvidu-server_1  |e[0m [ERROR] 2020-06-05 23:29:52,544 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /storage/openvidu/recordings/ses_U5tPs5q4tU/str_CAM_GLn4_con_C5bgp9zLvt.webm: http://10.9.208.5/recordings/ses_U5tPs5q4tU/str_CAM_GLn4_con_C5bgp9zLvt.webm
e[36mopenvidu-server_1  |e[0m [ERROR] 2020-06-05 23:29:52,544 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /storage/openvidu/recordings/ses_U5tPs5q4tU/str_CAM_A87U_con_Po5glgODZV.webm: http://10.9.208.5/recordings/ses_U5tPs5q4tU/str_CAM_A87U_con_Po5glgODZV.webm
e[36mopenvidu-server_1  |e[0m [ERROR] 2020-06-05 23:29:52,544 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.9.208.5/recordings/ses_U5tPs5q4tU/str_CAM_GLn4_con_C5bgp9zLvt.webm
e[36mopenvidu-server_1  |e[0m [ERROR] 2020-06-05 23:29:52,544 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.9.208.5/recordings/ses_U5tPs5q4tU/str_CAM_A87U_con_Po5glgODZV.webm

Have you changed default recording folder? Can you use standard one?

After setting the recording folder to default value, it worked

OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings

Does this mean we cannot change the recording path?

Changing recording path should be possible.

Maybe /opt/openvidu/recordings has the proper user rights and the other folder not.

Are you using some kind of s3 mounting or similar? Some users reported problems.

We have NFS mount point, We can see .zip file generated only with JSON file in the custom recording path. The content of JSON file is

{
“createdAt”: 1591399770754,
“id”: “ses_U5tPs5q4tU”,
“name”: “ses_U5tPs5q4tU”,
“sessionId”: “ses_U5tPs5q4tU”,
“files”: [
{
“connectionId”: “con_C5bgp9zLvt”,
“streamId”: “str_CAM_GLn4_con_C5bgp9zLvt”,
“size”: 0,
“clientData”: “”,
“serverData”: “”,
“hasAudio”: true,
“hasVideo”: true,
“typeOfVideo”: “CAMERA”,
“startTimeOffset”: 141,
“endTimeOffset”: 21717
},
{
“connectionId”: “con_Po5glgODZV”,
“streamId”: “str_CAM_A87U_con_Po5glgODZV”,
“size”: 0,
“clientData”: “”,
“serverData”: “”,
“hasAudio”: true,
“hasVideo”: true,
“typeOfVideo”: “CAMERA”,
“startTimeOffset”: 171,
“endTimeOffset”: 21698
}
]
}

If there are permission issues, then how does the .zip file with JSON gets created?

Interesting… :thinking:

So JSON files are created but some big files coming from media server are not created. It can be related to how these two kind of files are managed in the code. JSON files are created directly in the Java code while media files are copied from media nodes. Maybe the libraries to write files are slightly different. Or maybe the problem is related with the size of the files. It is hard to know.

Can you try to record a very short session to see if file size matters?

We logged into KMS docker shell and found that the webm files exist in the custom path on the KMS server. But in OpenVidu logs we can see File Size is 0 after downloading

root@ecsvkms1:/storage/openvidu/recordings/ses_KYuUpFQM1h# ls -l
total 1120
-rw-r–r-- 1 root root 620188 Jun 6 01:42 str_CAM_RW5i_con_AyJbpdSEjT.webm
-rw-r–r-- 1 root root 522381 Jun 6 01:42 str_CAM_ZluG_con_ID0WsqYzun.webm

Maybe we have a bug in the folder management.

Just to be sure, can you set a custom path for recording outside NFS?

We tried with local custom path as OPENVIDU_RECORDING_PATH=/ovrecordings
We have also created the folder /ovrecordings before starting openvidu, still the recording files are not getting saved

openvidu-server_1 | [INFO] 2020-06-06 02:07:46,107 [EventExec-e7-t9] io.openvidu.server.recording.service.SingleStreamRecordingService - Recording stopped event for stream str_CAM_OEs0_con_HjKm1DHhVq
openvidu-server_1 | [INFO] 2020-06-06 02:07:46,111 [0.0-5443-exec-5] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading recording ses_CGhaG3UnPI from 10.9.208.5
openvidu-server_1 | [INFO] 2020-06-06 02:07:46,116 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading file from http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_NuEP_con_Wr6ULhmSdJ.webm
openvidu-server_1 | [INFO] 2020-06-06 02:07:46,116 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading file from http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_OEs0_con_HjKm1DHhVq.webm
openvidu-server_1 | [INFO] 2020-06-06 02:07:46,136 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - File http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_OEs0_con_HjKm1DHhVq.webm is
0 KB in size
openvidu-server_1 | [INFO] 2020-06-06 02:07:46,136 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - File http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_NuEP_con_Wr6ULhmSdJ.webm is
0 KB in size
openvidu-server_1 | [ERROR] 2020-06-06 02:07:46,136 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /ovrecordings/ses_CGhaG3UnPI/str_CAM_NuEP_con_Wr6ULhmSdJ.webm: http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_NuEP_con_Wr6ULhmSdJ.webm
openvidu-server_1 | [ERROR] 2020-06-06 02:07:46,136 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /ovrecordings/ses_CGhaG3UnPI/str_CAM_OEs0_con_HjKm1DHhVq.webm: http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_OEs0_con_HjKm1DHhVq.webm
openvidu-server_1 | [ERROR] 2020-06-06 02:07:46,136 [Thread-10] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_NuEP_con_Wr6ULhmSdJ.webm
openvidu-server_1 | [ERROR] 2020-06-06 02:07:46,136 [Thread-11] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - http://10.9.208.5/recordings/ses_CGhaG3UnPI/str_CAM_OEs0_con_HjKm1DHhVq.webm

OpenVidu PRO 2.14.0 is not working with custom recording path. So we changed the recording path in .env to default value (/opt/openvidu/recordings) and created symlink to our NFS and it works now.

ln -s /storage/openvidu/recordings /opt/openvidu/recordings

Now recordings are stored in NFS Path /storage/openvidu/recordings

Thanks a lot for your support