AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://airensoft.com/ome.html
GNU Affero General Public License v3.0
2.61k stars 1.06k forks source link

OvenMediaEngine Ec2 instance with docker behind Network/Application Load Balancer #1499

Closed ditogam closed 10 months ago

ditogam commented 10 months ago

I'm trying to run OvenMediaEngine on Ec2 instance uname -a Linux ip-10-0-105-140 6.2.0-1017-aws #17~22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy with docker command docker run -e OME_VIDEO_BITRATE=2000000 -e OME_VIDEO_WIDTH=1280 -e OME_VIDEO_HEIGHT=720 -p 1935:1935 -p 3333:3333 -p 9999:9999/udp -p 8080:8080 -p 8081:8081 -p 9000:9000/udp -p 10000-10005:10000-10005/udp airensoft/ovenmediaengine:0.16.3

Additionally installed apache2 on this server to make health check on it (not to mix this traffic with OvenMediaEngine)

Created 5 target groups:

imageEach target group has corresponding TCP or UDP port, wich redirect traffic to EC2 instance, all health checks are passed (healthcheck is running against apache2 server)

Created Network ALB and registered it to Route53 with domain name test-develop.ove.xxxxx.io, issued public certificate for this domain and assigned TLS port 443 to forward traffic to target group tg3333 image

I published SRT stream with OBS (Version 30.0.0) from linux with stream (also with gstreamer, the same result)

srt://test-develop.ove.xxxxx.io:9999?streamid=srt%3A%2F%2Ftest-develop.ove.xxxxx.io%3A9999%2Fapp%2FtestStream

and it successfully published stream opened https://demo.ovenplayer.com/ and provided wss://test-develop.ove.xxxxx.io/app/testStream as a source https://demo.ovenplayer.com/ Here is logs from docker output

OVE.log

Seams to me everything works, traffic is delivered to ECT, but no stream

I tried to use Application LoadBalancer with HTTPS Listeners to forward traffic to trarget group with HTTP port 3333, but the same result

I did nearly the same on my PC, I have public/static IP address, registered it on Route53 with domain name, issued LetsEncript certificate, installed on apache http server with loadbalancing rules, docker with the same command was running on my pc


<Proxy balancer://ovswsbalancer>
    BalancerMember ws://localhost:3333 route=jvm1
    ProxySet lbmethod=byrequests stickysession=JSESSIONID
</Proxy>

ProxyPass /ovswss balancer://ovswsbalancer stickysession=JSESSIONID
ProxyPassReverse /ovswss balancer://ovswsbalancer stickysession=JSESSIONID

and I successfully managed to play srt stream with command wss://myhome.xxxxx.io/ovswss/app/testStream

Can you help me to resolve this issue, I want to use certificate from AWS,

Thank you in advanced

ditogam commented 10 months ago

the problem was not exposing port 3478