Hello,
I had 2 node (version 2.x) test setup which was running properly. recently I have added two more nodes and changed the cluster name, due to cluster name change i have lost indexes and new indexes were created, finally the java API is taking 45 seconds to connect the cluster "Elasticsearch" and 40 sec to close the connection . The API simply collecting metric data of just 20 servers.
no logs were generated for slowlog index and slowlog search. How to sortout this delay delay?
Note:
nodes : es1,es2,es3 & es4 .
Nodes es1 & es2 are in public Ip range and es3 & es4 are in private Ip range.
Firewall is present between public Ip range and private ip range. so I have opened 9200,9300 for cluster communication through firewall.
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
{
"cluster_name" : "Elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 4,
"number_of_data_nodes" : 4,
"active_primary_shards" : 43,
"active_shards" : 86,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
/etc/elasticsearch/elasticsearch.yml
cluster.name: Elasticsearch
script.inline: on
script.indexed: on
node.name: "localhost"
bootstrap.mlockall: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["es1:9300","es2:9300","es3:9300","es4:9300"]
indices.store.throttle.max_bytes_per_sec: 150mb
path.data: /elastic/data
path.repo: /elastic/backup
http.port: 9200
http.enabled: true
network.host: hostname
index.number_of_shards: 4
index.number_of_replicas: 1
node.master: true
node.data: true
index.search.slowlog.threshold.query.warn: 10s
index.search.slowlog.threshold.query.info: 5s
index.search.slowlog.threshold.query.debug: 2s
index.search.slowlog.threshold.query.trace: 500ms
index.search.slowlog.threshold.fetch.warn: 1s
index.search.slowlog.threshold.fetch.info: 800ms
index.search.slowlog.threshold.fetch.debug: 500ms
index.search.slowlog.threshold.fetch.trace: 200ms
index.indexing.slowlog.threshold.index.warn: 10s
index.indexing.slowlog.threshold.index.info: 5s
index.indexing.slowlog.threshold.index.debug: 2s
index.indexing.slowlog.threshold.index.trace: 500ms
index.indexing.slowlog.level: info
index.indexing.slowlog.source: 1000
/etc/sysconfig/elasticsearch
ES_HEAP_SIZE=4g
ES_STARTUP_SLEEP_TIME=5
MAX_OPEN_FILES=65535
MAX_LOCKED_MEMORY=unlimited