My java application distribution is as below:
Four physical servers has three JVMs each. Hence total 12 instances of java applications are running. Each java application logs two different log files that are captured by Logstash and fed to Elasticsearch. Kibana displays the dashboard. When I run the application in only one JVM and single instances of ELK things works fine.
I am trying to setup ELK in clustered configuration. I am using the IP of the four machines, for the convenience of explaining and reference to the log files. The ips are
172.18.17.43 -- Elasticsearch client node
172.18.17.44 -- Elasticsearch data node1
172.18.17.45 -- Elasticsearch master node
172.18.17.46 -- Elasticsearch data node 2
Logstash is installed in each of the four machines, but points to elasticsearch in the master node(172.18.17.45). Hence the logstash.conf is same for all the four machines. Kibana is installed only in the machine having the Elasticsearch client (172.18.17.43).
The start sequence of ELK is as below:
Start Elasticsearch master, then start client node, then start the data modes. Logstash is also started in the same sequence. Kibana is started at last.
ELK gets started correctly, logs also gets posted to Kibana indexes. Data gets pased correctly. But after 5-10 mins, the Elasticsearch master crashes. Sometimes, the Kibana UI does not display anything. Any clue on what is wrong will be helpful.
Extract from the configuration files:
-
Elasticsearch master(172.18.17.45) yml:
cluster.name: npci
node.name: "elasticsearch_master"
node.master: true
node.data: false
network.publish_host: 172.18.17.45
network.host: 172.18.17.45
transport.tcp.port: 9300
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["172.18.17.45:9300"]
http.cors.enabled: true -
Elasticsearch data node1(172.18.17.44) yml
cluster.name: npci node.name: "elasticsearch_data1" node.master: false node.data: true index.number_of_shards: 5 index.number_of_replicas: 1 network.publish_host: 172.18.17.44 network.host: 172.18.17.44 transport.tcp.port: 9301 discovery.zen.minimum_master_nodes: 1 discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["172.18.17.45:9300"] http.cors.enabled: true
- Elasticsearch data node2(172.18.17.46) yml
cluster.name: npci node.name: "elasticsearch_data2" node.master: false node.data: true index.number_of_shards: 2 index.number_of_replicas: 1 network.publish_host: 172.18.17.46 network.host: 172.18.17.46 transport.tcp.port: 9303 discovery.zen.minimum_master_nodes: 1 discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["172.18.17.45:9300"] http.jsonp.enable: true
- Elasticsearch client node(172.18.17.43) yml
cluster.name: npci node.name: "elasticsearch_client" node.master: false node.data: false index.number_of_shards: 0 index.number_of_replicas: 0 network.publish_host: 172.18.17.43 network.host: 172.18.17.43 transport.tcp.port: 9302 discovery.zen.minimum_master_nodes: 1 discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["172.18.17.45:9300"]
The output in logstash.conf is as below:
output{
elasticsearch {
host => "172.18.17.45"
cluster => "npci"
}
With this configuration ELK gets started correctly, logs also gets posted to Kibana indexes. Data gets pased correctly. But after 5-10 mins, the Elasticsearch master crashes. Sometimes, the Kibana UI does not display anything. Any clue on what is wrong will be helpful.