Hi i have an issue when i try to create a cluster with 2 nodes
here is the first configuration file:
---------------------------------- Cluster -----------------------------------
Use a descriptive name for your cluster:
cluster.name: LiferayElasticSearch
------------------------------------ Node ------------------------------------
Use a descriptive name for the node:
node.name: lisyx
Add custom attributes to the node:
node.master: true
node.data: true
node.rack: r1
----------------------------------- Paths ------------------------------------
Path to directory where to store the data (separate multiple locations by comma):
path.data: /path/to/data
Path to log files:
path.logs: /path/to/logs
----------------------------------- Memory -----------------------------------
Lock the memory on startup:
bootstrap.memory_lock: true
Make sure that the ES_HEAP_SIZE environment variable is set to about half the memory
available on the system and that the owner of the process is allowed to use this limit.
Elasticsearch performs poorly when the system is swapping the memory.
---------------------------------- Network -----------------------------------
Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 172.38.1.37
Set a custom port for HTTP:
http.port: 9200
For more information, see the documentation at:
http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
--------------------------------- Discovery ----------------------------------
discovery.zen.ping.unicast.hosts: ["172.38.1.37","172.38.3.167"]
---------------------------------- Gateway -----------------------------------
For more information, see the documentation at:
http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html
---------------------------------- Various -----------------------------------
Disable starting multiple nodes on a single system:
node.max_local_storage_nodes: 1
Require explicit names when deleting indices:
action.destructive_requires_name: true
and the second file configuration of the data node it´s here.
======================== Elasticsearch Configuration =========================
---------------------------------- Cluster -----------------------------------
Use a descriptive name for your cluster:
cluster.name: LiferayElasticSearch
------------------------------------ Node ------------------------------------
Use a descriptive name for the node:
node.name: lisyx-2
Add custom attributes to the node:
node.rack: r1
node.data: true
----------------------------------- Paths ------------------------------------
Path to directory where to store the data (separate multiple locations by comma):
path.data: /path/to/data
Path to log files:
path.logs: /path/to/logs
----------------------------------- Memory -----------------------------------
Lock the memory on startup:
bootstrap.memory_lock: true
Make sure that the ES_HEAP_SIZE environment variable is set to about half the memory
available on the system and that the owner of the process is allowed to use this limit.
Elasticsearch performs poorly when the system is swapping the memory.
---------------------------------- Network -----------------------------------
Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 172.38.3.167
Set a custom port for HTTP:
http.port: 9200
For more information, see the documentation at:
http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
--------------------------------- Discovery ----------------------------------
Pass an initial list of hosts to perform discovery when new node is started:
The default list of hosts is ["127.0.0.1", "[::1]"]
discovery.zen.ping.unicast.hosts: ["172.38.1.37","172.38.3.167"]
Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
discovery.zen.minimum_master_nodes: 3
For more information, see the documentation at:
http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html
---------------------------------- Gateway -----------------------------------
Block initial recovery after a full cluster restart until N nodes are started:
gateway.recover_after_nodes: 3
For more information, see the documentation at:
http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html
---------------------------------- Various -----------------------------------
Disable starting multiple nodes on a single system:
node.max_local_storage_nodes: 1
Require explicit names when deleting indices:
action.destructive_requires_name: true
Could you please help me i am getting this
[centos@ip-172-38-1-37 elasticsearch-2.4.0]$ curl -XGET '172.38.1.37:9200/_cluster/health?pretty'
[2018-07-25 19:19:22,694][DEBUG][action.admin.cluster.health] [lisyx] no known master node, scheduling a retry
[2018-07-25 19:19:30,095][DEBUG][action.admin.cluster.health] [lisyx] timed out while retrying [cluster:monitor/health] after failure (timeout [30s])
[2018-07-25 19:19:30,096][WARN ][rest.suppressed ] path: /_cluster/health, params: {pretty=}
MasterNotDiscoveredException[null]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$5.onTimeout(TransportMasterNodeAction.java:234)
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:236)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:804)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[2018-07-25 19:19:52,695][DEBUG][action.admin.cluster.health] [lisyx] timed out while retrying [cluster:monitor/health] after failure (timeout [30s])
[2018-07-25 19:19:52,695][WARN ][rest.suppressed ] path: /_cluster/health, params: {pretty=}
MasterNotDiscoveredException[null]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$5.onTimeout(TransportMasterNodeAction.java:234)
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:236)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:804)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{
"error" : {
"root_cause" : [ {
"type" : "master_not_discovered_exception",
"reason" : null
} ],
"type" : "master_not_discovered_exception",
"reason" : null
},
"status" : 503
}
Thanks in advance for your kindly support!Preformatted text