elasticsearch - curl : (7) Failed to connect to localhost port 9200: Connection refused. 即使在配置/etc/elasticsearch/elasticsearch.yml之后

标签 elasticsearch

我正在尝试检查 elasticsearch 是否在 Ubuntu 14.04 上正常工作。为此,我正在运行以下命令:

$ sudo service elasticsearch start
$ curl -X GET 'http://localhost:9200'

错误:

curl: (7) Failed to connect to localhost port 9200: Connection refused

我在此处附加了我的/etc/elasticsearch/elasticsearch.yml 文件的屏幕截图,并附加了 my-application.log enter image description here enter image description here enter image description here

最佳答案

从日志文件中问题非常明显

org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [linux-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml

只需将其添加到您的 elasticsearch.yml 配置文件中并重新启动服务

xpack.ml.enabled: false

关于elasticsearch - curl : (7) Failed to connect to localhost port 9200: Connection refused. 即使在配置/etc/elasticsearch/elasticsearch.yml之后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55073999/

相关文章:

elasticsearch - 如何在Elastic Search中增加具有动态属性的嵌套对象?

elasticsearch - 批量API执行顺序Elasticsearch

php - PHP全文搜索在elasticsearch

elasticsearch - 结合流利的和对象初始化的语法

php - Elasticsearch批量数据插入-JsonParseException [意外字符-使用PHP

elasticsearch - ElasticSearch查询忽略其他搜索词

mongodb - 未在Kibana中为MongoDB + Logstash + ElasticSearch创建索引

Elasticsearch 计数项忽略空格

java - 自定义StormCrawler

php - 我如何在 Elastic Search 中获得完全匹配的过滤器结果