# 6.2.1: Unrecognized option: -server

**URL:** <https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017>\
**Category:** Elasticsearch\
**Created:** [April 13, 2018, 6:12pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017 "2018-04-13T18:12:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitva77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bitva77/32/66694_2.png) [@bitva77](https://discuss.elastic.co/u/bitva77)\
**Post date:** [April 13, 2018, 6:12pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/1 "2018-04-13T18:12:37Z")

</div>

Hi! Trying to upgrade from 6.1.2 to 6.2.3 on Windows. We have JAVA\_HOME and am using jre 1.8.0.111

ES\_PATH\_CONF is set to a directory outside of the Elastic installation directory.

Getting this error when trying to start it:

> 2018-04-13 11:54:59 Commons Daemon procrun stderr initialized  
> Unrecognized option: -server

I came across this: [Remove leftover doc comment on client JVM check by jasontedor · Pull Request #28738 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/pull/28738)

Sure enough we had `-server` set. So I commented out, yet am still getting that same error.

Here's our jvm.options: [jvm.options · GitHub](https://gist.github.com/bitva77/194f0c920ee7d420bd91aac691ffeb74)

I tried using the same jvm.options (editing the Xms/Xmx only) as what comes with the package but still a no go.

any pointers on where I went wrong?

Thanks!

-Matt

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 13, 2018, 6:24pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/2 "2018-04-13T18:24:36Z")

</div>

Most likely you need a jdk instead of a jre.

Or you need to change one of the bat file IIRC.

---

<div class="post-metadata">

**Author:** ![bitva77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bitva77/32/66694_2.png) [@bitva77](https://discuss.elastic.co/u/bitva77)\
**Post date:** [April 13, 2018, 6:30pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/3 "2018-04-13T18:30:38Z")

</div>

Interesting! We are using JRE. I'll try JDK next. Is this a change from 6.1 to 6.2?

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 13, 2018, 7:43pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/4 "2018-04-13T19:43:44Z")

</div>

Not sure

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 15, 2018, 8:25pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/5 "2018-04-15T20:25:34Z")

</div>

The Apache library that we use to enable Elasticsearch to run as a Windows service can not handle the `-server` flag. In the past, we filtered this option out of the default `jvm.options` before installing the Windows service. Now, we no longer ship with this included in the default `jvm.options`. If you are using a `jvm.options` from the past that included this option, since the filter is no longer in place it will be included in the options used to start the Windows service. Removing this from the `jvm.options` file is not enough because that file is not read after the service is installed. Instead you have to either remove the service and reinstall it (after you've removed `-server` from the `jvm.options` file), or use `elasticsearch-service manager` to manually remove the option from the service (look at the tab that includes the JVM flags).

The filter was indeed removed in 6.2.0: [https://github.com/elastic/elasticsearch/pull/27675](https://github.com/elastic/elasticsearch/pull/27675). This change was made to support running Elasticsearch on JDK 9.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 15, 2018, 8:47pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/6 "2018-04-15T20:47:41Z")

</div>

Thank you @jasontedor. Really helpful.

---

<div class="post-metadata">

**Author:** ![bitva77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bitva77/32/66694_2.png) [@bitva77](https://discuss.elastic.co/u/bitva77)\
**Post date:** [April 17, 2018, 9:20pm UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/7 "2018-04-17T21:20:02Z")

</div>

Thanks! The order was the issue. I had no idea the jvm.options file was loaded only at service install time. I must've been putting the new jvm.options file in place after re-installing the service (my luck huh).

Upgrade went successful. Thanks again!

-Matt

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 20, 2018, 12:04am UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/8 "2018-04-20T00:04:59Z")

</div>

You're welcome, I am happy to have helped.

---

<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:** [May 18, 2018, 12:05am UTC](https://discuss.elastic.co/t/6-2-1-unrecognized-option-server/128017/9 "2018-05-18T00:05:03Z")

</div>

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