Search code examples
elasticsearchelasticsearch-plugin

Unable to open Elasticsearch-head plugin – v2.1.1


I am trying to open the elasticsearch-head plugin with this URL http://vmname:9200/_plugin/head, but no luck, i am getting ‘This web page is not available’.

Need your help to fix this, not sure whether I am missing something here.

Please find the details of the environment below,

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

Plugin installation Logs:

[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 logs:

[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

Please let me know if you need any additional information.

I am able to access the head plugin in Windows 7 without any issue, but I can't able to access the same in Linux.

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

Port 9200 is not reachable from outside,

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

Whereas the port is LISTENING with in the 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

I have disabled the firewall and tried, but the issue still exits!

[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

Solution

  • You currently have elasticsearch configured to only listen on localhost

    You might want to try adding to your elasticsearch.yml the following

    network.host: [networkInterface]

    NOTE: This WILL make your cluster listen on public interfaces, so you'l want to bring that firewall back up and restrict access.