I'm trying to set up an elasticsearch cluster with docker containers with marathon on mesos and I'm trying to use the file based discovery. I have a cronjob that runs every 1 minute and updates the file with the list of hosts. The problem is this only works once, it doesn't update dynamically as the documentation here says: https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-file.html
"Anytime a change is made to the unicast_hosts.txt file, even as Elasticsearch continues to run, the new changes will be picked up by the plugin and the new hosts list will be used for the next pinging round for master election."
I have a marathon job that has 3 nodes. Each node has a cron job that updates the file dynamically. First, none of the nodes form a cluster. I scale down to 2 nodes, the file gets updated, no cluster still.
Even with scaling up again to 5 nodes, the file gets updated with all of the new IPs but still elasticsearch doesn't try to form a cluster with them. I know my connectivity works because if I use the regular unicast host list they work so I'm almost 100% sure it's the plugin not working.
Not sure if this is relevant or not but I'm running elasticsearch on the alpine based docker container from the official docker hub.
How can I do that specifically for the discovery plugin? I know how to change it to debug using config/log4j2.properties but I'm not sure if it's what you're asking for.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.