Can't launch Elasticsearch

Hi,

I am very happy using Elasticsearch and are trying to upgrade from 1.2.1 to 6.3.2.

I have downloaded 6.3.2 and set java to 1.8.0, see:

$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Server VM (build 25.181-b13, mixed mode)

When I try to launch Elasticsearch I get a java.nio.file.AccessDeniedException.

I know it has to do with file or folder permissions, I just don't know which file or folder's permission to edit. Does anyone have pointers for solving this?

This is the output I get:

[dgam@vps-... srv]$ cd elasticsearch-6.3.2
[dgam@vps-... elasticsearch-6.3.2]$ bin/elasticsearch -d
Exception in thread "main" java.nio.file.AccessDeniedException: /srv/elasticsearch-6.3.2/config/jvm.options
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:58)

Many thanks,

Diederik

This is basically file permission issues and it is not an issue with Elasticsearch.

It seems that you are using a user named dgam. You need to make sure that this user has full read/write permissions to this Elasticsearch directory.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.