# \-Des.path.conf issue?

**URL:** <https://discuss.elastic.co/t/des-path-conf-issue/4148>\
**Category:** Elasticsearch\
**Created:** [March 23, 2011, 2:30am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148 "2011-03-23T02:30:48Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![roger\_2](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@roger\_2](https://discuss.elastic.co/u/roger_2)\
**Post date:** [March 23, 2011, 2:30am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/1 "2011-03-23T02:30:48Z")

</div>

Hi together

I'm working on an elasticsearch server stub for python using  
a startup via python subprocess.

Everything is working fine except the es.path.conf property.  
It seems that the -Des.path.conf= is not  
working on a windows system. I was testing with windows and  
nix config path e.g. \ and /.

I'm trying to use a plain ES download/unzip and pointing  
to an external config folder which contains some mappings.  
The default config folder inside the donwload/unzip is  
still there.

I was reading in some mailinglists that there is/was an issue  
with append/merge config from different locations, but what  
happens to mapping definiteions locate in config/mappings in  
such a configuration?

Is this an issue?

Regards  
Roger Ineichen

* * *

END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 9:59am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/2 "2011-03-23T09:59:55Z")

</div>

The -D parameter does not work on windows, only on \*nix systems.  
On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:

> Hi together
> 
> I'm working on an elasticsearch server stub for python using  
> a startup via python subprocess.
> 
> Everything is working fine except the es.path.conf property.  
> It seems that the -Des.path.conf= is not  
> working on a windows system. I was testing with windows and  
> nix config path e.g. \ and /.
> 
> I'm trying to use a plain ES download/unzip and pointing  
> to an external config folder which contains some mappings.  
> The default config folder inside the donwload/unzip is  
> still there.
> 
> I was reading in some mailinglists that there is/was an issue  
> with append/merge config from different locations, but what  
> happens to mapping definiteions locate in config/mappings in  
> such a configuration?
> 
> Is this an issue?
> 
> Regards  
> Roger Ineichen
> 
> * * *
> 
> END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 10:00am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/3 "2011-03-23T10:00:25Z")

</div>

But, you can pass those in ES\_JAVA\_OPTS env var.  
On Wednesday, March 23, 2011 at 11:59 AM, Shay Banon wrote:

> The -D parameter does not work on windows, only on \*nix systems.  
> On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> 
> > Hi together
> > 
> > I'm working on an elasticsearch server stub for python using  
> > a startup via python subprocess.
> > 
> > Everything is working fine except the es.path.conf property.  
> > It seems that the -Des.path.conf= is not  
> > working on a windows system. I was testing with windows and  
> > nix config path e.g. \ and /.
> > 
> > I'm trying to use a plain ES download/unzip and pointing  
> > to an external config folder which contains some mappings.  
> > The default config folder inside the donwload/unzip is  
> > still there.
> > 
> > I was reading in some mailinglists that there is/was an issue  
> > with append/merge config from different locations, but what  
> > happens to mapping definiteions locate in config/mappings in  
> > such a configuration?
> > 
> > Is this an issue?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > * * *
> > 
> > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![roger\_2](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@roger\_2](https://discuss.elastic.co/u/roger_2)\
**Post date:** [March 23, 2011, 11:32am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/4 "2011-03-23T11:32:19Z")

</div>

Hi Shay

> Betreff: Re: -Des.path.conf issue?
> 
> The -D parameter does not work on windows, only on \*nix systems.

Thanks for the quick response!  
But now I'm confused. The bin/elasticsearch.bat script  
defines the following start parameter:

* * *

set  
ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
ME%/lib/_;%ES\_HOME%/lib/sigar/_  
set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"

## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"

This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
Is this working or not? Is only the -Des.path.conf not working?

Regards  
Roger Ineichen

> On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> 
> Hi together
> 
> I'm working on an elasticsearch server stub for python using  
> a startup via python subprocess.
> 
> Everything is working fine except the es.path.conf property.  
> It seems that the -Des.path.conf= is not  
> working on a windows system. I was testing with windows and  
> nix config path e.g. \ and /.
> 
> I'm trying to use a plain ES download/unzip and pointing  
> to an external config folder which contains some mappings.  
> The default config folder inside the donwload/unzip is  
> still there.
> 
> I was reading in some mailinglists that there is/was an issue  
> with append/merge config from different locations, but what  
> happens to mapping definiteions locate in config/mappings in  
> such a configuration?
> 
> Is this an issue?
> 
> Regards  
> Roger Ineichen
> 
> * * *
> 
> END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 12:41pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/5 "2011-03-23T12:41:04Z")

</div>

Using: elasticsearch.bat -Des.... will not work, since it only get parsed in the elasticsearch.sh file.

For windows, I see that I did not add the option to add ES\_JAVA\_OPTS. But if you look at the file, you can see that JAVA\_OPTS sets some default values, you can add to that some more -D parameters.

I need to improve that batch shell...  
On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:

> Hi Shay
> 
> > Betreff: Re: -Des.path.conf issue?
> > 
> > The -D parameter does not work on windows, only on \*nix systems.
> 
> Thanks for the quick response!  
> But now I'm confused. The bin/elasticsearch.bat script  
> defines the following start parameter:
> 
> * * *
> 
> set  
> ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
> ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> 
> ## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
> 
> This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
> Is this working or not? Is only the -Des.path.conf not working?
> 
> Regards  
> Roger Ineichen
> 
> > On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> > 
> > Hi together
> > 
> > I'm working on an elasticsearch server stub for python using  
> > a startup via python subprocess.
> > 
> > Everything is working fine except the es.path.conf property.  
> > It seems that the -Des.path.conf= is not  
> > working on a windows system. I was testing with windows and  
> > nix config path e.g. \ and /.
> > 
> > I'm trying to use a plain ES download/unzip and pointing  
> > to an external config folder which contains some mappings.  
> > The default config folder inside the donwload/unzip is  
> > still there.
> > 
> > I was reading in some mailinglists that there is/was an issue  
> > with append/merge config from different locations, but what  
> > happens to mapping definiteions locate in config/mappings in  
> > such a configuration?
> > 
> > Is this an issue?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > * * *
> > 
> > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 12:42pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/6 "2011-03-23T12:42:46Z")

</div>

Sorry, ES\_JAVA\_OPTS is there in teh script  
On Wednesday, March 23, 2011 at 2:41 PM, Shay Banon wrote:

> Using: elasticsearch.bat -Des.... will not work, since it only get parsed in the elasticsearch.sh file.
> 
> For windows, I see that I did not add the option to add ES\_JAVA\_OPTS. But if you look at the file, you can see that JAVA\_OPTS sets some default values, you can add to that some more -D parameters.
> 
> I need to improve that batch shell...  
> On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
> 
> > Hi Shay
> > 
> > > Betreff: Re: -Des.path.conf issue?
> > > 
> > > The -D parameter does not work on windows, only on \*nix systems.
> > 
> > Thanks for the quick response!  
> > But now I'm confused. The bin/elasticsearch.bat script  
> > defines the following start parameter:
> > 
> > * * *
> > 
> > set  
> > ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
> > ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> > set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> > 
> > ## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
> > 
> > This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
> > Is this working or not? Is only the -Des.path.conf not working?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > > On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> > > 
> > > Hi together
> > > 
> > > I'm working on an elasticsearch server stub for python using  
> > > a startup via python subprocess.
> > > 
> > > Everything is working fine except the es.path.conf property.  
> > > It seems that the -Des.path.conf= is not  
> > > working on a windows system. I was testing with windows and  
> > > nix config path e.g. \ and /.
> > > 
> > > I'm trying to use a plain ES download/unzip and pointing  
> > > to an external config folder which contains some mappings.  
> > > The default config folder inside the donwload/unzip is  
> > > still there.
> > > 
> > > I was reading in some mailinglists that there is/was an issue  
> > > with append/merge config from different locations, but what  
> > > happens to mapping definiteions locate in config/mappings in  
> > > such a configuration?
> > > 
> > > Is this an issue?
> > > 
> > > Regards  
> > > Roger Ineichen
> > > 
> > > * * *
> > > 
> > > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![Administrator\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/administrator_2/32/3211_2.png) [@Administrator\_2](https://discuss.elastic.co/u/Administrator_2)\
**Post date:** [March 23, 2011, 12:57pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/7 "2011-03-23T12:57:50Z")

</div>

I'm confused in the same way, I've been using this batch script to run on  
Windows, and it works just fine when I use the -Des.\* parameters on the  
command line.

I've also been able to get it to work on the command-line in Azure, when  
dynamically mounting drives for data and logs.

This most definitely _does_ work on Windows machines.

- Nick

-----Original Message-----  
From: Roger [[mailto:dev@projekt01.ch](mailto:dev@projekt01.ch)]  
Sent: Wednesday, March 23, 2011 7:32 AM  
To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
Subject: AW: -Des.path.conf issue?

Hi Shay

> Betreff: Re: -Des.path.conf issue?
> 
> The -D parameter does not work on windows, only on \*nix systems.

Thanks for the quick response!  
But now I'm confused. The bin/elasticsearch.bat script  
defines the following start parameter:

* * *

set  
ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
ME%/lib/_;%ES\_HOME%/lib/sigar/_  
set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"

## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"

This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
Is this working or not? Is only the -Des.path.conf not working?

Regards  
Roger Ineichen

> On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> 
> Hi together
> 
> I'm working on an elasticsearch server stub for python using  
> a startup via python subprocess.
> 
> Everything is working fine except the es.path.conf property.  
> It seems that the -Des.path.conf= is not  
> working on a windows system. I was testing with windows and  
> nix config path e.g. \ and /.
> 
> I'm trying to use a plain ES download/unzip and pointing  
> to an external config folder which contains some mappings.  
> The default config folder inside the donwload/unzip is  
> still there.
> 
> I was reading in some mailinglists that there is/was an issue  
> with append/merge config from different locations, but what  
> happens to mapping definiteions locate in config/mappings in  
> such a configuration?
> 
> Is this an issue?
> 
> Regards  
> Roger Ineichen
> 
> * * *
> 
> END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 1:03pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/8 "2011-03-23T13:03:20Z")

</div>

I am talking about executing the shell in this manner:

> elasticsearch.bat -Des.path.conf=path/to/conf

This does not work.

You can set the -D parameters in the ES\_JAVA\_OPS env var.  
On Wednesday, March 23, 2011 at 2:57 PM, Administrator wrote:

> I'm confused in the same way, I've been using this batch script to run on  
> Windows, and it works just fine when I use the -Des.\* parameters on the  
> command line.
> 
> I've also been able to get it to work on the command-line in Azure, when  
> dynamically mounting drives for data and logs.
> 
> This most definitely _does_ work on Windows machines.
> 
> - Nick
> 
> -----Original Message-----  
> From: Roger [[mailto:dev@projekt01.ch](mailto:dev@projekt01.ch)]  
> Sent: Wednesday, March 23, 2011 7:32 AM  
> To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
> Subject: AW: -Des.path.conf issue?
> 
> Hi Shay
> 
> > Betreff: Re: -Des.path.conf issue?
> > 
> > The -D parameter does not work on windows, only on \*nix systems.
> 
> Thanks for the quick response!  
> But now I'm confused. The bin/elasticsearch.bat script  
> defines the following start parameter:
> 
> * * *
> 
> set  
> ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
> ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> 
> ## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
> 
> This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
> Is this working or not? Is only the -Des.path.conf not working?
> 
> Regards  
> Roger Ineichen
> 
> > On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:
> > 
> > Hi together
> > 
> > I'm working on an elasticsearch server stub for python using  
> > a startup via python subprocess.
> > 
> > Everything is working fine except the es.path.conf property.  
> > It seems that the -Des.path.conf= is not  
> > working on a windows system. I was testing with windows and  
> > nix config path e.g. \ and /.
> > 
> > I'm trying to use a plain ES download/unzip and pointing  
> > to an external config folder which contains some mappings.  
> > The default config folder inside the donwload/unzip is  
> > still there.
> > 
> > I was reading in some mailinglists that there is/was an issue  
> > with append/merge config from different locations, but what  
> > happens to mapping definiteions locate in config/mappings in  
> > such a configuration?
> > 
> > Is this an issue?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > * * *
> > 
> > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![roger\_2](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@roger\_2](https://discuss.elastic.co/u/roger_2)\
**Post date:** [March 23, 2011, 1:18pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/9 "2011-03-23T13:18:55Z")

</div>

Hi Shay, Nick

Sorry I was a littlebit unclear in my initial mail.  
I'm not using the \*.bat script. I'm developing a  
python doctest stub server lib which starts the  
ES server from a python subproces. This lib allows  
to configure the ES server.

I'm not able to set the path.conf in any way.  
My code looks something like right now:

* * *

```
# setup java options and friends
libPath = os.path.join(server, 'lib')
sigarPath = os.path.join(libPath, 'sigar')
jarPath = os.path.join(libPath, 'elasticsearch-0.15.2.jar')
JAVA_HOME = os.environ['JAVA_HOME']
JAVA_BIN = os.path.join(JAVA_HOME, 'bin', 'java')
ES_JAVA_OPTS = '-Delasticsearch'
ES_JAVA_OPTS += ' -Des-foreground=yes'
ES_JAVA_OPTS += ' -Des.path.home="%s"' % server
ES_JAVA_OPTS += ' -Des.path.conf="%s"' % config
ES_JAVA_OPTS += ' -Des.path.logs="%s"' % logs

CLASSPATH = os.environ['CLASSPATH']
ES_CLASSPATH = "%s;%s/*;%s/*;%s" % (jarPath, libPath, sigarPath,
    CLASSPATH)

env = dict(os.environ)
env['ES_JAVA_OPTS'] = ES_JAVA_OPTS
env['ES_CLASSPATH'] = ES_CLASSPATH

cmd = [JAVA_BIN,
       "-Xms128m",
       "-Xmx128m",
       "-Djline.enabled=false",
       "-XX:+AggressiveOpts",
       "-XX:+UseParNewGC",
       "-XX:+UseConcMarkSweepGC",
       "-XX:+CMSParallelRemarkEnabled",
       "-XX:+HeapDumpOnOutOfMemoryError",
       ES_JAVA_OPTS,
       "-cp", ES_CLASSPATH, "org.elasticsearch.bootstrap.Bootstrap"]

# start the elasticsearch stub server
try:
    p = subprocess.Popen(cmd, shell=False, env=env)
except Exception, e:
    raise Exception("Subprocess error: %s" % e)

```

* * *

Regards  
Roger Ineichen

> Betreff: Re: AW: -Des.path.conf issue?
> 
> Sorry, ES\_JAVA\_OPTS is there in teh script
> 
> On Wednesday, March 23, 2011 at 2:41 PM, Shay Banon wrote:
> 
> Using: elasticsearch.bat -Des.... will not work, since  
> it only get parsed in the elasticsearch.sh file.
> 
> For windows, I see that I did not add the option to add  
> ES\_JAVA\_OPTS. But if you look at the file, you can see that  
> JAVA\_OPTS sets some default values, you can add to that some  
> more -D parameters.
> 
> I need to improve that batch shell...
> 
> On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
> 
> ```
> Hi Shay 
>   
>   
> 
> Betreff: Re: -Des.path.conf issue?
>   	
> The -D parameter does not work on 
> 
> ```
> 
> windows, only on \*nix systems.
> 
> ```
> Thanks for the quick response!
> But now I'm confused. The bin/elasticsearch.bat script 
> defines the following start parameter:
>   
> ---
> set
> 
> ```
> 
> ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSI  
> ON@.jar;%ES\_HO  
> ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> set ES\_PARAMS=-Delasticsearch  
> -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> 
> ```
> "%JAVA_HOME%\bin\java" %JAVA_OPTS% 
> 
> ```
> 
> %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp  
> "%ES\_CLASSPATH%"  
> "org.elasticsearch.bootstrap.Elasticsearch"  
> ---
> 
> ```
> This means a -D parameter is used e.g. 
> 
> ```
> 
> -Des.path.home="%ES\_HOME%"  
> Is this working or not? Is only the  
> -Des.path.conf not working?
> 
> ```
> Regards
> Roger Ineichen
>   
>   
> 
> On Wednesday, March 23, 2011 at 4:30 
> 
> ```
> 
> AM, Roger wrote:
> 
> ```
> Hi together
>   	
> I'm working on an elasticsearch server 
> 
> ```
> 
> stub for python using  
> a startup via python subprocess.
> 
> ```
> Everything is working fine except the 
> 
> ```
> 
> es.path.conf property.  
> It seems that the -Des.path.conf= is not  
> working on a windows system. I was  
> testing with windows and  
> nix config path e.g. \ and /.
> 
> ```
> I'm trying to use a plain ES 
> 
> ```
> 
> download/unzip and pointing  
> to an external config folder which  
> contains some mappings.  
> The default config folder inside the  
> donwload/unzip is  
> still there.
> 
> ```
> I was reading in some mailinglists that 
> 
> ```
> 
> there is/was an issue  
> with append/merge config from different  
> locations, but what  
> happens to mapping definiteions locate  
> in config/mappings in  
> such a configuration?
> 
> ```
> Is this an issue?
>   	
> Regards
> Roger Ineichen
> _____________________________
> END OF MESSAGE
> 
> ```

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 1:21pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/10 "2011-03-23T13:21:44Z")

</div>

If you fork the Java process, then you need to pass each -D option by itself, the same way you pass -Xmx, -Xms, and so on (your cmd var). Also, remove the AgressiveOpts from there, I am updating the batch script to not include it as well.  
On Wednesday, March 23, 2011 at 3:18 PM, Roger wrote:

> Hi Shay, Nick
> 
> Sorry I was a littlebit unclear in my initial mail.  
> I'm not using the \*.bat script. I'm developing a  
> python doctest stub server lib which starts the  
> ES server from a python subproces. This lib allows  
> to configure the ES server.
> 
> I'm not able to set the path.conf in any way.  
> My code looks something like right now:
> 
> * * *
> 
> # setup java options and friends
> 
> libPath = os.path.join(server, 'lib')  
> sigarPath = os.path.join(libPath, 'sigar')  
> jarPath = os.path.join(libPath, 'elasticsearch-0.15.2.jar')  
> JAVA\_HOME = os.environ['JAVA\_HOME']  
> JAVA\_BIN = os.path.join(JAVA\_HOME, 'bin', 'java')  
> ES\_JAVA\_OPTS = '-Delasticsearch'  
> ES\_JAVA\_OPTS += ' -Des-foreground=yes'  
> ES\_JAVA\_OPTS += ' -Des.path.home="%s"' % server  
> ES\_JAVA\_OPTS += ' -Des.path.conf="%s"' % config  
> ES\_JAVA\_OPTS += ' -Des.path.logs="%s"' % logs
> 
> CLASSPATH = os.environ['CLASSPATH']  
> ES\_CLASSPATH = "%s;%s/_;%s/_;%s" % (jarPath, libPath, sigarPath,  
> CLASSPATH)
> 
> env = dict(os.environ)  
> env['ES\_JAVA\_OPTS'] = ES\_JAVA\_OPTS  
> env['ES\_CLASSPATH'] = ES\_CLASSPATH
> 
> cmd = [JAVA\_BIN,  
> "-Xms128m",  
> "-Xmx128m",  
> "-Djline.enabled=false",  
> "-XX:+AggressiveOpts",  
> "-XX:+UseParNewGC",  
> "-XX:+UseConcMarkSweepGC",  
> "-XX:+CMSParallelRemarkEnabled",  
> "-XX:+HeapDumpOnOutOfMemoryError",  
> ES\_JAVA\_OPTS,  
> "-cp", ES\_CLASSPATH, "org.elasticsearch.bootstrap.Bootstrap"]
> 
> # start the elasticsearch stub server
> 
> try:  
> p = subprocess.Popen(cmd, shell=False, env=env)  
> except Exception, e:  
> raise Exception("Subprocess error: %s" % e)
> 
> * * *
> 
> Regards  
> Roger Ineichen
> 
> > Betreff: Re: AW: -Des.path.conf issue?
> > 
> > Sorry, ES\_JAVA\_OPTS is there in teh script
> > 
> > On Wednesday, March 23, 2011 at 2:41 PM, Shay Banon wrote:
> > 
> > Using: elasticsearch.bat -Des.... will not work, since  
> > it only get parsed in the elasticsearch.sh file.
> > 
> > For windows, I see that I did not add the option to add  
> > ES\_JAVA\_OPTS. But if you look at the file, you can see that  
> > JAVA\_OPTS sets some default values, you can add to that some  
> > more -D parameters.
> > 
> > I need to improve that batch shell...
> > 
> > On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
> > 
> > Hi Shay
> > 
> > Betreff: Re: -Des.path.conf issue?
> > 
> > The -D parameter does not work on  
> > windows, only on \*nix systems.
> > 
> > Thanks for the quick response!  
> > But now I'm confused. The bin/elasticsearch.bat script  
> > defines the following start parameter:
> > 
> > * * *
> > 
> > set
> > 
> > ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSI  
> > ON@.jar;%ES\_HO  
> > ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> > set ES\_PARAMS=-Delasticsearch  
> > -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> > 
> > ## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
> > 
> > This means a -D parameter is used e.g.  
> > -Des.path.home="%ES\_HOME%"  
> > Is this working or not? Is only the  
> > -Des.path.conf not working?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > On Wednesday, March 23, 2011 at 4:30  
> > AM, Roger wrote:
> > 
> > Hi together
> > 
> > I'm working on an elasticsearch server  
> > stub for python using  
> > a startup via python subprocess.
> > 
> > Everything is working fine except the  
> > es.path.conf property.  
> > It seems that the -Des.path.conf= is not  
> > working on a windows system. I was  
> > testing with windows and  
> > nix config path e.g. \ and /.
> > 
> > I'm trying to use a plain ES  
> > download/unzip and pointing  
> > to an external config folder which  
> > contains some mappings.  
> > The default config folder inside the  
> > donwload/unzip is  
> > still there.
> > 
> > I was reading in some mailinglists that  
> > there is/was an issue  
> > with append/merge config from different  
> > locations, but what  
> > happens to mapping definiteions locate  
> > in config/mappings in  
> > such a configuration?
> > 
> > Is this an issue?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > * * *
> > 
> > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![Administrator\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/administrator_2/32/3211_2.png) [@Administrator\_2](https://discuss.elastic.co/u/Administrator_2)\
**Post date:** [March 23, 2011, 1:25pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/11 "2011-03-23T13:25:40Z")

</div>

Oh, yeah, that definitely does not work.

However, it’s easy enough to patch the batch file to take in the first parameter and then attach that to the end of the parameter list that is used to run ES.

- Nick

From: Shay Banon [[mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)]  
Sent: Wednesday, March 23, 2011 9:03 AM  
To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
Subject: Re: RE: -Des.path.conf issue?

I am talking about executing the shell in this manner:

> elasticsearch.bat -Des.path.conf=path/to/conf

This does not work.

You can set the -D parameters in the ES\_JAVA\_OPS env var.

On Wednesday, March 23, 2011 at 2:57 PM, Administrator wrote:

I'm confused in the same way, I've been using this batch script to run on  
Windows, and it works just fine when I use the -Des.\* parameters on the  
command line.

I've also been able to get it to work on the command-line in Azure, when  
dynamically mounting drives for data and logs.

This most definitely _does_ work on Windows machines.

- Nick

-----Original Message-----  
From: Roger [[mailto:dev@projekt01.ch](mailto:dev@projekt01.ch)]  
Sent: Wednesday, March 23, 2011 7:32 AM  
To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
Subject: AW: -Des.path.conf issue?

Hi Shay

Betreff: Re: -Des.path.conf issue?

The -D parameter does not work on windows, only on \*nix systems.

Thanks for the quick response!  
But now I'm confused. The bin/elasticsearch.bat script  
defines the following start parameter:

* * *

set  
ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSION@.jar;%ES\_HO  
ME%/lib/_;%ES\_HOME%/lib/sigar/_  
set ES\_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES\_HOME%"

## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"

This means a -D parameter is used e.g. -Des.path.home="%ES\_HOME%"  
Is this working or not? Is only the -Des.path.conf not working?

Regards  
Roger Ineichen

On Wednesday, March 23, 2011 at 4:30 AM, Roger wrote:

Hi together

I'm working on an elasticsearch server stub for python using  
a startup via python subprocess.

Everything is working fine except the es.path.conf property.  
It seems that the -Des.path.conf= is not  
working on a windows system. I was testing with windows and  
nix config path e.g. \ and /.

I'm trying to use a plain ES download/unzip and pointing  
to an external config folder which contains some mappings.  
The default config folder inside the donwload/unzip is  
still there.

I was reading in some mailinglists that there is/was an issue  
with append/merge config from different locations, but what  
happens to mapping definiteions locate in config/mappings in  
such a configuration?

Is this an issue?

Regards  
Roger Ineichen

* * *

END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![roger\_2](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@roger\_2](https://discuss.elastic.co/u/roger_2)\
**Post date:** [March 23, 2011, 2:39pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/12 "2011-03-23T14:39:44Z")

</div>

hi Shay, Nick

You are right I need a list of -D options in the cmd.  
But my real problem was the following:

' -Des.path.conf="%s"' % config

This ends in a path like:

"C:\foobar"/elasticsearch.yml

This doesn't work because of the "" in the path string, eeeek

Thanks a lot for your help.

btw,  
I will soon release a python package which  
offers a stub server setup which can be used in  
python doc tests. This will (for the first time)  
download an elasticserver release and start the server  
for testing against with something like:

* * *

def doctestSetUp(test):  
# use default elasticsearch stub with our server dir  
here = os.path.dirname( **file** )  
serverDir = os.path.join(here, 'server')  
confDir = os.path.join(here, 'config')  
es01.stub.testing.startElasticSearchServer(serverDir=serverDir,  
confDir=confDir)

def doctestTearDown(test):  
es01.stub.testing.stopElasticSearchServer()

def test\_suite():  
return unittest.TestSuite((  
doctest.DocFileSuite('README.txt',  
setUp=doctestSetUp,  
tearDown=doctestTearDown,  
optionflags=doctest.NORMALIZE\_WHITESPACE|doctest.ELLIPSIS,  
encoding='utf-8'),  
))

## if **name** == ' **main**': unittest.main(defaultTest='test\_suite')

Regards  
Roger Ineichen

> -----Ursprüngliche Nachricht-----  
> Von: Shay Banon [[mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)]  
> Gesendet: Mittwoch, 23. März 2011 14:22  
> An: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
> Betreff: Re: -Des.path.conf issue?
> 
> If you fork the Java process, then you need to pass each -D  
> option by itself, the same way you pass -Xmx, -Xms, and so on  
> (your cmd var). Also, remove the AgressiveOpts from there, I  
> am updating the batch script to not include it as well.
> 
> On Wednesday, March 23, 2011 at 3:18 PM, Roger wrote:
> 
> Hi Shay, Nick
> 
> Sorry I was a littlebit unclear in my initial mail.  
> I'm not using the \*.bat script. I'm developing a  
> python doctest stub server lib which starts the  
> ES server from a python subproces. This lib allows  
> to configure the ES server.
> 
> I'm not able to set the path.conf in any way.  
> My code looks something like right now:
> 
> * * *
> 
> # setup java options and friends
> 
> libPath = os.path.join(server, 'lib')  
> sigarPath = os.path.join(libPath, 'sigar')  
> jarPath = os.path.join(libPath, 'elasticsearch-0.15.2.jar')  
> JAVA\_HOME = os.environ['JAVA\_HOME']  
> JAVA\_BIN = os.path.join(JAVA\_HOME, 'bin', 'java')  
> ES\_JAVA\_OPTS = '-Delasticsearch'  
> ES\_JAVA\_OPTS += ' -Des-foreground=yes'  
> ES\_JAVA\_OPTS += ' -Des.path.home="%s"' % server  
> ES\_JAVA\_OPTS += ' -Des.path.conf="%s"' % config  
> ES\_JAVA\_OPTS += ' -Des.path.logs="%s"' % logs
> 
> CLASSPATH = os.environ['CLASSPATH']  
> ES\_CLASSPATH = "%s;%s/_;%s/_;%s" % (jarPath, libPath, sigarPath,  
> CLASSPATH)
> 
> env =D dict(os.environ)  
> env['ES\_JAVA\_OPTS'] = ES\_JAVA\_OPTS  
> env['ES\_CLASSPATH'] = ES\_CLASSPATH
> 
> cmd = [JAVA\_BIN,  
> "-Xms128m",  
> "-Xmx128m",  
> "-Djline.enabled=false",  
> "-XX:+AggressiveOpts",  
> "-XX:+UseParNewGC",  
> "-XX:+UseConcMarkSweepGC",  
> "-XX:+CMSParallelRemarkEnabled",  
> "-XX:+HeapDumpOnOutOfMemoryError",  
> ES\_JAVA\_OPTS,  
> "-cp", ES\_CLASSPATH, "org.elasticsearch.bootstrap.Bootstrap"]
> 
> ## start the elasticsearch stub server
> 
> try:  
> p = subprocess.Popen(cmd, shell=False, env=env)  
> except Exception, e:  
> raise Exception("Subprocess error: %s" % e)
> 
> * * *
> 
> Regards  
> Roger Ineichen
> 
> ```
> Betreff: Re: AW: -Des.path.conf issue?
>   
> Sorry, ES_JAVA_OPTS is there in teh script
>   
>   
> On Wednesday, March 23, 2011 at 2:41 PM, Shay 
> 
> ```
> 
> Banon wrote:
> 
> ```
> Using: elasticsearch.bat -Des.... will not work, since 
> it only get parsed in the elasticsearch.sh file.
>   
>   
> For windows, I see that I did not add the option to add 
> ES_JAVA_OPTS. But if you look at the file, you 
> 
> ```
> 
> can see that  
> JAVA\_OPTS sets some default values, you can add  
> to that some  
> more -D parameters.
> 
> ```
> I need to improve that batch shell...
>   
>   
> On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
>   
>   
> Hi Shay 
>   
>   
>   
> Betreff: Re: -Des.path.conf issue?
>   
> The -D parameter does not work on 
> windows, only on *nix systems.
>   
>   
>   
> Thanks for the quick response!
> But now I'm confused. The bin/elasticsearch.bat script 
> defines the following start parameter:
>   
> ---
> set
> 
> ```
> 
> ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSI  
> ON@.jar;%ES\_HO  
> ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> set ES\_PARAMS=-Delasticsearch  
> -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> 
> ```
> "%JAVA_HOME%\bin\java" %JAVA_OPTS% 
> %ES_JAVA_OPTS% %ES_PARAMS% -cp
> "%ES_CLASSPATH%" 
> "org.elasticsearch.bootstrap.ElasticSearch"
> ---
>   
> This means a -D parameter is used e.g. 
> -Des.path.home="%ES_HOME%"
> Is this working or not? Is only the 
> -Des.path.conf not working?
>   
> Regards
> Roger Ineichen
>   
>   
>   
> On Wednesday, March 23, 2011 at 4:30 
> AM, Roger wrote:
>   
>   
> Hi together
>   
> I'm working on an elasticsearch server 
> stub for python using
> a startup via python subprocess.
>   
> Everything is working fine except the 
> es.path.conf property. It seems that the 
> 
> ```
> 
> -Des.path.conf= is not  
> working on a windows system. I was  
> testing with windows and  
> nix config path e.g. \ and /.
> 
> ```
> I'm trying to use a plain ES 
> download/unzip and pointing
> to an external config folder which 
> contains some mappings.
> The default config folder inside the 
> donwload/unzip is
> still there.
>   
> I was reading in some mailinglists that 
> there is/was an issue
> with append/merge config from different 
> locations, but what 
> happens to mapping definiteions locate 
> in config/mappings in
> such a configuration?
>   
> Is this an issue?
>   
> Regards
> Roger Ineichen
> ______________________________
> END OF MESSAGE
> 
> ```

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 23, 2011, 3:26pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/13 "2011-03-23T15:26:16Z")

</div>

Thats great!, does it make sense to integrate it with pyes maybe? Something like a test module in pyes (I think there is one now in Elasticsearch.pm).  
On Wednesday, March 23, 2011 at 4:39 PM, Roger wrote:

> hi Shay, Nick
> 
> You are right I need a list of -D options in the cmd.  
> But my real problem was the following:
> 
> ' -Des.path.conf="%s"' % config
> 
> This ends in a path like:
> 
> "C:\foobar"/elasticsearch.yml
> 
> This doesn't work because of the "" in the path string, eeeek
> 
> Thanks a lot for your help.
> 
> btw,  
> I will soon release a python package which  
> offers a stub server setup which can be used in  
> python doc tests. This will (for the first time)  
> download an elasticserver release and start the server  
> for testing against with something like:
> 
> * * *
> 
> def doctestSetUp(test):
> 
> # use default elasticsearch stub with our server dir
> 
> here = os.path.dirname( **file** )  
> serverDir = os.path.join(here, 'server')  
> confDir = os.path.join(here, 'config')  
> es01.stub.testing.startElasticSearchServer(serverDir=serverDir,  
> confDir=confDir)
> 
> def doctestTearDown(test):  
> es01.stub.testing.stopElasticSearchServer()
> 
> def test\_suite():  
> return unittest.TestSuite((  
> doctest.DocFileSuite('README.txt',  
> setUp=doctestSetUp,  
> tearDown=doctestTearDown,  
> optionflags=doctest.NORMALIZE\_WHITESPACE|doctest.ELLIPSIS,  
> encoding='utf-8'),  
> ))
> 
> ## if **name** == ' **main**': unittest.main(defaultTest='test\_suite')
> 
> Regards  
> Roger Ineichen
> 
> > -----UrsprÃ¼ngliche Nachricht-----  
> > Von: Shay Banon [[mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)]  
> > Gesendet: Mittwoch, 23. MÃ¤rz 2011 14:22  
> > An: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
> > Betreff: Re: -Des.path.conf issue?
> > 
> > If you fork the Java process, then you need to pass each -D  
> > option by itself, the same way you pass -Xmx, -Xms, and so on  
> > (your cmd var). Also, remove the AgressiveOpts from there, I  
> > am updating the batch script to not include it as well.
> > 
> > On Wednesday, March 23, 2011 at 3:18 PM, Roger wrote:
> > 
> > Hi Shay, Nick
> > 
> > Sorry I was a littlebit unclear in my initial mail.  
> > I'm not using the \*.bat script. I'm developing a  
> > python doctest stub server lib which starts the  
> > ES server from a python subproces. This lib allows  
> > to configure the ES server.
> > 
> > I'm not able to set the path.conf in any way.  
> > My code looks something like right now:
> > 
> > * * *
> > 
> > # setup java options and friends
> > 
> > libPath = os.path.join(server, 'lib')  
> > sigarPath = os.path.join(libPath, 'sigar')  
> > jarPath = os.path.join(libPath, 'elasticsearch-0.15.2.jar')  
> > JAVA\_HOME = os.environ['JAVA\_HOME']  
> > JAVA\_BIN = os.path.join(JAVA\_HOME, 'bin', 'java')  
> > ES\_JAVA\_OPTS = '-Delasticsearch'  
> > ES\_JAVA\_OPTS += ' -Des-foreground=yes'  
> > ES\_JAVA\_OPTS += ' -Des.path.home="%s"' % server  
> > ES\_JAVA\_OPTS += ' -Des.path.conf="%s"' % config  
> > ES\_JAVA\_OPTS += ' -Des.path.logs="%s"' % logs
> > 
> > CLASSPATH = os.environ['CLASSPATH']  
> > ES\_CLASSPATH = "%s;%s/_;%s/_;%s" % (jarPath, libPath, sigarPath,  
> > CLASSPATH)
> > 
> > env =D dict(os.environ)  
> > env['ES\_JAVA\_OPTS'] = ES\_JAVA\_OPTS  
> > env['ES\_CLASSPATH'] = ES\_CLASSPATH
> > 
> > cmd = [JAVA\_BIN,  
> > "-Xms128m",  
> > "-Xmx128m",  
> > "-Djline.enabled=false",  
> > "-XX:+AggressiveOpts",  
> > "-XX:+UseParNewGC",  
> > "-XX:+UseConcMarkSweepGC",  
> > "-XX:+CMSParallelRemarkEnabled",  
> > "-XX:+HeapDumpOnOutOfMemoryError",  
> > ES\_JAVA\_OPTS,  
> > "-cp", ES\_CLASSPATH, "org.elasticsearch.bootstrap.Bootstrap"]
> > 
> > ## start the elasticsearch stub server
> > 
> > try:  
> > p = subprocess.Popen(cmd, shell=False, env=env)  
> > except Exception, e:  
> > raise Exception("Subprocess error: %s" % e)
> > 
> > * * *
> > 
> > Regards  
> > Roger Ineichen
> > 
> > Betreff: Re: AW: -Des.path.conf issue?
> > 
> > Sorry, ES\_JAVA\_OPTS is there in teh script
> > 
> > On Wednesday, March 23, 2011 at 2:41 PM, Shay  
> > Banon wrote:
> > 
> > Using: elasticsearch.bat -Des.... will not work, since  
> > it only get parsed in the elasticsearch.sh file.
> > 
> > For windows, I see that I did not add the option to add  
> > ES\_JAVA\_OPTS. But if you look at the file, you  
> > can see that  
> > JAVA\_OPTS sets some default values, you can add  
> > to that some  
> > more -D parameters.
> > 
> > I need to improve that batch shell...
> > 
> > On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
> > 
> > Hi Shay
> > 
> > Betreff: Re: -Des.path.conf issue?
> > 
> > The -D parameter does not work on  
> > windows, only on \*nix systems.
> > 
> > Thanks for the quick response!  
> > But now I'm confused. The bin/elasticsearch.bat script  
> > defines the following start parameter:
> > 
> > * * *
> > 
> > set
> > 
> > ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSI  
> > ON@.jar;%ES\_HO  
> > ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> > set ES\_PARAMS=-Delasticsearch  
> > -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> > 
> > ## "%JAVA\_HOME%\bin\java" %JAVA\_OPTS% %ES\_JAVA\_OPTS% %ES\_PARAMS% -cp "%ES\_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
> > 
> > This means a -D parameter is used e.g.  
> > -Des.path.home="%ES\_HOME%"  
> > Is this working or not? Is only the  
> > -Des.path.conf not working?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > On Wednesday, March 23, 2011 at 4:30  
> > AM, Roger wrote:
> > 
> > Hi together
> > 
> > I'm working on an elasticsearch server  
> > stub for python using  
> > a startup via python subprocess.
> > 
> > Everything is working fine except the  
> > es.path.conf property. It seems that the  
> > -Des.path.conf= is not  
> > working on a windows system. I was  
> > testing with windows and  
> > nix config path e.g. \ and /.
> > 
> > I'm trying to use a plain ES  
> > download/unzip and pointing  
> > to an external config folder which  
> > contains some mappings.  
> > The default config folder inside the  
> > donwload/unzip is  
> > still there.
> > 
> > I was reading in some mailinglists that  
> > there is/was an issue  
> > with append/merge config from different  
> > locations, but what  
> > happens to mapping definiteions locate  
> > in config/mappings in  
> > such a configuration?
> > 
> > Is this an issue?
> > 
> > Regards  
> > Roger Ineichen
> > 
> > * * *
> > 
> > END OF MESSAGE

---

<div class="post-metadata">

**Author:** ![roger\_2](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@roger\_2](https://discuss.elastic.co/u/roger_2)\
**Post date:** [March 23, 2011, 4:02pm UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/14 "2011-03-23T16:02:40Z")

</div>

Hi Shay

> Betreff: Re: AW: -Des.path.conf issue?
> 
> Thats great!, does it make sense to integrate it with pyes  
> maybe? Something like a test module in pyes (I think there is  
> one now in Elasticsearch.pm).

Yes, why not. I'll post a message if the package is ready to use.  
Let's then see how this will fit for pyes testing.

Regards  
Roger Ineichen

> On Wednesday, March 23, 2011 at 4:39 PM, Roger wrote:
> 
> hi Shay, Nick
> 
> You are right I need a list of -D options in the cmd.  
> But my real problem was the following:
> 
> ' -Des.path.conf="%s"' % config
> 
> This ends in a path like:
> 
> "C:\foobar"/elasticsearch.yml
> 
> This doesn't work because of the "" in the path string, eeeek
> 
> Thanks a lot for your help.
> 
> btw,  
> I will soon release a python package which  
> offers a stub server setup which can be used in  
> python doc tests. This will (for the first time)  
> download an elasticserver release and start the server  
> for testing against with something like:
> 
> * * *
> 
> def doctestSetUp(test):
> 
> # use default elasticsearch stub with our server dir
> 
> here = os.path.dirname( **file** )  
> serverDir = os.path.join(here, 'server')  
> confDir = os.path.join(here, 'config')  
> es01.stub.testing.startElasticSearchServer(serverDir=serverDir,  
> confDir=confDir)
> 
> def doctestTearDown(test):  
> es01.stub.testing.stopElasticSearchServer()
> 
> def test\_suite():  
> return unittest.TestSuite((  
> doctest.DocFileSuite('README.txt',  
> setUp=doctestSetUp,  
> tearDown=DdoctestTearDown,  
> optionflags=doctest.NORMALIZE\_WHITESPACE|doctest.ELLIPSIS,  
> encoding='utf-8'),  
> ))
> 
> ## if **name** == ' **main**': unittest.main(defaultTest='test\_suite')
> 
> Regards  
> Roger Ineichen
> 
> ```
> -----Ursprüngliche Nachricht-----
> Von: Shay Banon [mailto:shay.banon@elasticsearch.com] 
> Gesendet: Mittwoch, 23. März 2011 14:22
> An: users@elasticsearch.com
> Betreff: Re: -Des.path.conf issue?
>   
> If you fork the Java process, then you need to 
> 
> ```
> 
> pass each -D  
> option by itself, the same way you pass -Xmx,  
> -Xms, and so on  
> (your cmd var). Also, remove the AgressiveOpts  
> from there, I  
> am updating the batch script to not include it as well.
> 
> ```
> On Wednesday, March 23, 2011 at 3:18 PM, Roger wrote:
>   
>   
> Hi Shay, Nick 
>   
>   
> Sorry I was a littlebit unclear in my initial mail.
> I'm not using the *.bat script. I'm developing a 
> python doctest stub server lib which starts the
> ES server from a python subproces. This lib allows
> to configure the ES server.
>   
> I'm not able to set the path.conf in any way.
> My code looks something like right now:
>   
> ---
> # setup java options and friends
> libPath = os.path.join(server, 'lib')
> sigarPath = os.path.join(libPath, 'sigar')
> jarPath = os.path.join(libPath, 
> 
> ```
> 
> 'elasticsearch-0.15.2.jar')  
> JAVA\_HOME = os.environ['JAVA\_HOME']  
> JAVA\_BIN = os.path.join(JAVA\_HOME, 'bin', 'java')  
> ES\_JAVA\_OPTS = '-Delasticsearch'  
> ES\_JAVA\_OPTS += ' -Des-foreground=yes'  
> ES\_JAVA\_OPTS += ' -Des.path.home="%s"' % server  
> ES\_JAVA\_OPTS += ' -Des.path.conf="%s"' % config  
> ES\_JAVA\_OPTS += ' -Des.path.logs="%s"' % logs
> 
> ```
> CLASSPATH = os.environ['CLASSPATH']
> ES_CLASSPATH = "%s;%s/*;%s/*;%s" % (jarPath, 
> 
> ```
> 
> libPath, sigarPath,  
> CLASSPATH)
> 
> ```
> env =D dict(os.environ)
> env['ES_JAVA_OPTS'] = ES_JAVA_OPTS
> env['ES_CLASSPATH'] = ES_CLASSPATH
>   
> cmd = [JAVA_BIN,
> "-Xms128m",
> "-Xmx128m",
> "-Djline.enabled=false",
> "-XX:+AggressiveOpts",
> "-XX:+UseParNewGC",
> "-XX:+UseConcMarkSweepGC",
> "-XX:+CMSParallelRemarkEnabled",
> "-XX:+HeapDumpOnOutOfMemoryError",
> ES_JAVA_OPTS,
> "-cp", ES_CLASSPATH, 
> 
> ```
> 
> "org.elasticsearch.bootstrap.Bootstrap"]
> 
> ```
> ## start the elasticsearch stub server
> try:
> p = subprocess.Popen(cmd, shell=False, env=env)
> except Exception, e:
> raise Exception("Subprocess error: %s" % e)
>   
> ---
>   
> Regards
> Roger Ineichen
>   
>   
>   
> Betreff: Re: AW: -Des.path.conf issue?
>   
> Sorry, ES_JAVA_OPTS is there in teh script
>   
>   
> On Wednesday, March 23, 2011 at 2:41 PM, Shay 
> Banon wrote:
>   
>   
> Using: elasticsearch.bat -Des.... will not work, since 
> it only get parsed in the elasticsearch.sh file.
>   
>   
> For windows, I see that I did not add the option to add 
> ES_JAVA_OPTS. But if you look at the file, you 
> can see that 
> JAVA_OPTS sets some default values, you can add 
> to that some 
> more -D parameters.
>   
>   
> I need to improve that batch shell...
>   
>   
> On Wednesday, March 23, 2011 at 1:32 PM, Roger wrote:
>   
>   
> Hi Shay 
>   
>   
>   
> Betreff: Re: -Des.path.conf issue?
>   
> The -D parameter does not work on 
> windows, only on *nix systems.
>   
>   
>   
> Thanks for the quick response!
> But now I'm confused. The bin/elasticsearch.bat script 
> defines the following start parameter:
>   
> ---
> set
> 
> ```
> 
> ES\_CLASSPATH=%CLASSPATH%;%ES\_HOME%/lib/elasticsearch-@ES\_VERSI  
> ON@.jar;%ES\_HO  
> ME%/lib/_;%ES\_HOME%/lib/sigar/_  
> set ES\_PARAMS=-Delasticsearch  
> -Des-foreground=yes -Des.path.home="%ES\_HOME%"
> 
> ```
> "%JAVA_HOME%\bin\java" %JAVA_OPTS% 
> %ES_JAVA_OPTS% %ES_PARAMS% -cp
> "%ES_CLASSPATH%" 
> "org.elasticsearch.bootstrap.ElasticSearch"
> ---
>   
> This means a -D parameter is used e.g. 
> -Des.path.home="%ES_HOME%"
> Is this working or not? Is only the 
> -Des.path.conf not working?
>   
> Regards
> Roger Ineichen
>   
>   
>   
> On Wednesday, March 23, 2011 at 4:30 
> AM, Roger wrote: 
>   
> Hi together
>   
> I'm working on an elasticsearch server 
> stub for python using
> a startup via python subprocess.
>   
> Everything is working fine except the 
> es.path.conf property. It seems that the 
> -Des.path.conf=<path 
> outside ES_HOME> is not
> working on a windows system. I was 
> testing with windows and
> nix config path e.g. \\ and /.
>   
> I'm trying to use a plain ES 
> download/unzip and pointing
> to an external config folder which 
> contains some mappings.
> The default config folder inside the 
> donwload/unzip is
> still there.
>   
> I was reading in some mailinglists that 
> there is/was an issue
> with append/merge config from different 
> locations, but what 
> happens to mapping definiteions locate 
> in config/mappings in
> such a configuration?
>   
> Is this an issue?
>   
> Regards
> Roger Ineichen
> ______________________________
> END OF MESSAGE
> 
> ```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:09am UTC](https://discuss.elastic.co/t/des-path-conf-issue/4148/15 "2017-07-06T04:09:22Z")

</div>


