L33T
(L33T)
April 25, 2018, 2:24pm
1
Hi,
Recently setup elastic on a windows host but performance is being hampered as its only a single node. I have setup a second node but cannot get it to see the cluster. both elasticsearch.yml config
s below:
Node 1:
bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: ELASTIC-NODE1
path.data: D:\6.2.3\data
path.logs: D:\6.2.3\logs
transport.tcp.port: 9300
thread_pool.search.queue_size: 10000
xpack.license.self_generated.type: basic
Node 2:
bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: ELASTIC-NODE2
path.data: C:\elasticsearch-6.2.3\data
path.logs: C:\elasticsearch-6.2.3\logs
transport.tcp.port: 9300
thread_pool.search.queue_size: 10000
When viewing the nodes in elasticsearchHQ i can only see one node in the cluster...
Any help would be great.
Cheers,
A_B
April 25, 2018, 2:29pm
2
You can't have two nodes run on the same TCP ports. Change Node 2
to 9201/9301.
L33T
(L33T)
April 25, 2018, 2:40pm
3
they are separate machines, does that still need to be run on different ports?
A_B
April 25, 2018, 2:44pm
4
Oh. The they can use the same port
But
By default, Elasticsearch binds to loopback addresses only — e.g. 127.0.0.1 and [::1]. This is sufficient to run a single development node on a server.
You need to set network.host
.
L33T
(L33T)
April 25, 2018, 2:51pm
5
Added this to both hosts (alternate settings on each), restarted services, still showing 1 node
network.host: x.x.x.x
discovery.zen.ping.unicast.hosts:
192.168.51.88:9300
192.168.51.89:9300
A_B
April 25, 2018, 2:56pm
6
Are the individual nodes working ok? What do you see if you go to
And where do you see just one node?
L33T
(L33T)
April 25, 2018, 2:58pm
7
Node1: {
"name" : "ELASTIC-NODE1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "ttkgUDqOREOuISCvmwR_zg",
"version" : {
"number" : "6.2.3",
"build_hash" : "c59ff00",
"build_date" : "2018-03-13T10:06:29.741383Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
Node2:
{
"name" : "ELASTIC-NODE2",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "FvhTHEhFSF-kMeVIobCFBg",
"version" : {
"number" : "6.2.3",
"build_hash" : "c59ff00",
"build_date" : "2018-03-13T10:06:29.741383Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
A_B
April 25, 2018, 3:03pm
8
Looks good... Last thing I would test is making the node names small caps.
Also, can connect with telnet
from one machine to the other on port 9200 and 9300?
L33T
(L33T)
April 25, 2018, 3:23pm
9
after applying those values, i cannot connect via elasticsearchhq or kibana, kibana is now prompting for credentials but i havent set any?
A_B
April 25, 2018, 3:26pm
10
You have installed x-pack or maybe the new version of ES comes with x-pack included.
https://www.elastic.co/guide/en/x-pack/6.2/setting-up-authentication.html#bootstrap-elastic-passwords
Or, you have to set xpack.license.self_generated.type: basic
on both nodes.
I haven't played too much with ES v6 yet...
L33T
(L33T)
April 26, 2018, 10:04am
11
Yep, i had to re-install just to get shot of the x-pack, set the configs on both to the below and all is working
bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: ELASTIC-NODE1
path.data: D:\6.2.3\data
path.logs: D:\6.2.3\logs
transport.tcp.port: 9300
thread_pool.search.queue_size: 10000
network.host: x.x.x.x
discovery.zen.ping.unicast.hosts:
x.x.x.1:9300
x.x.x.2:9300
thanks for your help A_B!
Cheers,
system
(system)
Closed
May 24, 2018, 10:04am
12
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.