Stop recording REST API gives 500 error code

Hi
I am using Openvidu REST APIs for starting and stopping the recording. At my end I’m able to start the recording but when stopping, the API throws a 500 error and sends this as response: “The recording completion process couldn’t finish in 30 seconds. Code: 701”. But the recording is present in openvidu server. What am I doing wrong here ?
And by the way we are using Openvidu 2.23.0 : on premises

Is this happening to you in a prod environment?

This may happen if the container which starts is not able to access the session via DOMAIN_OR_PUBLIC_IP mostly because of hairpinning issues.

Does your server allow hairpinning?

You can also try with env variable OPENVIDU_RECORDING_COMPOSED_URL. Check this configuration parameter here: OpenVidu configuration - OpenVidu Docs

Try in CE:
OPENVIDU_RECORDING_COMPOSED_URL=https://<PRIVATE_IP_OV>/dashboard
or in PRO:
OPENVIDU_RECORDING_COMPOSED_URL=https://<PRIVATE_IP_OV>/inspector