Ubuntu 15.10 elasticsearch 2.3无法连接到localhost端口9200:连接被拒绝

时间:2016-04-13 17:33:54

标签: ubuntu elasticsearch

我刚刚在OSX El Capitan和Ubuntu 15.10上安装了相同版本的elasticsearch,2.3。命令curl -XGET 'http://localhost:9200/'在OSX中运行良好,但在Ubuntu 15.10上给出了这个错误:

root@levilinode:~# curl -XGET 'http://localhost:9200/'
curl: (7) Failed to connect to localhost port 9200: Connection refused

尝试使用与Linux相关的所有帖子修复此问题有关在文件/etc/elasticsearch/elasticsearch.yml中设置参数network.bind_host和/或network.host0.0.0.0或{{1}不成功。

我怎样才能让它发挥作用?

更多详情:

127.0.0.1

来自syslog的更多细节:

root@levilinode:~# service elasticsearch status
● elasticsearch.service - LSB: Starts elasticsearch
   Loaded: loaded (/etc/init.d/elasticsearch)
   Active: active (exited) since Wed 2016-04-13 13:22:46 EDT; 43min ago
     Docs: man:systemd-sysv-generator(8)

Apr 13 13:22:46 levilinode systemd[1]: Starting LSB: Starts elasticsearch...
Apr 13 13:22:46 levilinode systemd[1]: Started LSB: Starts elasticsearch.
root@levilinode:~# sudo netstat -tulpn | grep 9200
root@levilinode:~# netstat -tulpn | grep 9200
root@levilinode:~#

1 个答案:

答案 0 :(得分:3)

使用此处的指南进行了新安装:

Digital Ocean Tutorials

我唯一更改的是将版本从return [date hour]; 更新为1.7.2

现在一切顺利。详情如下:

2.3.1