0

I followed this tutorial (Elasticsearch 2.X on Microsoft Azure) and now I got the following question: How do I access elasticsearch 2.3.4 running on the VM from my Asp.Net MVC 5 website?

The VM is not reachable from the internet. So the only solution would be to access the Virtual Network from the WebApp?! But I don't know how to configure the Ubuntu VM to allow access to elasticsearch (I used iptables to allow port 9200 and in the elasticsearch.yml I added network.host: 0.0.0.0) and how to access the Virtual Network from my WebApp.

In the guideline (the link above) stood, that the WebApp and the VM have to be in the same Virtual Network - but I can't add my WebApp to the Virtual Network...

Thanks for any help or ideas! Azure is driving me crazy :|

EDIT: Okay, I found another tutorial (secure communications between azure web-apps and virtual machines), but that did not work either. Right now I can access the elasticsearch VM via an url from everywhere in the internet. When I try to access the VM from the Web-App via the private IP of the VM, it does not work :( Maybe because the Azure team changed something? Some screenshots look different to mine.

Russ Cam
  • 124,184
  • 33
  • 204
  • 266
Michael
  • 2,021
  • 3
  • 12
  • 18
  • Did you take a look at the ARM template? - https://azure.microsoft.com/en-us/marketplace/partners/elastic/elasticsearchelasticsearch/ You can deploy the cluster into an existing virtual network or deploy the cluster to a new virtual network then give your web app access to hit the cluster via the internal load balancer that gets deployed. – Russ Cam Sep 16 '16 at 10:14
  • Right now I restricted the access to elasticsearch to my IP-adress via the firewall. I did not managed to get it running :| And yes, I tried a template. – Michael Sep 16 '16 at 12:19

0 Answers0