Issue with Recording After Upgrade to 2.15.1

I upgraded to 2.15.1 and now there appears to be an API issue with recording:

API Response (reprodused using latest openvidu-recording-java github as well as our customized frontend):

Start recording WRONG: HTTP 400 (500)

Application log:

Getting sessionId and token | {sessionName}={“sessionName”:“SessionB”}
New session SessionB
2020-07-13 20:05:06.477 INFO 20720 — [nio-5051-exec-3] io.openvidu.java.client.Session : Session ‘ses_JS1bEOFQlR’ created
2020-07-13 20:05:06.559 INFO 20720 — [nio-5051-exec-3] io.openvidu.java.client.Session : Returning a TOKEN: wss://host?sessionId=ses_JS1bEOFQlR&token=tok_GfRlCX4fZsWhaXdU&role=PUBLISHER&version=2.15.0&coturnIp=x.x.x.x&turnUsername=5P4N45&turnCredential=uoapvi&webrtcStatsInterval=30
Starting recording for session ses_JS1bEOFQlR with properties {outputMode=INDIVIDUAL, hasAudio=true, hasVideo=true}
Removing user | {sessionName, token}={“sessionName”:“SessionB”,“token”:“wss://host?sessionId=ses_JS1bEOFQlR&token=tok_GfRlCX4fZsWhaXdU&role=PUBLISHER&version=2.15.0&coturnIp=x.x.x.x&turnUsername=5P4N45&turnCredential=uoapvi&webrtcStatsInterval=30”}

It does not occur on all sessions, only some:

openvidu-server_1 | [ERROR] 2020-07-13 18:20:42,901 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Error waiting for some recorder endpoint to start in session ses_P8XAorE3bh
openvidu-server_1 | [ERROR] 2020-07-13 18:20:42,902 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.RecordingService - Recording start failed for session ses_P8XAorE3bh: Couldn’t initialize some RecorderEndpoint
openvidu-server_1 | [ERROR] 2020-07-13 18:20:42,903 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.utils.CustomFileManager - Couldn’t overwrite file /opt/openvidu/recordings/ses_P8XAorE3bh/.recording.ses_P8XAorE3bh. Error: /opt/openvidu/recordings/ses_P8XAorE3bh/.recording.ses_P8XAorE3bh (No such file or directory)
openvidu-server_1 | [INFO] 2020-07-13 18:20:42,903 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping individual (video+audio) recording ses_P8XAorE3bh of session ses_P8XAorE3bh. Reason: null
openvidu-server_1 | [INFO] 2020-07-13 18:20:42,903 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Stopping single stream recorder for stream str_CAM_LwlF_con_PcZCZsnVdR in session ses_P8XAorE3bh
openvidu-server_1 | [ERROR] 2020-07-13 18:20:47,908 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.recording.service.SingleStreamRecordingService - Error waiting for some recorder endpoint to stop in session ses_P8XAorE3bh
openvidu-server_1 | [INFO] 2020-07-13 18:20:47,911 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading recording ses_P8XAorE3bh from mediaserver.ip
openvidu-server_1 | [INFO] 2020-07-13 18:20:47,917 [Thread-13] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Downloading file from http://mediaserver.ip:3000/media-node/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm
openvidu-server_1 | [INFO] 2020-07-13 18:20:47,920 [Thread-13] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - File http://mediaserver.ip:3000/media-node/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm is 0 KB in size
openvidu-server_1 | [ERROR] 2020-07-13 18:20:47,921 [Thread-13] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /opt/openvidu/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm: /opt/openvidu/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm (No such file or directory)
openvidu-server_1 | [ERROR] 2020-07-13 18:20:47,922 [Thread-13] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - /opt/openvidu/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm (No such file or directory)

Thank you for reporting. We will take a look in the next days.

I have the same problem with COMPOSED recording but the INDIVIDUAL works as normal.
“openvidu-server_1 | [ERROR] 2020-07-13 18:20:47,921 [Thread-13] io.openvidu.server.pro.recording.RecordingKmsHttpDownloader - Cannot create a FileOutputStream to file /opt/openvidu/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm: /opt/openvidu/recordings/ses_P8XAorE3bh/str_CAM_LwlF_con_PcZCZsnVdR.webm (No such file or directory)”

did you have a way to solve this problem?

Thank you

Hello @Yohaeg

Did you tried with a fresh deployment installation?

I’m trying the docker image you use for the development use and I tried it on 2 different OS.
Windows 11 and ubuntu server 20.04

Should I skip using your development docker image?

Thank you

But where do you have the problem? While developping or in production?

While developing In ubuntu you should not have any problem if you use:

docker run -p 4443:4443 --rm \
    -e OPENVIDU_SECRET=MY_SECRET \
    -e OPENVIDU_RECORDING=true \
    -e OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v /opt/openvidu/recordings:/opt/openvidu/recordings \
openvidu/openvidu-server-kms:2.21.0

While developing I didn’t go to production yet.
It’s the same what i use only i changed the folder mounted folder because i got don’t have permission when i use “/opt/openvidu/recordings”

docker run -p 4443:4443 --rm \
-e OPENVIDU_SECRET=MY_SECRET \
-e DOMAIN_OR_PUBLIC_IP=192.168.1.80 \
-e OPENVIDU_RECORDING=true \
-e OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/username/recordings:/opt/openvidu/recordings \
openvidu/openvidu-server-kms:2.21.0

I also tried to do it on AWS using your documentation and still get the same problem “Start recording WRONG: HTTP 400 (501)”
any update about this problem?

Make sure to use the same version of the tutorial and the deployment. Also check the 400 error, maybe the log has something to say :slight_smile:

Always check the logs.