I have installed Elasticsearch 6.x in my Debian 7 (wheezy)
. I tried to start with service elasticsearch start
but its give me an error message
I had the same issue on a CentOS7 cPanel server with ElasticSearch 7.8 installed via YUM. As per the answer, I did the following:
ES_JAVA_OPTS="-Djna.tmpdir=/var/lib/elasticsearch/tmp"
in /etc/sysconfig/elasticsearch
mkdir -p /var/lib/elasticsearch/tmp
chown -R elasticsearch.elasticsearch /var/lib/elasticsearch/tmp