【问题标题】:Kibana docker runKibana 码头工人运行
【发布时间】:2017-06-20 23:09:06
【问题描述】:

我用 ubuntu 的镜像创建了一个容器。

没关系,我可以很好地使用。

所以,我在这个 ubuntu 的 docker 中安装了 kibana 服务。

当我在路径 bin 上执行 kibana 时,运行正确并说正在侦听:localhost:5601

这意味着 kibana 配置正确,但是当我在浏览器上从 docker 访问时,它不起作用。

我已经在正确的路径中配置了 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"

【问题讨论】:

    标签: docker kibana


    【解决方案1】:

    每个容器都有自己的本地主机,无法从外部访问。

    您的问题包含答案:

    # 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 [.....]
    

    【讨论】:

    • 工作,我以前尝试过,但我不知道为什么不起作用,但谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    • 2016-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多