Ubuntu

無法訪問在 docker 中本地執行的 Unifi 控制器的 webUI

  • August 30, 2021

我可以通過各種埠上的 Web 界面訪問託管在我的伺服器上的其他 docker 容器,但是 Unifi 控制器給了我“拒絕連接”類型的錯誤。

這是的輸出docker ps

   CONTAINER ID   IMAGE                                  COMMAND         CREATED       STATUS                        PORTS                                                                                                                                                                                                                                                                                                                                           NAMES
175a359de1d2   ghcr.io/linuxserver/unifi-controller   "/init"         6 hours ago   Up About a minute             0.0.0.0:1900->1900/udp, :::1900->1900/udp, 0.0.0.0:3478->3478/udp, :::3478->3478/udp, 0.0.0.0:8080-8081->8080-8081/tcp, :::8080-8081->8080-8081/tcp, 0.0.0.0:8843->8843/tcp, :::8843->8843/tcp, 0.0.0.0:5514->5514/udp, :::5514->5514/udp, 0.0.0.0:10001->10001/udp, :::10001->10001/udp, 0.0.0.0:8880->8880/tcp, :::8880->8880/tcp, 8443/tcp   unifi-controller

這是我docker-compose.yml的控制器條目

 unifi-controller:
   container_name: unifi-controller
   image: ghcr.io/linuxserver/unifi-controller
   restart: unless-stopped
   environment:
     - PUID=1000
     - PGID=1000
     - TZ=Europe/London
   ports:
     - 3478:3478/udp
     - 10001:10001/udp
     - 8080:8080
     - 8081:8081
     - 8843:8843
     - 8880:8880
#      - 6789:6789 #mobile throughput test
     - 1900:1900/udp
     - 5514:5514/udp
   volumes:
     - "~/docker-services/unifi/config:/config"

docker 日誌中有一些錯誤,但我不知道它們的含義或如何修復它們。當我搜尋它們時,它們似乎相對通用 - 不完全確定修復是什麼。

:0 TCP candidates not supported yet
:0 Permanent error code on channel bind request: 403 - Forbidden IP
:0 All TURN channel bindings failed
:0 Invalid channel id: 8000f; SID: 0x000f; _maxSctpChannels: 0x0400
:0 Invalid channel id: c000f; SID: 0x000f; _maxSctpChannels: 0x0400
:0 TCP candidates not supported yet
:0 Permanent error code on channel bind request: 403 - Forbidden IP
:0 All TURN channel bindings failed
:0 STUN id:   4; fd: 217 172.18.0.5:42921 -> 192.168.1.222:50184 (eth0) DTLS id: 9 (192.168.1.235:42921) (PEER) timed out
:0 webRtcId 1 terminated with code: (-2147090409) WebRTC connection interrupted from far side
:0 SSL_read permanently failed: (6)
:0 Unable to do SSL I/O
:0 webRtcId 2 terminated with code: (-2147090409) WebRTC connection interrupted from far side
:0 TCP candidates not supported yet
:0 Permanent error code on channel bind request: 403 - Forbidden IP
:0 All TURN channel bindings failed
:0 SSL_read permanently failed: (6)
:0 Unable to do SSL I/O
:0 webRtcId 3 terminated with code: (-2147090409) WebRTC connection interrupted from far side
:0 TCP candidates not supported yet
:0 Permanent error code on channel bind request: 403 - Forbidden IP
:0 All TURN channel bindings failed
:0 SSL_read permanently failed: (6)
:0 Unable to do SSL I/O
:0 webRtcId 4 terminated with code: (-2147090409) WebRTC connection interrupted from far side
:0 TCP candidates not supported yet
:0 Permanent error code on channel bind request: 403 - Forbidden IP
:0 All TURN channel bindings failed
:0 SSL_read permanently failed: (6)
:0 Unable to do SSL I/O
:0 webRtcId 5 terminated with code: (-2147090409) WebRTC connection interrupted from far side

我試過重新啟動容器,重新啟動 docker 並重新啟動伺服器。也排除了不同的瀏覽器以防萬一(Chrome、Edge、Firefox)。這以前有效,但沒有任何改變。

當我的手機連接到同一個網路時,我可以通過移動應用程序訪問 unifi 控制器。我也可以從https://network.unifi.ui.com訪問它

作為參考,其他應用程序(例如 nginx)在 docker-compose 文件中指定的埠上可用。我不明白為什麼只有 unifi-controller 很困難。

你的埠號有錯別字。

而不是8843,你需要它是8443

引用自:https://serverfault.com/questions/1074787