Elasticsearch Cluster can't join new node - elasticsearch

I use es-2.2 version, build cluster with 3 node in different server. now some server get more memory to used, so plan to start other node in existing server.
server1:
10.1.192.31 port use default 9200 and 9300
server2:
10.1.192.32 port use default 9200 and 9300
server3:
10.216.90.225 port default 9200 and 9300
now i wanna add two new node in 31 and 32 server
newnode1: get new configure like below:
cluster.name: EScluster
node.name: ESnode-1-1
network.host: 10.1.192.32
node.master: false
node.data: true
http.port: 9202
transport.tcp.port: 9302
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["10.216.90.225", "10.1.192.31:9300", "10.1.192.31:9302", "10.1.192.32:9300"]
newnod2: config like below
cluster.name: EScluster
node.name: ESnode-2-1
network.host: 10.1.192.31
node.master: false
node.data: true
http.port: 9202
transport.tcp.port: 9302
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["10.216.90.225", "10.1.192.31:9300", "10.1.192.32:9300", "10.1.192.32:9302"]
after start get error like below:
[INFO ][discovery.zen ] [ESnode-1-1] failed to send join request to master [{ESnode-2}{C4Z7lLTASmiZYtswsljZYA}{10.1.192.31}{10.1.192.31:9300}{max_local_storage_nodes=1, master=true}], reason [RemoteTransportException[[ESnode-2][10.1.192.31:9300][internal:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[ESnode-1-1][10.1.192.32:9302][internal:discovery/zen/join/validate]]; nested: IllegalArgumentException[No custom metadata prototype registered for type [licenses], node like missing plugins]; ]
[2016-05-26 10:35:26,408][WARN ][transport.netty ] [ESnode-1-1] exception caught on transport layer [[id: 0x770dcb9e, /10.1.192.31:37584 => /10.1.192.32:9302]], closing connection

I met this error just now.
There are three nodes(one master node with two data node, all in docker) running on my vps.
I install marvel in master node with command:
bin/plugin install license
bin/plugin install marvel-agent
But I got No Marvel Data Found on kibana page.
Soon, I found other data node died.
The error was
IllegalArgumentException[No custom metadata prototype registered for type [licenses], node like missing plugins
and
So just install license in other two data nodes:
bin/plugin install license
restart them would work.

guys
The problem been solved, main reason like below:
[internal:discovery/zen/join/validate]]; nested: IllegalArgumentException[No custom metadata prototype registered for type [licenses], node like missing plugins]
I install some plugin like marvel but not working then disabled, but it's not install that plugin for new node。 This is big mistake, so don't try any unused plugin in your enviroment, should be carefully on it.
So, my configuration is correctly hope this can help other people, thanks.

My logs were filled with annoying license errors even though I had uninstalled marvel and was not running anything that should require a license. Nodes would not join the cluster.
I ran:
bin/plugin remove license
and restarted the nodes. Things came back online fine and the logspam stopped.

Related

Elasticsearch node can't connect to cluster

First of all, I want to be clear that I looked at several guides and suggested similar questions before opening this post, but none of them worked for our case.
Here is our situation:
Last week, our Elasticsearch stopped adding new records as it reached the state where the disk was almost full. We changed the config to get some time and now is working as expected. However, we want to add a new server with elasticsearch and form a cluster as we don't want to resize the disk because we don't want to lose anything.
Here is the configuration for the main server /etc/elasticsearch/elasticsearch.yml
cluster.name: my-cluster
node.name: master-node
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.max_content_length: 100mb
discover.seed_hosts: ["ip_address_server_1", "ip_address_server_2"]
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.http.ssl.enabled: true
As I said, we created another server with the same elasticsearch version (7.6.2)
cluster.name: my-cluster
node.name: another-node
node.data: true
node.master: false
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: ip_of_server
discover.seed_hosts: ["ip_address_server_1", "127.0.0.1"]
We tried restarting nodes at the same time, curls and everything but they can't see each other. At this point, I'm starting to think that the problem is the SSL configuration on the master, but I am not an elasticsearch expert, so I don't know what is exactly happening.
EDIT:
I took a look at the logs and here is what I found:
Node 2
[ico-elastic-node-2] master not discovered yet: have discovered [{node-2}{G5SfrEv0RxaxmYf8urIFtQ}{XpfNNouCQx2HmYfw2AvoQw}{ip_server_2}{ip_server_29300}{dil}{ml.machine_memory=12558602240, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [ip_server_1, 127.0.0.1:9300] from hosts providers and [] from last-known cluster state; node term 0, last-accepted version 0 in term 0
And the master:
[master-node] exception caught on transport layer [Netty4TcpChannel{localAddress=/ip:9300, remoteAddress=/ip:36660}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No available authentication scheme
Currently master is yellow. What can we try next?

How to add new node replica to Elasticsearch is running, without to retart service?

My cluster has a yellow health as it has only one single node, so the replicas remain unasigned simply because no other node is available to contain them.
I'am readed help in homepage:
I try add new node-data to my cluster, but it not appear when i check health's cluster.
This is config new node:
cluster.name: elasticsearch
node.name: node-data-1
node.master: false
node.data: true
node.ingest: false
node.ml: false
http.port: 9201
Old config, i don't edit. It's default.
Can someone explain me which files do I've to edit and what commands do I've to launch in order to create another node in my cluster? Do I've to run two ES instance? How can I do this?
Thanks in advance.
Make sure to remove the /data folder from each Elasticsearch install before executing the nodes. Also, in the nodes that won't be the master set the following property:
cluster.initial_master_nodes: ["machine_running_master"]

Failed to send join request to master in Elasticsearch, Unknown NamedWriteable [org.elasticsearch.cluster.metadata.MetaData$Custom][licenses]]

We have a long running single node ELK cluster running (master/data). I have decided to add additional data node. However Im getting the below error on the data node
30.X.XXX}{172.30.X.XXX:9300}{ml.enabled=true}], reason [RemoteTransportException[[master][172.30.X.XXX:9300][internal:discovery/zen/join]];
nested: IllegalStateException[failure when sending a validation request to node];
nested: RemoteTransportException[[data1][172.30.X.XXX:9300][internal:discovery/zen/join/validate]];
nested: IllegalArgumentException[Unknown NamedWriteable [org.elasticsearch.cluster.metadata.MetaData$Custom][licenses]]; ]
Below are the config files on master and new data node
Master Node:
cluster.name: my-application
node.name: master
node.master: true
node.data: true
path.data: /opt/elasticsearch
network.host: ["172.30.X.XX1","localhost"]
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.30.X.XX1"]
discovery.zen.minimum_master_nodes: 1
Data1 Node:
cluster.name: my-application
node.name: data1
node.master: false
node.data: true
path.data: /opt/elasticsearch
network.host: ["172.30.X.XX2","localhost"]
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.30.X.XX1"]
discovery.zen.minimum_master_nodes: 1
Tried pinging and checked telnet on 9200 and 9300 from master to data node and vice versa and it is working fine
I have tried deleting the data from /var/lib/elasticsearch/nodes/0 and restarted the data1, it didnt work
This happens if you try with a mix of xpack/commercial/non-open-source binaries of Elasticsearch and some nodes with the open-source binaries.
Unfortunately Elasticsearch tries to "trick" you into using their non-open-source version nowadays and this causes many unintended non-open-source installations.
A simple solution is to install the non-oss version everywhere, however you may not want to run the commercial version as you then need to adhere to the commercial license!
In order to convert to the open-source license on all nodes you can do the following:
You can set the following in /etc/elasticsearch/elasticsearch.yml and restart all nodes to disable some commercial features:
xpack.security.enabled: false
xpack.ml.enabled: false
Then you can change all nodes to the open-source binaries one by one in rolling fashion.
See also the following similar discussions:
https://discuss.elastic.co/t/elasticsearch-cluster-cant-join-new-node/126964
https://discuss.elastic.co/t/adding-a-new-node-on-a-different-subnet/125377/2- https://github.com/codelibs/elasticsearch-module/issues/3
https://discuss.elastic.co/t/transport-client-error-after-installing-x-pack-on-es-5-5-1/97021/4
https://discuss.elastic.co/t/bulk-indexing-with-x-pack-exception/92086/5

Failed to send join request to master ElasticSearch on AWS EC2 owned cluster

I am trying to build a cluster of 3 EC2 instances (I do not want to use the ElasticSearch service of amazon) and after installing the software and configuring it in all three instances I encounter the problem that they do not communicate with each other.
I’m working with ES 5.5.1 on instances with Ubuntu 16.04
All nodes are up and running
All nodes has a Security Groupof AWS with permissions for all traffic between nodes (all ports)
Internal firewall on very machine white list for every node
Master
cluster.name: excelle
node.name: ${HOSTNAME}
node.master: true
path.data: /srv/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 172.31.MAS.TER
discovery.zen.ping.unicast.hosts: ["172.31.MAS.TER", "172.31.NODE.TWO", "172.31.NODE.THREE"]
Node two
cluster.name: excelle
node.name: ${HOSTNAME}
node.master: false
path.data: /srv/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 172.31.NODE.TWO
discovery.zen.ping.unicast.hosts: ["172.31.MAS.TER", "172.31.NODE.TWO", "172.31.NODE.THREE"]
Node 3
cluster.name: excelle
node.name: ${HOSTNAME}
node.master: false
path.data: /srv/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 172.31.NODE.THREE
discovery.zen.ping.unicast.hosts: ["172.31.MAS.TER", "172.31.NODE.TWO", "172.31.NODE.THREE"]
But on logs, on node 3 for exmple...
[2017-08-15T11:01:41,241][INFO ][o.e.d.z.ZenDiscovery ] [es03] failed to send join request to master [{esmaster}{scquEEaETDKMKLHzZvEHZQ}{NdLtMUXtT7WXnv1a4uHWqQ}{172.31.44.107}{172.31.44.107:9300}], reason [RemoteTransportException[[esmaster][172.31.44.107:9300][internal:discovery/zen/join]]; nested: ConnectTransportException[[es03][172.31.18.76:9300] connect_timeout[30s]]; nested: IOException[connection timed out: 172.31.18.76/172.31.18.76:9300]; ]
I testing connection from node 3 to master not problem (for network question)
telnet 172.31.MAS.TER 9300
Trying 172.31.MAS.TER...
Connected to 172.31.MAS.TER.
Escape character is '^]'.
What it's wrong? Any idea?
I found an answer to this posted on ElasticSearch
The gem was from manst:
"solution for this error (you must deleted contents of data folder(/var/lib/elasticsearch/nodes/0) and restarted both the servers ):"
I deleted the nodes folder from each of my SpotInst instances and rebooted. My 3 ES distributed master-only nodes all came online. My 8 data-only nodes have connected automatically without any issue.

How to create a local elasticsearch cluster on my mac

I have a strange problem when trying to setup a local running elasticsaerch cluster. I have tried a lot of settings with the bind.host and the auto discovery but did not succeed. The strange thing is if I have my wireless connection connected to a network the two nodes do not see each other. If I switch it of I do not have a problem. Following is the configuration of one node that works without a wireless adapter connected.
Does anyone have a clue what to try to make my cluster work?
cluster.name: localcluster
node.name: two
index.number_of_shards: 1
index.number_of_replicas: 0
network.host: _lo0:ipv4_
zen.ping.multicast.enabled: false
zen.ping.unicast.hosts: ["127.0.0.1"]
You are missing discovery. in the zen discovery settings. Try these settings:
cluster.name: "localcluster"
network.host: _lo0:ipv4_
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300","127.0.0.1:9301","127.0.0.1:9302"]

Resources