I've only been able to run 2-6.0 ES nodes on a single server by manually editing the /usr/share/elasticsearch/bin/elasticsearch-env file before running the seperately configured elasticsearch.service files (ie running systemctl using elasticsearch-node-1.service, then elasticsearch-node-2.service)
specifically, i had to change the line towards the end that says:
if [ -f /etc/default/elasticsearch ]; then source /etc/default/elasticsearch; fi
to a new default config file for the second instance (@ /etc/default/elasticsearch-node-2 by editing the line to:
if [ -f /etc/default/elasticsearch-node-2 ]; then source /etc/default/elasticsearch-node-2; fi
Shouldn't this line be getting its setting from a configuration Variable Setting that is setup in my 2nd node's config file?
Without editing this file manually, when trying to startup the 2nd instance, it uses original /etc/elasticsearch/elasticsearch.yml file for configuration, instead of the second config directory i setup so it gives an error about not being able to use an already locked data directory, because its using the exact same config as the first instance.