我按照以下步骤在 AWS EC2 实例中安装 Anbox Cloud Appliancehttps://anbox-cloud.io/docs/howto/install-appliance/aws
我还使用 CLI 创建了一个 Android 应用程序的映像,amc
该映像似乎按预期工作。当我尝试使用 Anbox 仪表板 (https://anbox-cloud.io/docs/tut/getting-started-dashboard) 在桌面 Chrome 中加载时,我遇到了“Anbox 流失败错误:丢失 WebRTC 连接”问题。尝试使用 Firefox 通过仪表板创建会话时,错误为“Anbox 流失败错误:无法通过 ICE 建立 WebRTC 连接”。
相关容器日志表明我的浏览器无法解析ICE候选主机名。
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.849372 209 streaming_server.cpp:977] Starting streaming server
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.849406 209 streaming_server.cpp:981] Not connected to supervisor yet, create a connection now
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.851109 209 streaming_server.cpp:990] Connecting to supervisor on wss://240.47.37.26:8082/1.0/sessions/cbmrf0ijdsav5meisn7g/supervisor/socket
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.851416 200 platform.cpp:574] Unhandled anbox event type: 1
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.852012 209 telegraf_backend.cpp:115] Using telegraf server at 192.168.100.1:8095
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox[122]: WiFi support is enabled
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.852174 209 streaming_server.cpp:1171] Creating a new peer connection
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.852226 209 streaming_server.cpp:1217] Using playout delay of min 0ms and max 0ms
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (webrtc_voice_engine.cc:606): Typing detection is requested, but unsupported.
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.855966 209 peer_connection.cpp:168] Using the following STUN/TURN servers:
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.855988 209 peer_connection.cpp:171] stun:3.87.49.14:5349
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.855994 209 peer_connection.cpp:171] turn:3.87.49.14:5349
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox[93]: Cannot apply override for /proc/sys/kernel/sched_tunable_scaling as file doesn't exist
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox[93]: Cannot apply override for /proc/sys/kernel/sched_latency_ns as file doesn't exist
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox[93]: Cannot apply override for /proc/sys/kernel/sched_wakeup_granularity_ns as file doesn't exist
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.860172 209 peer_connection.cpp:235] Setting bitrate allocation constraints: start 7999 Kbit/s max 12122 Kbit/s min 3876 Kbit/s
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.860320 209 peer_connection.cpp:819] Set audio recording to 0
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.860556 209 peer_connection.cpp:815] Set audio playout to 0
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.861711 209 streaming_server.cpp:1283] Everything is setup, ready to stream
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.861748 209 streaming_server.cpp:1097] Idle timer is disabled by configuration
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.861861 209 streaming_server.cpp:1047] Connecting to signaling server at wss://ec2-3-87-49-14.compute-1.amazonaws.com/1.0/sessions/cbmrf0ijdsav5meisn7g/sockets/master/
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.920591 209 libsoup_websocket_client.cpp:52] Successfully connected to websocket
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.920862 209 streaming_server.cpp:1373] Connected to supervisor
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.957854 209 libsoup_websocket_client.cpp:52] Successfully connected to websocket
Aug 06 00:36:23 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:23.957893 209 streaming_server.cpp:749] Successfully connected to signaling server
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (webrtc_media_engine.cc:151): Unsupported RTP extension: {uri: urn:ietf:params:rtp-hdrext:csrc-audio-level, id: 2}
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:24.599524 218 peer_connection.cpp:732] New stream {e6b5a213-ccbf-4748-ba41-e962f995847a} added
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (audio_send_stream.cc:870): Config is invalid: min_bitrate_bps=-1; max_bitrate_bps=-1; both expected greater or equal to 0
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:24.680258 217 external_audio_device_module.cpp:146] Initializing playout (channels 2 freq 48000Hz)
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (webrtc_voice_engine.cc:606): Typing detection is requested, but unsupported.
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (usrsctp_transport.cc:652): UsrsctpTransport->OpenStream(...): Not adding data stream with sid=0 because stream is already open.
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: I0806 00:36:24.719282 218 peer_connection.cpp:861] Adjusted bitrate for all video and audio encodings on our RTP senders
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (p2p_transport_channel.cc:1304): Failed to resolve ICE candidate hostname c46c9363-ee14-c744-8e2c-7ef2e191fdb8.local with error -3
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (peer_connection.cc:2655): Candidate has an unknown component: Cand[:0:2:udp:2122252542:c46c9363-ee14-c744-8e2c-7ef2e191fdb8.local:59741:local::0:::0:0:0] for mid 0
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (peer_connection.cc:2655): Candidate has an unknown component: Cand[:4:2:tcp:2105524478:c46c9363-ee14-c744-8e2c-7ef2e191fdb8.local:9:local::0:::0:0:0] for mid 0
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (jsep_transport_controller.cc:294): Not adding candidate because the JsepTransport doesn't exist. Ignore it.
Aug 06 00:36:24 ams-cbmrf0mi8v8as7gmvnrg anbox-starter[122]: (p2p_transport_channel.cc:1304): Failed to resolve ICE candidate hostname c46c9363-ee14-c744-8e2c-7ef2e191fdb8.local with error -3
使用 chrome://webrtc-internals/ 工具,出现“icecandidateerror”,描述如下
url: stun:3.87.49.14:5349
address: [0:0:0:x:x:x:x:x]
port: 64672
host_candidate: [0:0:0:x:x:x:x:x]:64672
error_text: STUN server address is incompatible.
error_code: 701
所有这些都表明存在网络问题,但不清楚它位于哪一层(容器和容器编排器之间?)。我如何找出连接失败的位置?
我的安全规则是:
答案1
我遇到了同样的问题,但这是因为我有一个 WebRTC 泄漏防护罩。确保您没有安装任何拦截器。