circus && web comsole docker-compose 獨立部署web console 的一個bug

若是直接使用如下的docker-compose 文件部署會有經過多播通訊獲取endpoint 異常的問題(circus 在stats endpoint 獲取少了一個c)git

這個問題是部分網絡狀況下會出現(多播包異常)github

version: "3"
services: 
  circus:
    image: dalongrong/circus:3.7-slim-stretch
    ports: 
    - "9999:9999"
    - "5555:5555"
    volumes: 
    - "./circus.ini:/app/circus.ini"
  circus-web:
    image: dalongrong/circusd-web:2.7-slim-stretch
    ports:
    - "8080:8080"

一種簡單的解決方法

  • 配置web 的時候明確指定endpoint
    方法不是很好,可是能夠解決問題
    支持的參數以下:
usage: circushttpd [-h] [--fd FD] [--host HOST] [--port PORT]
                   [--endpoint ENDPOINT] [--version]
                   [--log-level {info,debug,critical,warning,error,INFO,DEBUG,CRITICAL,WARNING,ERROR}]
                   [--log-output LOGOUTPUT] [--ssh SSH]
                   [--multicast MULTICAST]
Run the Web Console
optional arguments:
  -h, --help show this help message and exit
  --fd FD FD
  --host HOST Host
  --port PORT port
  --endpoint ENDPOINT Circus Endpoint. If not specified, Circus will ask you
                        which system you want to connect to
  --version Displays Circus version and exits.
  --log-level {info,debug,critical,warning,error,INFO,DEBUG,CRITICAL,WARNING,ERROR}
                        log level
  --log-output LOGOUTPUT
                        log output
  --ssh SSH SSH Server
  --multicast MULTICAST
                        Multicast endpoint. If not specified, Circus will use
                        default one
 
  • 修改下docker-compose circus service name
    修改格式以下:
 
version: "3"
services: 
  appcircus:
    image: dalongrong/circus:3.7-slim-stretch
    ports: 
    - "9999:9999"
    - "5555:5555"
    volumes: 
    - "./circus.ini:/app/circus.ini"
  circus-web:
    image: dalongrong/circusd-web:2.7-slim-stretch
    ports:
    - "8080:8080"

從新鏈接效果

從下圖看出,獲取的額信息正常,這樣通訊信息也就能顯示了
web

 

參考資料

https://github.com/rongfengliang/circus-docker-compose
https://github.com/circus-tent/circus-web
https://circus.readthedocs.org/docker

相關文章
相關標籤/搜索