Get "elasticesearch conflicts with elasticsearch-oss-0:6.6.1-1.noarch" during upgrade


(John Zhang) #1

Dears, I am new to ELK and just take over from another colleague.

I need to upgrade current Elasticsearch 6.2.3 to 6.6.1, and because of license limitation, have to use the opensource version. As the guide https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rpm.html, I stopped the service, and then run rpm command to install, but got errors:
[root@vagrant-elk-6 tmp]# rpm --install elasticsearch-oss-6.6.1.rpm
error: Failed dependencies:
** elasticsearch conflicts with elasticsearch-oss-0:6.6.1-1.noarch**

I did some google search but can not find any clue, could you please help throw me some light? Thanks a lot!

The current installed Elasticsearch:
[root@vagrant-elk-6 tmp]# curl -X GET "localhost:9200"
{
"name" : "A88CHvn",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "YHA62fqkQiCd4g2IV32_OQ",
"version" : {
"number" : "6.2.4",
"build_hash" : "ccec39f",
"build_date" : "2018-04-12T20:37:28.497551Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

Java installed:
[root@vagrant-elk-6 tmp]# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)


(Mark Walkom) #2

Which limitation is that?

What does rpm -qi|grep -i elasticsearch show?


(John Zhang) #3

@warkolm, thanks!
currently can only use Apache license version, can not use the new Elastic license by now.

Here is the detailed info of installed version
[root@vagrant-elk-6 tmp]# rpm -qi elasticsearch
Name : elasticsearch
Epoch : 0
Version : 6.2.4
Release : 1
Architecture: noarch
Install Date: Fri 09 Nov 2018 12:52:25 AM UTC
Group : Application/Internet
Size : 32278478
License : 2009
Signature : RSA/SHA512, Thu 12 Apr 2018 10:44:25 PM UTC, Key ID d27d666cd88e42b4
Source RPM : elasticsearch-6.2.4-1-src.rpm
Build Date : Thu 12 Apr 2018 08:39:15 PM UTC
Build Host : packer-virtualbox-iso-1522340558
Relocations : /usr
Packager : Elasticsearch
Vendor : Elasticsearch
URL : https://www.elastic.co/
Summary : Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
Description :
Elasticsearch subproject :distribution:rpm

and here is the verbose info during install:
[root@vagrant-elk-6 tmp]# rpm -ivv elasticsearch-oss-6.6.1.rpm
D: ============== elasticsearch-oss-6.6.1.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/
.key
D: loading keyring from rpmdb
D: opening db environment /var/lib/rpm cdb:0x401
D: opening db index /var/lib/rpm/Packages 0x400 mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name 0x400 mode=0x0
D: read h# 307 Header SHA1 digest: OK (489efff35e604042709daf46fb78611fe90a75aa)
D: added key gpg-pubkey-f4a80eb5-53a7ff4b to keyring
D: read h# 399 Header SHA1 digest: OK (7607620a7fc71d534fe59a60dece8de02703e63c)
D: added key gpg-pubkey-d88e42b4-52371eca to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: Expected size: 34420403 = lead(96)+sigs(784)+pad(0)+data(34419523)
D: Actual size: 34420403
D: elasticsearch-oss-6.6.1.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: OK
D: added binary package [0]
D: found 0 source and 1 binary packages
D: opening db index /var/lib/rpm/Conflictname 0x400 mode=0x0
D: ========== +++ elasticsearch-oss-0:6.6.1-1 noarch/linux 0x0
D: Requires: rpmlib(VersionedDependencies) <= 3.0.3-1 YES (rpmlib provides)
D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides)
D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides)
D: opening db index /var/lib/rpm/Basenames 0x400 mode=0x0
D: read h# 8 Header V3 RSA/SHA256 Signature, key ID f4a80eb5: OK
D: Requires: /bin/bash YES (db files)
D: opening db index /var/lib/rpm/Providename 0x400 mode=0x0
D: read h# 44 Header V3 RSA/SHA256 Signature, key ID f4a80eb5: OK
D: Requires: coreutils YES (db provides)
D: read h# 387 Header V4 RSA/SHA512 Signature, key ID d88e42b4: OK
D: Conflicts: elasticsearch YES (db provides)
D: opening db index /var/lib/rpm/Obsoletename 0x400 mode=0x0
error: Failed dependencies:
elasticsearch conflicts with elasticsearch-oss-0:6.6.1-1.noarch
D: closed db index /var/lib/rpm/Obsoletename
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm


(Mark Walkom) #4

You will likely need to remove that existing package and then install the one you want.


(John Zhang) #5

I had tried to run rpm -U to upgrade, resulted with same error.

To remove existing package with rpm -e, are the existing data and configuration files still there? need to keep the data and config, but upgrade the Elasticsearch version only....

thanks!


(Mark Walkom) #6

I think that is the way it works, it will only remove the config and data if you use the purge option.

But I would check the documentation for rpm to be sure.


(John Zhang) #7

@warkolm, Thanks very much for your kind and quick help!
I did rpm -e, and then rpm -i, it seems working. I can still see the data in Kibana.
One thing is that it will delete /etc/elasticsearch and keep a copy of elasticsearch.yml.rpmsave, but jvm.options and log4j2.properties are deleted, probably because I did not change them.

Thanks again!


(system) closed #8

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