【问题标题】:Elasticsearch installed on Azure Linux VM isnt't reachable安装在 Azure Linux VM 上的 Elasticsearch 无法访问
【发布时间】:2015-03-29 17:43:18
【问题描述】:

我在 Azure Linux VM 实例上配置了一个 Elasticsearch 实例,如 here 所述。该服务运行顺利,我可以通过发出 curl 命令进行检查。

但由于这是一个探索性服务器实例,我想在 VM 上打开 9200 端口,以供任何外部客户端使用。我使用 iptables 在 VM 上打开了 9200 和 9300 端口。此外,我还创建了一个 Azure 端点,例如 here,它将公共端口 9200 上的 TCP 请求映射到机器的私有端口 9200。

但是,从外部无法访问机器和端口。我当然缺少 VM 或 VPN 配置,只是想不出还需要配置什么。

【问题讨论】:

    标签: linux azure elasticsearch firewall


    【解决方案1】:

    在这个问题上花了几个小时后,我决定从 Azure beta 门户 (portal.azure.com) 切换到旧门户 (manage.windowsazure.com) 并在那里创建一个端点。然后它起作用了!所以它一定是在新的 Azure 门户预发布版本中出现了故障。

    【讨论】:

      【解决方案2】:

      确保您使用的是最新的 java,并执行以下操作:

      您必须使用以下命令编辑 elasticsearch 配置文件:

      sudo vi /etc/elasticsearch/elasticsearch.yml
      

      并设置以下参数:

      network.host: 0.0.0.0
      
      http.port: 9200
      

      现在直接在http.port:9200标题下添加:

      script.engine.groovy.inline.search: on
      

      最后,确保从 VM 端点或网络安全组入站打开 9200 和 9300 端口。

      我使用此配置使其正常运行。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-05-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多