I'm trying to setup an Elasticsearch cluster but I'm getting "Name or service not known"
Below you can find configuration and logs
first node logs: https://gist.github.com/sintonag/d6ee4e4c68084a0941c28afcf251b519
second node logs: https://gist.github.com/sintonag/d2443267154a485f33f1f7c18d073e30
Node 1 yaml file
cluster.name: es-cluster
node.name: es-a
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: xx.xxx.xxx.xx
discovery.seed_hosts:
- yy.yyy.yyy.yy
cluster.initial_master_nodes:
- es-a
- es-b
Node 2 yaml file
cluster.name: es-cluster
node.name: es-b
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: yy.yyy.yyy.yy
discovery.seed_hosts:
- xx.xxx.xxx.xx
cluster.initial_master_nodes:
- es-a
- es-b
If the problem is related to ports, how can I override port 9300 in the Elasticsearch.yml file?
dadoonet
(David Pilato)
September 22, 2021, 12:31pm
2
I'd try this:
cluster.initial_master_nodes:
- xx.xxx.xxx.xx
- yy.yyy.yyy.yy
Still I cannot setup the cluster. I tried your suggestion.
On logs I don't see any errors.
Are the changes I make to Elasticsearch.yml applied? I just stop and start the service every time I change something.
Also, I would like to override the default ports 9200 and 9300. How can I do that?
dadoonet
(David Pilato)
September 23, 2021, 11:59am
4
Please share the full logs after the change.
Also, I would like to override the default ports 9200 and 9300. How can I do that?
Why would you do that?
dadoonet
(David Pilato)
September 28, 2021, 11:48am
6
Could you stop the nodes, remove the content of the data dir (/var/lib/elasticsearch
) for each node (I guess you don't have any data yet) and the restart node 1, then node 2.
Here is what I would write as the settings for both nodes:
cluster.name: es-cluster
node.name: es-a # (or es-b)
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.seed_hosts:
- xx.xxx.xxx.xx
- yy.yyy.yyy.yy
cluster.initial_master_nodes:
- es-a
- es-b
If it does not work, I'd try to stop again, remove the data dir and restart with the following config
cluster.name: es-cluster
node.name: es-a # (or es-b)
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.seed_hosts:
- xx.xxx.xxx.xx
- yy.yyy.yyy.yy
cluster.initial_master_nodes:
- xx.xxx.xxx.xx
- yy.yyy.yyy.yy
Yes! It worked. Thank you.
system
(system)
Closed
October 27, 2021, 12:30pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.