When you say sometimes, you mean while this container is running, or when you stop and restart or recreate this container, as those are very different things.
Do you get errors or all the indexes are gone or what?
Also, as a cluster, don't you have to expose port 9300 also?
discovery.seed_hosts:["127.0.0.1:9300"]
Kinda odd to see that, as means it uses itself to join a cluster? Or is there another container running on port 9300? If so, you still have a problem as this node also needs 9300 exposed for 'transport'.
That makes no sense if the container has been up - no OTHER container also mounts this data area does it? Elasticsearch cannot share volumes so if you have more than one ES container on this VM/host, it has to have a separate mount (which is why Docker volumes are better).
I believe it's a mix and yes, confusing, as it's all picked up by the start script in the container - some things are written to the config file, some to the JVM command line and/or env vars - this is how it's put in composer to feed all that.
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.