Path.data - Windows UNC Path


#1

A question for my configuration:

When I setup a ES cluster on Windows, i'm able to define the path.data to (example) : S:\DataShare (which is locally a disk)

When I map a network drive (so a UNC share to another server like \computer\ES1Datashare) to M: and map that to path.data: M:\ES1Datashare, this doesn't work:

[2016-11-10 16:45:36,220][INFO ][node ] [esdata-3] version[1.7.5], pid[12652], build[00f95f4/2016-02-02T09:55:30Z]
[2016-11-10 16:45:36,220][INFO ][node ] [esdata-3] initializing ...
[2016-11-10 16:45:36,345][INFO ][plugins ] [esdata-3] loaded [], sites []
[2016-11-10 16:45:36,392][ERROR][bootstrap ] Exception
org.elasticsearch.ElasticsearchIllegalStateException: Failed to created node environment
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:167)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.nio.file.FileSystemException: W:\ES-Data-3-Store\elasticcluster\nodes\0: Unable to determine if root directory exists
at java.nio.file.Files.createDirectories(Unknown Source)
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:132)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:165)
... 4 more

Is it even possible to add a Windows share to the path.data config?

Thanks in advance.


(David Pilato) #2

Using network dirs is a bad idea in general.
You should prefer local disk.


(Trondhindenes) #3

Qre you running ES with your own user account? Drive mappings are a per-user thing in windows. The ES service runs as system by default, so it won't have access to your user account's drive mapping.


#4

So changing the Log On account to an AD-user will bypass this?

How does this effect the ES-security model?

Thanks for your replies.


(Trondhindenes) #5

I'm just stating that if you have mapped a drive using a different user than you're running ES with, it will definetely not work.


#6

I was able to to bypass this by using the following:

I ran the ElasticSearch application as an Active Directory User who has access to the newly created share.

Afterwards I created a link in Windows to make the network path accessible by a local Windows path:

  • command prompt as Administrator:
    mklink /D E:[Foldername to create] [networkshare]
    Example:
    mklink /D e:\ES-Data3-Store \networkshare\datastoreforES

Afterwards I updated my path.data to the new local share: E:\ES-Data3-Store

ElasticSearch node boots without issue.

Extra notes:
I'm aware that this is not best practice since there will be a latency on accessing a network share rather than directly connecting to a windows local (SSD) disk.


#7

What are the security risks by using this method?


(Trondhindenes) #8

I don't see any special risk with this setup. It might even be a good option - newer versions of the SMB proticol (SMB 3.0) is very geared towards running workloads using a network share (both hyper-v vms and sql databases are supported and encouraged to run over smb3), so this setup might in fact be very viable, tho not something that's likely tested by many.


(system) #9

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