Assistance Required with Recording Download

Description:

I have deployed an OpenVidu single node server on-premises, which is running and accessible via https://domain1.com. I also deployed an application server to manage tokens, webhooks, and recordings on a different domain, https://domain2.com.

Current Setup

  • OpenVidu Server:

    URL: https://domain1.com
    
  • Application Server:

    URL: https://domain2.com
    
  • Webhooks:

    Webhook URL: Configured in `livekit.yaml` to point to `https://domain2.com`
    Webhooks are being successfully received at `domain2.com`.
    

Issue:

I am trying to download recordings from the application server when the egress_ended event is triggered. However, I am encountering issues with accessing the recordings due to endpoint configuration problems.

Endpoints in env and logs:

  • MinIO: http://localhost:9000
  • S3: http://localhost:9100

These services are running on domain1, but I am attempting to download recordings from domain2.

Problems Encountered:

  • Access Denied: I tried downloading directly from the S3 link, but I received an “Access Denied” error.
  • Endpoint Confusion: I am unsure about the correct endpoint configuration for accessing the openvidu bucket using either MinIO or S3 SDK from domain2.

Could you please assist with downloading the recording?

Thank you in advance for your assistance.

Running the application server on the same instance but on a different port is the only option or is there any other way to download the recording?

I think you should need pre sign the url for having access to the file

I attempted to create a presigned URL for Amazon S3 but encountered the following errors:

1. Initial Error:

<Error>
<Code>AuthorizationQueryParametersError</Code>
<Message>Error parsing the X-Amz-Credential parameter; the region 'us-east-1' is wrong; expecting 'us-east-2'</Message>
<Region>us-east-2</Region>
<RequestId>4HEX3NRFADJDTFNX</RequestId>
<HostId>YAcnSZJidLs63I8MrFP2zY4XXWNzDwcu6jTy5DJc+Ask+TCwzNeIlP0Lypv/sXHqXoLt4rtk/a8=</HostId>
</Error>

Although the region was specified as us-east-1 in Docker, I also tried us-east-2, but received the following error:

2. Subsequent Error

<Error>
<Code>InvalidAccessKeyId</Code>
<Message>The AWS Access Key Id you provided does not exist in our records.</Message>
<AWSAccessKeyId><MY_CALL_S3_ACCESS_KEY></AWSAccessKeyId>. //Access key mentioned in the .env
<RequestId>ASEY1G5AV2GSJ0X9</RequestId>
<HostId>oFwZQKVdPbes/+DwrIVoR2zPPQQGf8GOstD83iWyjKadOfPeUbpQw38DCnWUaLKvTjYqKtXWX88=</HostId>
</Error>

The actual URL to my file is:

https://openvidu.s3.amazonaws.com/recordings/pMIAhZY71gNInLGpL3ii/1723019617.ogg

Any insights on fixing this would be appreciated.

Thanks.

This URL will not work because it points to an S3 bucket in AWS rather than to your deployment.

You need to modify the URL to access the Minio instance deployed in OpenVidu.

If you want Minio to be publicly accessible, you need to open port 9000. Once the port is open, you can access your files via https://<your-domain>:9000/.

  • Endpoint Confusion: I am unsure about the correct endpoint configuration for accessing the OpenVidu bucket using either MinIO or the S3 SDK from domain2.

I understand the confusion. The egress service generates a URL pointing to S3, but this is not the actual Minio S3 URL. Currently, you need to determine the appropriate URL manually.

Thanks for responding.

Got it! I have one more follow-up question.

If I run the application server on the same instance but on a different port, I’ll be able to download the file directly from localhost, right?

If I run the application server on the same instance but on a different port, I’ll be able to download the file directly from localhost, right?

If your application server is running on the same machine as Minio, and it can access http://localhost:9000, it should work without any issues.

1 Like