无法打开Elasticsearch-head插件 - v2.1.1

时间:2015-12-26 07:44:27

标签: elasticsearch elasticsearch-plugin

我正在尝试使用此网址http://vmname:9200/_plugin/head打开elasticsearch-head插件,但没有运气,我收到'此网页无法使用'。

需要你的帮助才能解决这个问题,不确定我是否遗漏了这些内容。

请在下面找到有关环境的详细信息,

Elasticsearch version: 2.1.1
Plugins: elasticsearch-head
JAVA: java version "1.7.0_05"
OS: Linux 2.6.32-220.el6.x86_64

插件安装日志:

[esearch@vmname bin]$ ./plugin install mobz/elasticsearch-head url http://github.com/mobz/elasticsearch-head/archive/master.zip
-> Installing mobz/elasticsearch-head...
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ...
Downloading ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE
Verifying https://github.com/mobz/elasticsearch-head/archive/master.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
Installed head into /opt/elasticsearch-2.1.1/plugins/head

ElasticSearch记录:

[esearch@vmname bin]$ ./elasticsearch
[2015-12-26 12:51:19,953][WARN ][bootstrap                ] unable to install syscall filter: prctl(PR_GET_NO_NEW_PRIVS): Invalid argument
[2015-12-26 12:51:20,536][INFO ][node                     ] [Gatecrasher] version[2.1.1], pid[19215], build[40e2c53/2015-12-15T13:05:55Z]
[2015-12-26 12:51:20,536][INFO ][node                     ] [Gatecrasher] initializing ...
[2015-12-26 12:51:20,825][INFO ][plugins                  ] [Gatecrasher] loaded [], sites [head]
[2015-12-26 12:51:20,869][INFO ][env                      ] [Gatecrasher] using [1] data paths, mounts [[/ (/dev/sda3)]], net usable_space [4.8gb], net total_space [27.3gb], spins? [possibly], types [ext3]
[2015-12-26 12:51:24,514][INFO ][node                     ] [Gatecrasher] initialized
[2015-12-26 12:51:24,514][INFO ][node                     ] [Gatecrasher] starting ...
[2015-12-26 12:51:24,646][INFO ][transport                ] [Gatecrasher] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2015-12-26 12:51:24,669][INFO ][discovery                ] [Gatecrasher] elasticsearch/NhlBGx_kTiq7JeeEPihz2w
[2015-12-26 12:51:27,728][INFO ][cluster.service          ] [Gatecrasher] new_master {Gatecrasher}{NhlBGx_kTiq7JeeEPihz2w}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-12-26 12:51:27,751][INFO ][http                     ] [Gatecrasher] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2015-12-26 12:51:27,751][INFO ][node                     ] [Gatecrasher] started
[2015-12-26 12:51:27,850][INFO ][gateway                  ] [Gatecrasher] recovered [0] indices into cluster_state

如果您需要任何其他信息,请与我们联系。

我可以毫无问题地访问Windows 7中的头部插件,但我无法在Linux中访问它。

EDITED ...................................

无法从外部访问端口9200,

[root@ newvm ~]# nc -vz vmname 9200
nc: connect to vmname port 9200 (tcp) failed: Connection refused

而端口正在VM中进行侦听,

[root@vmname ~]# nc -vz vmname 9200
Connection to vmname 9200 port [tcp/wap-wsp] succeeded!

[root@ vmname ~]# netstat -nat | grep :9200
tcp        0      0 ::1:9200                    :::*                        LISTEN
tcp        0      0 ::ffff:127.0.0.1:9200       :::*                        LISTEN

我已禁用防火墙并尝试过,但问题仍然存在!

[root@ vmname ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

2 个答案:

答案 0 :(得分:2)

您目前将elasticsearch配置为仅侦听localhost

您可能想尝试添加以下的elasticsearch.yml

network.host: [networkInterface]

注意:这将使您的群集在公共接口上侦听,因此您希望重新启动该防火墙并限制访问。

答案 1 :(得分:0)

确保plugins目录具有足够的权限,以便elasticsearch为插件文件提供服务:

sudo chown -R elasticsearch. /usr/share/elasticsearch