# Elasticsearch won't start after upgrade from 2.4.5 to 5.6

**URL:** <https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507>\
**Category:** Elasticsearch\
**Created:** [December 28, 2017, 8:54pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507 "2017-12-28T20:54:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![OlympiaLady](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@OlympiaLady](https://discuss.elastic.co/u/OlympiaLady)\
**Post date:** [December 28, 2017, 8:54pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/1 "2017-12-28T20:54:09Z")

</div>

I am trying to upgrade Elasticsearch from 2.4.5 to 5.6 on the latest Debian. I did the upgrade, and after the upgrade, Elasticsearch would not start. I have no plugins installed, so that is not an issue. I kept my elasticsearch.yml and init script. I updated the data directory, so that is not an issue. The frustrating part is there is nothing in the /var/log/elasticsearch logs or /var/log/messages. The main problem seems to center around:

**ERROR: D is not a recognized option**

The full output when I do **service elasticsearch status** is:

root@myserver:~# service elasticsearch status  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled)  
Active: failed (Result: exit-code) since Tue 2017-12-26 15:39:44 PST; 1min 21s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 940 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID\_DIR}/elasticsearch.pid -Des.default.path.home=${ES\_HOME} -Des.default.path.logs=${LOG\_DIR} -Des.default.path.data=${DATA\_DIR} -Des.default.path.conf=${CONF\_DIR} (code=exited, status=64)  
Process: 821 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
Main PID: 940 (code=exited, status=64)

Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -V, --version Prints elasticsearch version information and exits  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -d, --daemonize Starts Elasticsearch in the background  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -h, --help show help  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -p, --pidfile Creates a pid file in the specified path on start  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -q, --quiet Turns off standard ouput/error streams logging in console  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -s, --silent show minimal output  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: -v, --verbose show verbose output  
Dec 26 15:39:43 dshsapoly808glp elasticsearch[940]: **ERROR: D is not a recognized option**  
Dec 26 15:39:44 dshsapoly808glp systemd[1]: elasticsearch.service: main process exited, code=exited, status=64/n/a  
Dec 26 15:39:44 dshsapoly808glp systemd[1]: Unit elasticsearch.service entered failed state.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [December 28, 2017, 8:56pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/2 "2017-12-28T20:56:30Z")

</div>

Whats your java version?

---

<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:** [December 28, 2017, 9:44pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/3 "2017-12-28T21:44:44Z")

</div>

We are now using -E instead of -D.

Sounds like startup scripts have not been updated.

---

<div class="post-metadata">

**Author:** ![OlympiaLady](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@OlympiaLady](https://discuss.elastic.co/u/OlympiaLady)\
**Post date:** [December 28, 2017, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/4 "2017-12-28T22:08:58Z")

</div>

Here is my Java info:

openjdk version "1.8.0\_111"  
OpenJDK Runtime Environment (build 1.8.0\_111-8u111-b14-2~bpo8+1-b14)  
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

OK, I see it is out of date. I will upgrade it. Would this be the problem?

---

<div class="post-metadata">

**Author:** ![OlympiaLady](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@OlympiaLady](https://discuss.elastic.co/u/OlympiaLady)\
**Post date:** [December 28, 2017, 10:12pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/5 "2017-12-28T22:12:21Z")

</div>

Hi, forgive my stupidity, but where is the -E versus -D? In the init script, elasticsearch.yml, or /etc/default/elasticsearch?

---

<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:** [December 30, 2017, 4:34pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/6 "2017-12-30T16:34:38Z")

</div>

I can see that in your logs:

```auto
Process: 940 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf=${CONF_DIR} (code=exited, status=64)

```

You can see there a lot of `-D`.

See [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/breaking\_50\_settings\_changes.html#\_using\_system\_properties\_to\_configure\_elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/breaking_50_settings_changes.html#_using_system_properties_to_configure_elasticsearch)

---

<div class="post-metadata">

**Author:** ![OlympiaLady](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@OlympiaLady](https://discuss.elastic.co/u/OlympiaLady)\
**Post date:** [January 8, 2018, 4:23pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/7 "2018-01-08T16:23:25Z")

</div>

I upgraded my Java to the latest, and ran the upgrade again. I accepted the new init script, but kept my old elasticsearch.yml file. It now works. Thank you everyone.

---

<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:** [February 5, 2018, 4:23pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-upgrade-from-2-4-5-to-5-6/113507/8 "2018-02-05T16:23:38Z")

</div>

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