我刚刚在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.host
到0.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:~#
答案 0 :(得分:3)