AirenSoft / OvenMediaEngine

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

Cannot Playback WebRTC Stream "An error occurred while resolve DNS for host" #186

Closed banagale closed 4 years ago

banagale commented 4 years ago

Describe the bug I set up a docker instance and am able to stream to the endpoint.

However, I am unable to view the resulting stream.

A variety of errors are presented in the docker logs

To Reproduce Steps to reproduce the behavior:

  1. Create VPS instance
  2. Run docker container using instructions
  3. Use OBS to stream to rtmp://...
  4. Load correct ws://.. into OvenPlayer HTTP Test Stream page:
  5. Click Load Player
  6. Player does not play video, errors appear in docker logs

Expected behavior Should play the live stream

Logs [2020-08-31 23:49:37.694] I 1 Config | config_manager.cpp:144 | Trying to set logfile in directory... (/var/log/ovenmediaengine) [2020-08-31 23:49:37.695] I 1 Config | config_manager.cpp:47 | Trying to load configurations... (origin_conf/Server.xml) [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:244 | OvenMediaEngine v0.10.7 is started on [608490cefb51] (Linux x86_64 - 5.4.0-42-generic, #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020) [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:246 | With modules: [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:247 | FFmpeg 3.4.7 OME [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:248 | Configuration: --prefix=/opt/ovenmediaengine --enable-gpl --enable-nonfree --extra-cflags=-I/opt/ovenmediaengine/include --extra-ldflags='-L/opt/ovenmediaengine/lib -Wl,-rpath,/opt/ovenmediaengine/lib' --extra-libs=-ldl --enable-shared --disable-static --disable-debug --disable-doc --disable-programs --disable-avdevice --disable-dct --disable-dwt --disable-error-resilience --disable-lsp --disable-lzo --disable-rdft --disable-faan --disable-pixelutils --disable-everything --enable-zlib --enable-libopus --enable-libvpx --enable-libfdk_aac --enable-libx264 --enable-encoder='libvpx_vp8,libvpx_vp9,libopus,libfdk_aac,libx264' --enable-decoder='aac,aac_latm,aac_fixed,h264' --enable-parser='aac,aac_latm,aac_fixed,h264' --enable-network --enable-protocol=tcp --enable-protocol=udp --enable-protocol=rtp --enable-demuxer=rtsp --enable-filter='asetnsamples,aresample,aformat,channelmap,channelsplit,scale,transpose,fps,settb,asettb' [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:249 | libavformat: 57.83.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:250 | libavcodec: 57.107.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:251 | libavutil: 55.78.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:252 | libavfilter: 6.107.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:253 | libswresample: 2.9.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:254 | libswscale: 4.8.100 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:255 | SRT: 1.3.3 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:256 | SRTP: libsrtp2 2.2.0 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:257 | OpenSSL: OpenSSL 1.1.0g 2 Nov 2017 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:258 | Configuration: compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/opt/ovenmediaengine\"" -DENGINESDIR="\"/opt/ovenmediaengine/lib/engines-1.1\"" -Wa,--noexecstack [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:259 | JsonCpp: 1.9.3 [2020-08-31 23:49:37.698] I 1 OvenMediaEngine | main.cpp:260 | jemalloc: 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 [2020-08-31 23:49:37.706] I 1 OvenMediaEngine | main.cpp:158 | Trying to create a MediaRouter module [2020-08-31 23:49:37.707] I 1 MediaRouter | media_router.cpp:40 | MediaRouter has been started. [2020-08-31 23:49:37.707] I 1 OvenMediaEngine | main.cpp:161 | Trying to create a WebRTC Publisher module [2020-08-31 23:49:37.707] I 1 Signalling.P2P | rtc_p2p_manager.cpp:27 | P2P is disabled in the configuration [2020-08-31 23:49:37.709] I 1 Ice | ice_port.cpp:89 | ICE port is bound to 0.0.0.0:10006/UDP (0x7f4afb25ea10) [2020-08-31 23:49:37.709] I 1 Ice | ice_port.cpp:89 | ICE port is bound to 0.0.0.0:10007/UDP (0x7f4afb25ebd0) [2020-08-31 23:49:37.709] I 1 Ice | ice_port.cpp:89 | ICE port is bound to 0.0.0.0:10008/UDP (0x7f4afb25ed90) [2020-08-31 23:49:37.709] I 1 Ice | ice_port.cpp:89 | ICE port is bound to 0.0.0.0:10009/UDP (0x7f4afb25ef50) [2020-08-31 23:49:37.709] I 1 Ice | ice_port.cpp:89 | ICE port is bound to 0.0.0.0:10010/UDP (0x7f4afb25f110) [2020-08-31 23:49:37.710] I 1 WebRTC | webrtc_publisher.cpp:91 | WebRTC Publisher is listening on 0.0.0.0:3333... [2020-08-31 23:49:37.711] I 1 Publisher | publisher.cpp:18 | WebRTC Publisher has been started. [2020-08-31 23:49:37.711] I 1 OvenMediaEngine | main.cpp:162 | Trying to create a HLS Publisher module [2020-08-31 23:49:37.712] I 1 HTTPPublisher | segment_publisher.cpp:62 | HLS Publisher is listening on 0.0.0.0:8080... [2020-08-31 23:49:37.712] I 1 Publisher | publisher.cpp:18 | HLS Publisher has been started. [2020-08-31 23:49:37.712] I 1 OvenMediaEngine | main.cpp:163 | Trying to create a MPEG-DASH Publisher module [2020-08-31 23:49:37.712] I 1 HTTPPublisher | segment_publisher.cpp:62 | DASH Publisher is listening on 0.0.0.0:8080... [2020-08-31 23:49:37.712] I 1 Publisher | publisher.cpp:18 | DASH Publisher has been started. [2020-08-31 23:49:37.712] I 1 OvenMediaEngine | main.cpp:164 | Trying to create a Low-Latency MPEG-DASH Publisher module [2020-08-31 23:49:37.713] I 1 HTTPPublisher | segment_publisher.cpp:62 | LLDASH Publisher is listening on 0.0.0.0:8080... [2020-08-31 23:49:37.713] I 1 Publisher | publisher.cpp:18 | LLDASH Publisher has been started. [2020-08-31 23:49:37.713] I 1 OvenMediaEngine | main.cpp:165 | Trying to create a OVT Publisher module [2020-08-31 23:49:37.714] I 1 OVT | ovt_publisher.cpp:50 | OVTPublisher is listening on 0.0.0.0:9000 [2020-08-31 23:49:37.714] I 1 Publisher | publisher.cpp:18 | OVTPublisher has been started. [2020-08-31 23:49:37.714] I 1 OvenMediaEngine | main.cpp:168 | Trying to create a Transcoder module [2020-08-31 23:49:37.714] I 1 Transcoder | transcoder.cpp:38 | Transcoder has been started. [2020-08-31 23:49:37.714] I 1 OvenMediaEngine | main.cpp:171 | Trying to create a MPEG-TS Provider module [2020-08-31 23:49:37.714] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4000 for [#default#app/stream_4000] [2020-08-31 23:49:37.714] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4001 for [#default#app/stream_4001] [2020-08-31 23:49:37.715] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4002 for [#default#app/stream_4002] [2020-08-31 23:49:37.715] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4003 for [#default#app/stream_4003] [2020-08-31 23:49:37.715] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4004 for [#default#app/stream_4004] [2020-08-31 23:49:37.715] I 1 MpegtsProvider | mpegts_provider.cpp:161 | MpegtsProvider is listening on 0.0.0.0:4005 for [#default#app/stream_4005] [2020-08-31 23:49:37.715] I 1 Provider | provider.cpp:35 | MpegtsProvider has been started. [2020-08-31 23:49:37.715] I 1 OvenMediaEngine | main.cpp:172 | Trying to create a RTMP Provider module [2020-08-31 23:49:37.716] I 1 Provider | provider.cpp:35 | RtmpProvider has been started. [2020-08-31 23:49:37.716] I 1 OvenMediaEngine | main.cpp:173 | Trying to create a OVT Provider module [2020-08-31 23:49:37.716] I 1 Provider | provider.cpp:35 | OvtProvider has been started. [2020-08-31 23:49:37.716] I 1 OvenMediaEngine | main.cpp:174 | Trying to create a RTSPC Provider module [2020-08-31 23:49:37.716] I 1 Provider | provider.cpp:35 | RtspcProvider has been started. [2020-08-31 23:49:37.716] I 1 OvenMediaEngine | main.cpp:177 | All modules are initialized successfully [2020-08-31 23:49:37.716] I 1 Monitor | monitoring.cpp:43 | Create HostMetrics(default) for monitoring [2020-08-31 23:49:37.717] I 1 Orchestrator | orchestrator.cpp:862 | Trying to create an application: [#default#app] [2020-08-31 23:49:37.717] I 1 Monitor | host_metrics.cpp:52 | Create ApplicationMetrics(#default#app) for monitoring [2020-08-31 23:49:37.717] I 1 MediaRouter.App | media_router_application.cpp:32 | Created media route application. application id(0), (#default#app) [2020-08-31 23:49:37.717] I 1 MediaRouter | media_router.cpp:70 | MediaRouter has created [#default#app] application [2020-08-31 23:49:37.717] I 1 Publisher | application.cpp:55 | WebRTC Publisher Application has created [#default#app] application [2020-08-31 23:49:37.718] I 1 Publisher | application.cpp:55 | HLS Publisher Application has created [#default#app] application [2020-08-31 23:49:37.718] I 1 Publisher | application.cpp:55 | DASH Publisher Application has created [#default#app] application [2020-08-31 23:49:37.718] I 1 Publisher | application.cpp:55 | LLDASH Publisher Application has created [#default#app] application [2020-08-31 23:49:37.718] I 1 Publisher | application.cpp:55 | OVTPublisher Application has created [#default#app] application [2020-08-31 23:49:37.718] I 1 Transcoder | transcoder.cpp:73 | Transcoder has created [config][#default#app] application [2020-08-31 23:49:37.718] I 1 Provider | application.cpp:46 | MpegtsProvider has created [#default#app] application [2020-08-31 23:49:37.719] I 1 Provider | application.cpp:46 | RtmpProvider has created [#default#app] application [2020-08-31 23:49:37.719] I 1 Provider | application.cpp:46 | OvtProvider has created [#default#app] application [2020-08-31 23:49:37.719] I 1 Provider | application.cpp:46 | RtspcProvider has created [#default#app] application [2020-08-31 23:49:41.245] I 10 Signalling | rtc_signalling_server.cpp:99 | New client is connected: <ClientSocket: 0x7f4afb24dc90, #34, state: 4, TCP, x.x.x.x:51523> [2020-08-31 23:49:41.341] E 10 Orchestrator | orchestrator.cpp:1230 | Could not find Origin for the stream: [#default#app/stream] [2020-08-31 23:49:41.341] E 10 Signalling | rtc_signalling_server.cpp:190 | Cannot find stream [#default#app/stream] [2020-08-31 23:49:41.341] I 10 Signalling | rtc_signalling_server.cpp:237 | Client is disconnected: <WebSocketClient: 0x7f4afb3b65d0, <ClientSocket: 0x7f4afb24dc90, #34, state: 4, TCP, x.x.x.x:51523>> (#default#app / stream, ufrag: local: (N/A), remote: (N/A)) [2020-08-31 23:49:44.018] I 103 Provider | stream.cpp:49 | Unknown/(34) has been started stream [2020-08-31 23:49:44.018] I 103 RtmpProvider | rtmp_provider.cpp:93 | A RTMP client has connected from 34 - <ClientSocket: 0x7f4afb3e8c90, #34, state: 4, TCP, x.x.x.x:51525> [2020-08-31 23:49:44.891] I 89 MediaRouter.App | media_router_application.cpp:205 | Trying to create a stream: [#default#app/stream(34)] [2020-08-31 23:49:44.891] I 89 Monitor | stream.cpp:254 | [Stream Info] id(34), name(stream), SourceType(Rtmp), Created Time (Thu Jan 1 00:00:00 1970)

Video Track #0: Bypass(false) Bitrate(2.50Mb) codec(1, avc) resolution(1920x1080) framerate(60.00fps) timebase(1/90000)
Audio Track #1: Bypass(false) Bitrate(160.00Kb) codec(5, aac) samplerate(44.1K) format(s16, 16) channel(stereo, 2) timebase(1/44100)

[2020-08-31 23:49:44.891] I 89 Monitor | application_metrics.cpp:56 | Create StreamMetrics(stream) for monitoring [2020-08-31 23:49:44.891] I 89 TranscodeStream | transcode_stream.cpp:455 | [#default#app/stream(34)] -> [#default#app/stream(1017358020)] Transcoder output stream has been created. [2020-08-31 23:49:44.893] I 89 MediaRouter.App | media_router_application.cpp:205 | Trying to create a stream: [#default#app/stream(1017358020)] [2020-08-31 23:49:44.894] I 89 Monitor | stream.cpp:254 | [Stream Info] id(1017358020), name(stream), SourceType(Transcoder), Created Time (Mon Aug 31 23:49:44 2020)

Origin Stream Info id(34), name(stream), SourceType(Rtmp), Created Time (Thu Jan 1 00:00:00 1970)

Video Track #0: Bypass(true) Bitrate(2.50Mb) codec(1, avc) resolution(1920x1080) framerate(60.00fps) timebase(1/90000)
Audio Track #1: Bypass(true) Bitrate(160.00Kb) codec(5, aac) samplerate(44.1K) format(s16, 16) channel(stereo, 2) timebase(1/44100)
Audio Track #2: Bypass(false) Bitrate(128.00Kb) codec(7, opus) samplerate(48.0K) format(s16, 16) channel(stereo, 2) timebase(1/48000)

[2020-08-31 23:49:44.894] I 89 Monitor | application_metrics.cpp:56 | Create StreamMetrics(stream) for monitoring [2020-08-31 23:49:44.894] I 89 WebRTC | rtc_stream.cpp:181 | Unsupported codec(Audio/AAC) is being input from media track [2020-08-31 23:49:44.894] I 89 Publisher | stream.cpp:211 | WebRTC Publisher Application application has started [stream(1017358020)] stream [2020-08-31 23:49:44.894] I 89 Publisher | stream.cpp:211 | HLS Publisher Application application has started [stream(1017358020)] stream [2020-08-31 23:49:44.894] I 89 Publisher | stream.cpp:211 | DASH Publisher Application application has started [stream(1017358020)] stream [2020-08-31 23:49:44.895] I 89 Publisher | stream.cpp:211 | LLDASH Publisher Application application has started [stream(1017358020)] stream [2020-08-31 23:49:44.895] I 89 Publisher | stream.cpp:211 | OVTPublisher Application application has started [stream(1017358020)] stream [2020-08-31 23:49:44.895] I 89 TranscodeStream | transcode_stream.cpp:115 | [#default#app/stream(34)] Transcoder input stream has been started. Status : (1) Decoders, (1) Encoders [2020-08-31 23:49:44.990] I 110 TranscodeCodec | transcode_codec_dec_aac.cpp:49 | [#default#app/stream(34)] input stream information: [audio] aac (LC), 44100 Hz, stereo, fltp, 122 kbps, timebase: 1/44100, frame_size: 1024 [2020-08-31 23:49:47.589] I 12 Signalling | rtc_signalling_server.cpp:99 | New client is connected: <ClientSocket: 0x7f4afb24dc90, #36, state: 4, TCP, x.x.x.x:51528> [2020-08-31 23:49:47.002] I 12 Monitor | stream_metrics.cpp:119 | A new session has started playing #default#app/stream on the WebRTC publihser. WebRTC(1)/Stream total(1)/App total(1) [2020-08-31 23:49:48.004] W 12 Socket | socket_address.cpp:277 | An error occurred while resolve DNS for host [90f50fed-c5bb-4bfc-8aa2-a4ed22e097a4.local] [2020-08-31 23:49:48.004] W 12 Socket | socket_address.cpp:84 | An error occurred: 90f50fed-c5bb-4bfc-8aa2-a4ed22e097a4.local:53436 [2020-08-31 23:49:52.192] I 108 DASH | dash_packetizer.cpp:956 | [0x7f4afb384510] LLDASH segment is ready to stream [#default#app/stream], segment duration: 5.000000s, count: 1 [2020-08-31 23:49:59.062] I 107 DASH | dash_packetizer.cpp:956 | [0x7f4afb384210] DASH segment is ready to stream [#default#app/stream], segment duration: 5.000000s, count: 3 [2020-08-31 23:50:04.307] I 106 HLS | hls_packetizer.cpp:292 | HLS segment is ready for stream [#default#app/stream], segment duration: 5.000000s, count: 3 [2020-08-31 23:50:18.713] I 25 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)] [2020-08-31 23:50:18.713] E 25 Publisher | stream.cpp:107 | Cannot find session : 101 [2020-08-31 23:50:18.714] E 25 WebRTC | webrtc_publisher.cpp:357 | To stop session failed. Cannot find session by peer sdp session id (101) [2020-08-31 23:50:18.715] I 25 Signalling | rtc_signalling_server.cpp:237 | Client is disconnected: <WebSocketClient: 0x7f4ac4b6d4f0, <ClientSocket: 0x7f4afb24dc90, #36, state: 4, TCP, x.x.x.x:51528>> (#default#app / stream, ufrag: local: 92Z7NH, remote: n6XW) [2020-08-31 23:50:21.398] I 12 Signalling | rtc_signalling_server.cpp:99 | New client is connected: <ClientSocket: 0x7f4afb24dc90, #36, state: 4, TCP, x.x.x.x:51548> [2020-08-31 23:50:21.710] I 12 Monitor | stream_metrics.cpp:119 | A new session has started playing #default#app/stream on the WebRTC publihser. WebRTC(1)/Stream total(1)/App total(1) [2020-08-31 23:50:21.713] W 12 Socket | socket_address.cpp:277 | An error occurred while resolve DNS for host [90f50fed-c5bb-4bfc-8aa2-a4ed22e097a4.local] [2020-08-31 23:50:21.714] W 12 Socket | socket_address.cpp:84 | An error occurred: 90f50fed-c5bb-4bfc-8aa2-a4ed22e097a4.local:50339

....

Server (please complete the following information):

Player (please complete the following information):

Additional context Add any other context about the problem here.

getroot commented 4 years ago

"An error occurred while resolve DNS for host" is not an error message. This is a warning related to IPV6 and does not cause playback to fail.

I can't find in the logs specifically what causes playback to fail. Please tell me the Docker execution command and OBS options. Maybe UDP packets didn't reach the player, or maybe the encoding option in OBS isn't supported by iOS.

banagale commented 4 years ago

Thanks for this feedback. I was not able to determine the issue here.  I went ahead and set up SSL on both the OME server I built and on a server to test the ovenplayer. I've made some progress and this issue is no longer affecting me.

naanlizard commented 3 years ago

I'd like to reopen this, I'm having the same problem, regardless of whether SSL is enabled or not.

Here are the relevant configuration files

Server.xml.txt docker-compose.yml.txt Dockerfile.txt

Docker should punch a hole in the firewall for me for each of the ports listed I believe, and just in case I've also allowed all of them via ufw.

OBS settings are as follows (and they work for local-network testing WebRTC), ll-dash plays fine, webRTC won't connect.

https://i.imgur.com/iMs591L.png

I've also tried baseline profile, since supposedly that is required, no change.

getroot commented 3 years ago

Your Server.xml uses 10006-10010/udp, but your docker-compose opened port 10000-10005/udp. Perhaps this is the cause of the problem.

naanlizard commented 3 years ago

Ah, I'm a fool, that fixed it.

Thank you @getroot - I don't believe I changed the ports in the Server.xml (copied from a default docker install), and the docker compose is made from a docker run command I got from here - https://airensoft.gitbook.io/ovenmediaengine/getting-started

So I suspect that one of the two needs to change.

getroot commented 3 years ago

I understood that the document confuses you. I will be updating that document soon. Thank you.