For reasons that may be uninteresting to many, I find myself needing to run two instances of ElasticSearch on the same Windows machine. I have unzipped the 7.13.4 archive into two separate directories and set them up and they run just fine as BAT files. However, when I install them as Windows services using NSSM (with unique names), they install but once I run the second one the first one pauses, then the second one pauses.
I am not a Windows guy, so the service thing is not completely understood. Any threads I can pull to figure out why they won't both run?
It is a legacy installation setup. The machine has 32G of ram on a XEON processor. The reason is they want an ILM policy for Hot / Warm. The Hot node is installed on the C drive (SDD) and the Warm node is installed on the D drive (spinning disk) I have explained the idea of hot/warm is not as dependent on the type of drive it is installed on, but that it is sharing the OS and processors. I suggested they run a single instance and they will get better performance but they are having none of that. So, I need to run two instances.
You can run multiple instances on the same server, but you need to have completely separated configurations and services, you need to share your configurations.
Anyway, with 16 GB you could use 8 GB for your instances each one with 4 GB, but I would not recommend that, and neither using a hot/warm architecture in this configuration, the performance will be better using a single instance with 8 GB of HEAP.
When I run ES as a BAT file, I get the various logs in the 'log' directory. Once I start ES as a Windows Service, I no longer see the logs in the 'log' directory. Are they being written somewhere else?
I would recommend that you follow this part of the documentation and use the mentioned .bat. file to create your services and see if it works.
Also, you need to set everything in your elasticsearch.yml file, you are not setting the path.logs and your warm not are not setting the transport.tcp port, in this scenario if for some reason the warm node starts first it will try to bind to the port 9300 and your hot node will not be able to start as it will also try to bind to the same port.
You are also missing the discovery.seed_hosts config.
The first part of your hot node configuration should look like this:
Nice! Will give that a try today. As for the discovery.seed_hosts value, though. Since these are both running on the same machine with one ip address, is the 'hostname-of-your-node' just 'localhost' or the ip address of the machine?
As a follow up, I was able to install ElasticSearch twice as a windows service. I did need to use the supplied scripts instead of NSSM. I’m sure NSSM can do it, but would need more configuration like environment variables to make it work. Thanks for all the help,
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.