Error with Upgrade to 6.2 xpack

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

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
[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

1 Like

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). 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

2 Likes

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).

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

hey,

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

--Alex

sure Alex, here:
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! :stuck_out_tongue: :face_with_hand_over_mouth:

thank you for the pointer!

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