# Stop recording REST API gives 500 error code

**URL:** <https://openvidu.discourse.group/t/stop-recording-rest-api-gives-500-error-code/4805>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [September 27, 2023, 9:49am UTC](https://openvidu.discourse.group/t/stop-recording-rest-api-gives-500-error-code/4805 "2023-09-27T09:49:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobinSylvester](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@RobinSylvester](https://openvidu.discourse.group/u/RobinSylvester)\
**Post date:** [September 27, 2023, 9:49am UTC](https://openvidu.discourse.group/t/stop-recording-rest-api-gives-500-error-code/4805/1 "2023-09-27T09:49:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 18, 2023, 10:55pm UTC](https://openvidu.discourse.group/t/stop-recording-rest-api-gives-500-error-code/4805/2 "2023-10-18T22:55:14Z")

</div>

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](https://docs.openvidu.io/en/2.28.0/reference-docs/openvidu-config/)

Try in CE:  
OPENVIDU\_RECORDING\_COMPOSED\_URL=https://\<PRIVATE\_IP\_OV\>/dashboard  
or in PRO:  
OPENVIDU\_RECORDING\_COMPOSED\_URL=https://\<PRIVATE\_IP\_OV\>/inspector
