[英]Windows10 docker: Grafana not able to access influxdb-502 Bad Gateway
我在 docker 中安裝了兩個容器(influxdb 和 grafana)。 兩個容器啟動並運行。 能夠從瀏覽器訪問 grafana(http://localhost:3000/datasources/edit/1/) 和 influxdb(http://localhost:8086/query?q=show%20databases) url。 但是我們在grafana中配置influxdb時,grafana api throwing 502: Bad Gateway。
Grafana 日志消息t=2020-12-23T23:53:36+0000 lvl=eror msg="數據代理錯誤" logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy /1/query remote_addr=xxx.xx.xx referer=http://localhost:3000/datasources/edit/1/error="http: proxy error: dial tcp localhost:8086: connect: connection denied"
t=2020-12-23T23:53:36+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/1/query status =502 remote_addr=1xxx.xx.xx time_ms=26 size=0 referer=http://localhost:3000/datasources/edit/1/
Docker 編寫文件:版本:“2” 服務:grafana:圖像:grafana/grafana container_name:grafana restart:總是端口:
influxdb:圖像:influxdb 容器名稱:influxdb 重啟:總是端口:
Docker 網絡也啟動並運行。
C:\WINDOWS\system32>docker network ls
網絡 ID 名稱 驅動程序 SCOPE f42bea59b834 bridge 本地
5ae575311d19 主機主機本地
d7f57802a04c 監控_默認橋本地
2419751561dd monitoring_monitoring bridge local
4829f3a73843 monitoring_ranga_docker_network bridge local
4962bd901e12 無 null 本地
ad245f671c22 ranga_docker_network 網橋本地
謝謝,蘭加饒
問題根本原因:連接 VPN 但未重新啟動 Docker 守護程序。 解決方法:連接 VPN 后重啟 Docker 守護進程。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.