ElasticSearch failing to start - The directory is not a subdirectory of the root directory

I'm new to Elasticsearch.. I download it on a windows 8.1 system and I'm getting the following error:

[2015-06-26 13:21:17,407][INFO ][node ] [Honcho] version[1.6.0], pid[22412], build[cdd3ac4/2015-06-09T13:36:34Z]
[2015-06-26 13:21:17,407][INFO ][node ] [Honcho] initializing ...
[2015-06-26 13:21:17,410][INFO ][plugins ] [Honcho] loaded , sites
{1.6.0}: Initialization Failed ...

  • ElasticsearchIllegalStateException[Failed to obtain node lock, is the following location writable?: [D:\elasticsearch-1.6.0\data\elasticsearch]]
    IOException[failed to obtain lock on D:\elasticsearch-1.6.0\data\elasticsearch\nodes\49]
    FileSystemException[D:\elasticsearch-1.6.0\data\elasticsearch\nodes\49: The directory is not a subdirectory of the root directory.

Tried on a Windows 7 system and no issues.
The save version of java is run on by systems and the command prompt was an admin command prompt.

Any thoughts?


1 Like

Are you linking your data directory anywhere else?

I made no changes, simply unzipped it and ensured that the java_home environment variable was correct.


I got the same error. I temporarily"solve" it by setting index data on share drive or even a USB stick.


I'm having the same issue with ElasticSearch 1.7.5 on Windows 10.
Does anyone have any advice on this?