fynmnx
fynmnx

Reputation: 611

Deploying Elasticsearch on Ubuntu Server

I'm trying to deploy my own instance of elasticsearch on DigitalOcean on an ubuntu server. However I am struggling to get the server pointing to the right place. This is my first time trying to deploy anything myself.

Running:

curl -X GET 'http://localhost:9200'

Gives me the expected GET request:

{
  "name" : "Test_Node_1",
  "cluster_name" : "TEST_Cluster",
  "cluster_uuid" : "RWPkFQ37SAe-687L-iLV9Q",
  "version" : {
    "number" : "7.0.0",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "b7e28a7",
    "build_date" : "2019-04-05T22:55:32.697037Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
 }

However when I go to the elasticsearch.yml file and change the network.hosts to point to my server IP, it does not work and gives me this error:

curl: (7) Failed to connect to <server-ip> port 9200: Connection refused

Any advice on how to get it working? Thank you for any guidance.

Upvotes: 0

Views: 96

Answers (2)

Abdullah Ahsan
Abdullah Ahsan

Reputation: 107

Please check after restarting the Es.

sudo systemctl restart elasticsearch

Upvotes: 0

Marc Frame
Marc Frame

Reputation: 1001

you probably have to edit the /etc/elasticsearch/elasticsearch.yml and change the network.hosts variable to 0.0.0.0

this is a solution, but it's probably not the best solution.

I highly recommend AWS's open distro

Open Distro for Elasticsearch

Upvotes: 1

Related Questions