I am trying to run 3 elasticsearch masters on a single node cluster but am having issues regarding the virtual memory setting. Everything seems to be running fine locally if I create the cluster/masters after first using sysctl to increase the virtual memory but the issue is that in production we do not run in privileged mode/allow modification to the virtual memory so I cannot add the sysctl procedure to create my elasticsearch cluster. I tried to get the cluster to start up and run locally without the sysctl beforehand and got the following message:
[2017-10-30T15:46:12,338][INFO ][o.e.b.BootstrapChecks ] [es-0] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Although it isn't recommended, I also tried by disabling the bootstrap checks by adding the discovery.type: single-node config to my elasticsearch.yml file. When I do this my masters spin up instead of crashing like before. But accessing /_cluster/health?pretty shows a red status:
Each master is a node. I am not sure I understand how can you run 3 master nodes on single node cluster? Would it be at least a 3 node cluster? Perhaps you mean that 3 master nodes on a single machines? But then I am not quite sure what you are trying to achieve by doing that.
Sorry I had my terminology mixed up so I guess thats the reason the single node doesn't work. Yeah I want 3 master nodes on a single machine. I'm trying to combine the functionalities so that the 3 nodes are master/client/data. Here is the config for all 3:
I still don't understand why you want to run 3 nodes on the same machine, but if this is for testing, you can set transport interface to localhost and switch back to zen discovery.
Thanks! Would that be the transport.host: localhost config? Minikube is a vm so would I set the vm IP instead? Also what would change if I wanted to run just 1 node locally in my vm without modifying virtual memory.
EDIT: I was able to get it running without modifying memory by using a single node
Yes. You can disable bootstrap checks by running a single node cluster using single node discovery or by running several nodes using only localhost communication on the transport layer. In both cases, the cluster would be confined to a single machine.
I would also like to note that satisfying bootstraps checks is crucial for running elasticsearch in production. So, please check this blog post before trying to disable them.
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.