How to upgrade Elasticsearch version

Hii I am using ELK Stack . Currently I am having a single node in the Elasticsearch cluster . Using curl -XGET 'localhost:9200' i get the version as '2.1.0' . I want to add another node to the cluster but he version of the new node with Elasticsearch is '2.2.0' . When adding a node it is required that the version of Elasticsearch remains same in all the nodes, right ? I have not added the new node yet . I have just installed the Elasticsearch in new node . So how can I upgrade the origianl node to version 2.2.0 or downgrade the new node to 2.1.0 . Please speicify the required commands . Is there any other way to tackle this situation ?

You can mix nodes 2.2 and 2.1.

You can not downgrade a node.

@dadoonet Thanx !!! So what governs the logic that whether two versions can be mixed or not ?

@dadoonet I cannot see the added node when I do curl -XGET 'http://localhost:9200/_nodes' . Any help ?? Further elasticsearch on the new node is not listening on port 9200 . Why this is so ?

Major versions can not be mixed. So you can't have 1.x and 2.x running.

Note that's a temporary state and you should definitely upgrade the full cluster

David Pilato- Developer | Evangelist
@dadoonet|@elasticfr

@dadoonet I cannot see the new node in the cluster . Why so ???

Well. What do you see in logs on both nodes?
Did you define network.host?

David Pilato- Developer | Evangelist
@dadoonet|@elasticfr

@dadoonet You are talking abou network.host on new node or existing node ? What should be the values of network.host in both the nodes - new node and existing node ??

Have a look at the docs but I'd set it to the network card IP address.

@dadoonet hey this is my elasticsearch .yml file of already existing node. Can you please specify what values I need to insert in the following keys . Docs are pretty confusing , I cannot understand where the changes are to be made - in already existing elasticsearch's configuration file or in the new node's configuration file-
These are the contents of already existin node -

cluster.name: limetrayELK
node.name: node-1
discovery.zen.ping.unicast.hosts: ['ip_of_newly_added_node']

These are the contents of the newly created node -

cluster.name: limetrayELK
node.name: node-2
network.host: localhost

Please specify the values required in the corresponding keys and where I am wrong ???

Did you search in the documentation?

Searching for network host in our guide leads you to https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-network.html#network-interface-values which is explicit. Anything you don't understand in this doc?

@dadoonet What i understood is that there should be no changes in the already installed node's config file and changes are to be made in the config file of newly added node which should be as below -

network.host: ["ip_address_of_the_already_existing_node"]
discovery.zen.ping.unicast.hosts: ["ip_address_of_the_already_existing_node"]
Am I right?

It won't work. node-1 has to be updated to accept as well external requests.

Node 1 has to be:

network.host: ip_node1
discovery.zen.ping.unicast.hosts: ["ip_node1","ip_node2"]

Node 2:

network.host: ip_node2
discovery.zen.ping.unicast.hosts: ["ip_node1","ip_node2"]

@dadoonet I did ur trick and my earlier node has come down too help me !!!!! my logs are getting lost

When you restart, what are the logs?

If you have no logs at all, may be your config file is incorrect. Send it as a gist.github.com