I am new to both elasticsearch and VMs (i'm a data analyst, but I gotta set elasticsearch up on out azure cloud so as to do analysis later); so pardon me if my question is stupid. I installed the Docker container for elasticsearch available from Azure marketplace. Elastcsearch is up and running and pinging the assigned IP is returning expected rsults like this:
~$ curl 172.xx.x.x:9200
{
"status" : 200,
"name" : "Black Crow",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.1",
"build_hash" : "b88f43fc40b0bcd7f173a1f9ee2e97816de80b19",
"build_timestamp" : "2015-07-29T09:54:16Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}
I have also downloaded the "head" plugin for testing development on the VM. However I am not able to run it on localhost:9200 .
~$ curl localhost:9200
gives:
curl: (7) Failed to connect to localhost port 9200: Connection refused
EDIT: Working now after adding -p flag to bind localhost's 9200 to vm's 9200. But still running localhost:9200 on browser doesnt connect. Supossedly the ip is undiscoverable. How to make it discoverable?
I tried something like docker run -d -p 9200:9200 -p 9300:9300 -v $HOME/data:/data elasticsearch /elasticsearch/bin/elasticsearch (modified from http://www.codedependant.net/2015/01/17/install-elastic-search-plugins-through-docker/) but it doesn't work.
My $Home directory looks like this:
ls $HOME/*
/home/company/wget-log
/home/company/config:
/home/company/data:
elasticsearch.yml plugins
/home/company/es:
plugins
(this folder above contains the plugins, not the other "plugins" folder in /data)
/home/company/esdata:
elasticsearch
Any help will be appreciated. Thanks a lot