2017-06-20 84 views
0

我用ubuntu的鏡像創建一個容器。Kibana碼頭運行

沒關係,我可以很好地使用。

因此,我在這個ubuntu的docker中安裝了kibana服務。

當我執行的路徑倉的kibana,運行正確,並說正在監聽:本地主機:5601

這意味着kibana配置是正確的,但是當我在我的瀏覽器訪問了搬運工的,沒有按」工作。

我已經在正確的路徑上在kibana.yml文件中配置了網絡。

我可以看到docker(cmd)上運行的服務。

我最初kibana.yml文件:

# Kibana is served by a back end server. This setting specifies the port to use. 
#server.port: 5601 

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. 
# The default is 'localhost', which usually means remote machines will not be able to connect. 
# To allow connections from remote users, set this parameter to a non-loopback address. 
# server.host: "0.0.0.0" 

回答

1

每個容器都有自己的localhost,它是不能從外部訪問。

您的問題包含了答案:

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. 
# The default is 'localhost', which usually means remote machines will not be able to connect. 
# To allow connections from remote users, set this parameter to a non-loopback address. 
# server.host: "0.0.0.0" 

取消註釋塊容器的「外部」接口上運行服務器的最後一行。然後它將從外部訪問。

這將允許其他容器到達它。如果要綁定端口以便非容器可以訪問它,請使用-p標誌運行容器以發佈端口。

docker run -p 5601:5601 [.....] 
+0

工作,我嘗試過,但我不知道爲什麼不工作,但謝謝! –