# ES 5.0 upgrade woes

**URL:** <https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246>\
**Category:** Elasticsearch\
**Created:** [November 7, 2016, 4:18pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246 "2016-11-07T16:18:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diggy](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Diggy](https://discuss.elastic.co/u/Diggy)\
**Post date:** [November 7, 2016, 4:18pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/1 "2016-11-07T16:18:30Z")

</div>

Hello, all.

I'm in the process of upgrading ES from version 2.4 to 5.0 on Ubuntu 16.04.1 LTS . I've followed the upgrade documentation to the letter, but at the point where I restart ES, it won't. Here's output from the restart:

Nov 07 11:17:00 elk01 systemd[1]: Starting Elasticsearch...  
Nov 07 11:17:00 elk01 systemd[1]: Started Elasticsearch.  
Nov 07 11:17:00 elk01 elasticsearch[29993]: Error: encountered environment variables that are no longer supported  
Nov 07 11:17:00 elk01 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE  
Nov 07 11:17:00 elk01 systemd[1]: elasticsearch.service: Unit entered failed state.  
Nov 07 11:17:00 elk01 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Help tracking down and fixing the issue greatly appreciated.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 7, 2016, 4:50pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/2 "2016-11-07T16:50:37Z")

</div>

Hey,

some environment variables are not supported anymore, see the [breaking changes packaging](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_packaging.html) documentation.

--Alex

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [November 7, 2016, 6:49pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/3 "2016-11-07T18:49:40Z")

</div>

ES\_HEAP\_SIZE is no longer supported. This maybe the most likely culprit.

```auto
[msimos@msi-gs60 elasticsearch-5.0.0]$ export ES_HEAP_SIZE=1g
[msimos@msi-gs60 elasticsearch-5.0.0]$ bin/elasticsearch
Error: encountered environment variables that are no longer supported
Use jvm.options or ES_JAVA_OPTS to configure the JVM
ES_HEAP_SIZE=1g: set -Xms1g and -Xmx1g in jvm.options or add "-Xms1g -Xmx1g" to ES_JAVA_OPTS

```

If this is the case use the file jvm.options to set the heap.

---

<div class="post-metadata">

**Author:** ![Diggy](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Diggy](https://discuss.elastic.co/u/Diggy)\
**Post date:** [November 7, 2016, 7:42pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/4 "2016-11-07T19:42:21Z")

</div>

Thank you both. In fact, there were a few things I had to bird-dog to get things working, including removing logging.yml.

Now, I have elasticsearch and kibana upgraded to version 5.0, while leaving (for the time being) logstash at version 2.2.4, and beats at the current version. What I'm finding now is that new logs have stopped being pulled in for the past two hours. Most things I try to do return this:

"type":"security\_exception","reason":"missing authentication token for REST request"

How do I fix that?

With thanks.

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [November 7, 2016, 7:56pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/5 "2016-11-07T19:56:46Z")

</div>

Hi,

Were you using Shield before? I don't believe the Shield directory gets migrated/copied. You can either manually copy the files over to the xpack directory. Or you can migrate the users to the native realm:

[https://www.elastic.co/guide/en/x-pack/5.0/security-migration.html#migrate-tool](https://www.elastic.co/guide/en/x-pack/5.0/security-migration.html#migrate-tool)

---

<div class="post-metadata">

**Author:** ![Diggy](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Diggy](https://discuss.elastic.co/u/Diggy)\
**Post date:** [November 7, 2016, 7:58pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/6 "2016-11-07T19:58:57Z")

</div>

I've never used shield before. I did install X-pack, and the basic license.

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [November 7, 2016, 8:05pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/7 "2016-11-07T20:05:00Z")

</div>

You need to specify a username and password. The defaults can be found here:

[https://www.elastic.co/guide/en/x-pack/current/setting-up-authentication.html](https://www.elastic.co/guide/en/x-pack/current/setting-up-authentication.html)

You can also allow unauthenticated access to enabling anonymous access:

[https://www.elastic.co/guide/en/x-pack/current/anonymous-access.html](https://www.elastic.co/guide/en/x-pack/current/anonymous-access.html)

---

<div class="post-metadata">

**Author:** ![Diggy](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Diggy](https://discuss.elastic.co/u/Diggy)\
**Post date:** [November 7, 2016, 8:54pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/8 "2016-11-07T20:54:36Z")

</div>

Thanks so much for all of the responses. During my upgrade odyssey, I've had to track down, and tweak, a fair handful of stuff. I did set the ES and Kibana usernames and passwords. Additionally, I had left off the "acknowledge=true" parameter when installing the X-pack license, so it was never installed. Once I go that square, I added "xpack.security.enabled : false" to elasticsearch.yml, and was thus able to log into kibana. I'm not 100% sure, but I think doing that also allowed the log captures to be up-to-date. That's to name a couple of things.

---

<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:** [December 5, 2016, 8:54pm UTC](https://discuss.elastic.co/t/es-5-0-upgrade-woes/65246/9 "2016-12-05T20:54:45Z")

</div>

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