Revanth
Revanth

Reputation: 87

Unable to create temporary keystore error while launching elasticsearch.bat from cmd

I'm trying to get my hands around elasticsearch, I've followed the documentation from the official docs for setting up. But whenever I try to run the elasticsearch.bat file, I just keep getting this error.

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.elasticsearch.cli.UserException: unable to create temporary keystore at [C:\Program Files\elasticsearch-6.7.2\config\elasticsearch.keystore.tmp], please check filesystem permissions
Likely root cause: java.nio.file.AccessDeniedException: C:\Program Files\elasticsearch-6.7.2\config\elasticsearch.keystore.tmp

I was trying to run the 6.7 version and faced this error. So I used the latest 7.2 version and still ended up with the same error.

I'm running a Windows 10 Operating System.

Upvotes: 3

Views: 4086

Answers (1)

dev
dev

Reputation: 61

OK.... Got the same error, but for Ubuntu 20.04. The workaround for this was to run these two commands:

sudo chmod g+w /etc/elasticsearch

Above command changes file permissions (allowing) for creating keystroke manually. And the following command creates that manually.

sudo -u elasticsearch -s /usr/share/elasticsearch/bin/elasticsearch-keystore create

Upvotes: 1

Related Questions