1
votes

I have installed elasticsearch on Azure virtual machine. I have installed the elasticsearch service which which automatically starts on system start up.

Everything works fine on VM. I can access the 9200 port of elasticsearch instance.

The problem is I can not access it with the help of dns name of the virtual machine i.e. xyz.cloudapp.net:9200

I have created endpoints for 9200 and 9300 port.

enter image description here

I want the Elasticsearch on just one VM for now. Am I missing any steps?

1
Any chance you have a firewall configured on the machine that block the access ? Can you post your endpoint definition, please ? - Julien Corioland
I have edited the question with the end points image - Amey Khadatkar
I tried the same thing with mongoDB and it works fine. FYI. - Amey Khadatkar
When you say "I can access the 9200 port of elasticsearch instance", do you mean you can access it from the VM it is running on? Or you can access it from a remote machine? Is the elasticsearch service binding to localhost/127.0.0.1 or 0.0.0.0 (or some other network interface)? Is the virtual machine Classic or Resource Manager? - Neil Sant Gat

1 Answers

2
votes

The answer to my question is here. I needed to add the following to my Elasticsearch config file

network.host: [_local_, _site_]

This works like a charm.

This has been added in ElasticSearch since 2.x.x version.

Thanks