Elasticsearch not running on windows 10

Elasticsearch not running, showing:
C:\Users\Applicate\Downloads\elasticsearch\elasticsearch-6.2.4>bin\elasticsearch.bat
[2018-05-18T06:53:52,513][INFO ][o.e.n.Node ] [LAPTOP-12HF0A7H] initializing ...
[2018-05-18T06:53:52,700][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [LAPTOP-12HF0A7H] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Failed to create node environment
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4]
Caused by: java.lang.IllegalStateException: Failed to create node environment
at org.elasticsearch.node.Node.(Node.java:267) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
... 6 more
Caused by: java.nio.file.AccessDeniedException: C:\ProgramData\Elastic\Elasticsearch\data\nodes\0_state\node-3.st
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[?:?]
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) ~[?:?]
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source) ~[?:?]
at java.nio.file.Files.deleteIfExists(Unknown Source) ~[?:1.8.0_66]
at org.elasticsearch.gateway.MetaDataStateFormat.cleanupOldFiles(MetaDataStateFormat.java:230) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.gateway.MetaDataStateFormat.write(MetaDataStateFormat.java:162) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:363) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:246) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.(Node.java:264) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
... 6 more

C:\Users\Applicate\Downloads\elasticsearch\elasticsearch-6.2.4>

Looks like the user that you're running Elasticsearch as doesn't have access to write to this location. You could change the user it's running as to one that does or change the Elasticsearch data directory.

3 Likes

I do not understand. i just installed Elasticsearch with the same user. And I had unziped the folder in Download directory.

Maybe you did an administrator install and now you're running as not an administrator?

Yes, I was making that mistake. It worked now.

Thanks.

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