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

SRT Provider fails to bind IPv6 in 0.15.10 #1241

Closed getroot closed 1 year ago

getroot commented 1 year ago

I believe i found the issue on my configuration:

<Server>
  <IP>*</IP>
  <IP>::</IP>
</Server>

I have to test it, it everything works fine, now.

no idea why it works on:

so change after everythink the following (with SRT and http-websocket) on v0.15.10 everything start up like expected:

<Server>
  <IP>*</IP>
</Server>

Originally posted by @genofire in https://github.com/AirenSoft/OvenMediaEngine/discussions/1095#discussioncomment-5897560

getroot commented 1 year ago

@genofire I have created a new issue. If you attach the logs of 0.15.9 and 0.15.10 it will help to solve the problem.

dimiden commented 1 year ago

To enable OME for both IPv4 and IPv6, socket creation, binding, and listening are performed for each respective socket family. To achieve this, the IPV6_V6ONLY option of the socket is used, and it works fine without any issues.

However, it seems that the SRTO_IPV6ONLY option, which is expected to perform the same function in SRT, is not functioning properly. Specifically, when this option is set and only an IPv4 address is used for listening, checking with netstat shows that it is bound only to the IPv4 address. Consequently, attempting to bind and listen on the same port with an IPv6 address results in an error, causing OME not to execute.

I have searched for possible solutions in the current version of SRT, which is 1.5.1, and previous versions, but I couldn't find an easy way to resolve this. Fortunately, it seems that this issue has been resolved in the latest version of SRT 1.5.2-rc.2. Therefore, I recommend updating the SRT_VERSION variable in prerequisites.sh from SRT_VERSION=1.5.1 to SRT_VERSION=1.5.2-rc.2 and executing prerequisites.sh again before compling OME.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dimiden commented 1 year ago

This issue has been confirmed to be resolved in SRT v1.5.2.

genofire commented 1 year ago

does ovenmediaengine use this SRT lib already?

dimiden commented 1 year ago

@genofire Yes, OvenMediaEngine has been using SRT v1.5.2 since version v0.15.14.