azure - 无法从服务器外部访问 ElasticSearch 实例 - Azure Windows 2012

标签 azure elasticsearch windows-server-2012-r2

我已将 Elastic Search 2.3.0 设置为具有 Windows Server 2012 R2 的 Azure VM 中的服务。我可以使用

从服务器内访问 Elasticsearch 实例
http://localhost:9200

但我无法从服务器外部访问。

我尝试了什么?

  • 为了进行测试,我已将虚拟机设置为在虚拟网络之外可用。
  • 在 Windows 防火墙设置中打开端口 9200 作为入站流量规则
  • 在 Azure 门户设置中添加了一个端点,开放端口 9200

也用 VM Classic 尝试过此操作。

另外为了测试虚拟机是否正常,我在该机器上设置了IIS,打开了80端口。默认的IIS页面可以从外部访问。

我唯一没有尝试过的是在 Linux VM 中设置 ES。

我在elasticsearch日志中找不到任何内容。在浏览器(Chrome)上,网络中没有日志。它只是旋转,等待服务器,然后用“ERR_EMPTY_RESPONSE”捕捉。

做过这件事的人可以透露一些信息吗?

更新: 这是我在 netstat 中看到的内容:

TCP    127.0.0.1:9200         machine-name:0       LISTENING
TCP    127.0.0.1:9300         machine-name:0       LISTENING

最佳答案

从ES 2.0开始,仅elasticsearch进程 binds to localhost ,这解释了为什么可以从内部查询ES而不能从外部查询。

您需要更改 elasticsearch.yml 配置文件中的以下设置:

network.host: 0.0.0.0

关于azure - 无法从服务器外部访问 ElasticSearch 实例 - Azure Windows 2012,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36397922/

相关文章:

azure - 应用程序洞察请求被吞没?

VS2013 服务器资源管理器中缺少 Azure Web 应用程序

python-3.x - 如何使用python API获取Elasticsearch集群的运行状况?

java - HibernateSearch ElasticSearch集成错误: Exception in thread "main" java. lang.ExceptionInInitializerError

elasticsearch - 邻里地理查询

git - 在 Windows Server 2012 R2/IIS 上运行 Git 服务器

c# - "Access to the path ' D :\\Windows\\system32\\file is denied"Azure Web App

azure - 将 Azure 数据库配置为只读

actionscript-3 - 带宽不足时,AIR AS3文件下载已损坏

teamcity - 构建服务器上的 ASP.NET Core 2.0 项目的 Nuget 恢复失败