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.59k stars 1.06k forks source link

Admission Webhook returns 404 #1045

Closed Thunder80 closed 1 year ago

Thunder80 commented 1 year ago

PROBLEM

Admission Webhooks return 404 but the endpoint works with other tools like Postman and cURL.

EXPECTATION

Should allow the stream to be published or subscribed.

ENVIRONMENTAL INFORMATION

SETUP INFORMATION AND LOGS I am providing the ovenmediaengine.log and Server.xml here

OTHER HELPFUL INFORMATION

Admission webhooks have worked for me in the past. But this time I am trying with AWS AppRunner and I am using a CNAME record to point the AWS URL to my custom domain, maybe that's causing issues?

Working curl request:

curl -H 'Content-Type: application/json' -d '{ "request":{"url": "rtmp://<DOMAIN>/app/<KEY>?policy=eyJ1cmxfZXhwaXJlIjoxODkzNDU2MDAwMDAwfQ&signature=9bzXfNUFgQfa9ryu7Sa9zi-aQlI"}}' -X POST https://<URL><api/utils/admission
getroot commented 1 year ago

Isn't your control server responding a 404? I guess you need to check your control server's logs to find out why it responds with a 404. Is there something OME is doing wrong with the request?

Thunder80 commented 1 year ago

The control server responds with 404 only in OME logs. With the same URL mentioned in the OME logs if you do a cURL request the control server responds correctly. So I am not sure what OME is doing with the request.

getroot commented 1 year ago

To analyze this problem, I think the only way I can test it with your control server url. If you can provide a URL, please send it to support@airensoft.com.

Thunder80 commented 1 year ago

Thanks, I have sent the details. Please let me know if something else is needed.

getroot commented 1 year ago

Your server actually responds with a 404 error.

200OK is returned when the HTTP Request Header is transmitted as follows.

Host: your-domain

However, it responds with 404 Not Found when passed as:

Host: your-domain:443

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host

Appending :Port to the value of the Host header is not out of specification. Try debugging this part.

Thunder80 commented 1 year ago

Thanks for pointing me in the right direction. I will investigate how to get it working.