我正在尝试检查 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
最佳答案
从日志文件中问题非常明显
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/