Unable to connect ElassticSearch on Dockers Container


(shahid) #1

Hi Teach Team,


My ELK server in on a Host machine (AWS Ec2) i deployed /
install the ELK by Dockers-Container.
Today morning when i tried to login on my Kibann UI i got this the error. Unable to connect with easticsearch:9200. when i login my EC2 cli and check the status of my containers logstach and kibana was ok only elastic-search container status was "Exited (127) 4 hours ago". So i start that elasticsearch container and after that Kibana UI is working fine. only the issue on kibana i faced when i click on any of the tab Dashboard, discover, visualizer it redirect me to the management tab with error there is no Index you have to create a new index, so i created an new index filebeat-6* even the ok index filebeat-* was already available. after create the new index i am able to get the discover logs and dashboard and visualizer also. I observed that the old data is not there.
My question is
1 - why this is happening with the ELK
2 - this is the due to the dockers Containers if yes let me know know the settings
3 - why i have to create new index after restart the Elastic Container.
4 how can i avoid this not happened in future.
5 - is there any configuration or settings which i missed.

All the screen shorts are attached here. for there reference.


(Aaron Caldwell) #2

Hello,

I'm not entirely sure how AWS handles data storage for docker containers, but I would expect they support local volume mapping, which as it sounds would store data locally rather than getting lost when the container shuts down. You can see an example of what this configuration would look like outside of EC2 here: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

Having said that, if there was critical data on your stopped Elasticsearch instance, you may be able to recover your data by looking for the previously stopped container instance and restarting it and then exporting the data.

-Aaron


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.