# Error with Upgrade to 6.2 xpack

**URL:** <https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790>\
**Category:** Elasticsearch\
**Created:** [February 7, 2018, 9:41am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790 "2018-02-07T09:41:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mninoruiz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mninoruiz](https://discuss.elastic.co/u/mninoruiz)\
**Post date:** [February 7, 2018, 9:41am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/1 "2018-02-07T09:41:51Z")

</div>

Hi everybody,

we are very eager to try the SAML capabilities in this new version, but when I am attempting to perform a rolling upgrade as per these instructions:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)

The following happens (including my command history):

[ec2-user]$ curl -XPOST 'localhost:9200/\_flush/synced?pretty'  
[ec2-user]$ sudo systemctl stop elasticsearch.service  
[ec2-user]$ wget [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.0.rpm](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.0.rpm)  
[ec2-user]$ sudo rpm --force --install elasticsearch-6.2.0.rpm  
warning: elasticsearch-6.2.0.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY  
warning: /etc/elasticsearch/jvm.options created as /etc/elasticsearch/jvm.options.rpmnew

[ec2-user@ip ~]$ cd /usr/share/elasticsearch

[ec2-user@ip elasticsearch]$ sudo bin/elasticsearch-plugin install x-pack  
-\> Downloading x-pack from elastic  
[=================================================] 100%  
ERROR: plugin directory [/usr/share/elasticsearch/plugins/x-pack] already exists; if you need to update the plugin, uninstall it first using command 'remove x-pack'  
[ec2-user@ip elasticsearch]$ remove x-pack  
-bash: remove: command not found  
[ec2-user@ip elasticsearch]$ sudo bin/elasticsearch-plugin remove x-pack  
Exception in thread "main" java.lang.NoSuchMethodError: org.elasticsearch.plugins.PluginInfo.getExtendedPlugins()Ljava/util/List;  
at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:91)  
at org.elasticsearch.plugins.RemovePluginCommand.execute(RemovePluginCommand.java:67)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)

It is an ec 2 instance center 7 that had an elastic 6.1.2 with x-pack correctly installed, it is my 1st time performing a rolling upgrade to the xpack ... am I missing something? Thanks for the help!

note: the rpm --force was imrpovising after getting this warning:  
[ec2-user ~]$ sudo rpm --install elasticsearch-6.2.0.rpm  
warning: elasticsearch-6.2.0.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY  
file /etc/elasticsearch/jvm.options from install of elasticsearch-0:6.2.0-1.noarch conflicts with file from package elasticsearch-0:6.1.2-1.noarch  
file /usr/share/elasticsearch/bin/elasticsearch from install of elasticsearch-0:6.2.0-1.noarch conflicts with file from package elasticsearch-0:6.1.2-1.noarch  
file /usr/lib/systemd/system/elasticsearch.service from install of elasticsearch-0:6.2.0-1.noarch conflicts with file from package elasticsearch-0:6.1.2-1.noarch  
file /usr/share/elasticsearch/bin/elasticsearch-env from install of elasticsearch-0:6.2.0-1.noarch conflicts with file from package elasticsearch-0:6.1.2-1.noarch  
file /usr/share/elasticsearch/modules/aggs-matrix-stats/plugin-descriptor.properties from install of elasticsearch-0:6.2.0-1.noarch conflicts with file from package elasticsearch-0:6.1.2-1.noarch

---

<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:** [February 7, 2018, 9:54am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/2 "2018-02-07T09:54:29Z")

</div>

Hey,

there is currently a bug in 6.2 if you want to upgrade, because removing old plugins does not work (see [https://github.com/elastic/elasticsearch/issues/28538](https://github.com/elastic/elasticsearch/issues/28538)). But you are already getting an issue at a different point in time, which does not resemble the above behaviour.

It seems you have some leftovers from elasticsearch 6.1 jars somewhere. Can you run a find "\*.jar" in the ES directory?

--Alex

---

<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:** [February 7, 2018, 4:06pm UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/4 "2018-02-07T16:06:10Z")

</div>

looking at your commands again, I think the issue is the fact that you tried to install Elasticsearch instead of ugprading it using `rpm -u`.

I have no idea in what kind of ghost state you are in right now, maybe you can share the files in the `/usr/share/elasticsearch/` directory. I also cannot tell if just running another installation of the old version of the RPM will leave you in a good state. I think this involved manual checking, like config and share and lib directories (the ones used when you check the contents of the rpm, I think the command is `rpm -pql es.rpm` but I am not sure on top of my head).

---

<div class="post-metadata">

**Author:** ![mninoruiz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mninoruiz](https://discuss.elastic.co/u/mninoruiz)\
**Post date:** [February 7, 2018, 9:46pm UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/5 "2018-02-07T21:46:54Z")

</div>

Thanks Alex! Probably that's the problem... Yes, -'--force' install seemed like a bad idea but the upgrade documentation referred to install it again, perhaps we should make a note there you will break the install iwhen using rpm installation you should issue 'rpm --upgrade'... Since there's another issue about removing plug in already, I'll go and try with a fresh install...  
Thanks for the help, regards

---

<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:** [February 7, 2018, 10:45pm UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/6 "2018-02-07T22:45:28Z")

</div>

hey,

which documentation do you refer to in particular? Might make sense to fix it on our side!

--Alex

---

<div class="post-metadata">

**Author:** ![mninoruiz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mninoruiz](https://discuss.elastic.co/u/mninoruiz)\
**Post date:** [February 8, 2018, 6:15am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/7 "2018-02-08T06:15:04Z")

</div>

sure Alex, here:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)

if you go to:  
``4. Upgrade the node you shut down.

To upgrade using a Debian or RPM package:

Use rpm or dpkg to install the new package. All files are installed in the appropriate location for the operating system and Elasticsearch config files are not overwritten```

that seemed like safe enough to go ahead and reinstall, not rpm --upgrade! 😛 🤭

---

<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:** [February 8, 2018, 8:02am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/8 "2018-02-08T08:02:16Z")

</div>

thank you for the pointer!

---

<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:** [March 8, 2018, 8:11am UTC](https://discuss.elastic.co/t/error-with-upgrade-to-6-2-xpack/118790/9 "2018-03-08T08:11:31Z")

</div>

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