Support Questions

Find answers, ask questions, and share your expertise

error upgrade ambari to 2.6.0 with HDP and HDF installed

Hello All,

I try to upgrade ambari server from 2.5 to 2.6. When I execute the command "ambari-server upgrade" I get the follow error

org.apache.ambari.server.AmbariException: Unable to find any CURRENT repositories.
        at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:203)
        at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:418)
Caused by: org.apache.ambari.server.AmbariException: Unable to find any CURRENT repositories.
        at org.apache.ambari.server.upgrade.UpgradeCatalog260.getCurrentVersionID(UpgradeCatalog260.java:510)
        at org.apache.ambari.server.upgrade.UpgradeCatalog260.executeDDLUpdates(UpgradeCatalog260.java:194)
        at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeSchema(AbstractUpgradeCatalog.java:923)
        at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:200)
        ... 1 more

Any ideas how I can fix this error ?

6 REPLIES 6

Mentor

@chris herssens

This error seems to indica5e that the ambari 2.6 is not accessible in your /etc/yum.repos.d/* can you check and validate that your have the new 2.6 repos!

Then do then run the below command before ferrying

# yum clean all

Remove cached repos

# yum repolist

You should see the the 2.6 repos as accessible

Then proceed with your upgrade.

@Geoffrey Shelton Okot

Ambari 2.6 is installed.

yum repolist gives

 repo id                            repo name                              status
!HDF-3.0                           HDF-3.0                                    45
!HDP-2.6                           HDP-2.6                                   232
!HDP-2.6.0.3                       HDP-2.6.0.3                               232
!HDP-SOLR-2.6-100                  HDP-SOLR-2.6-100                            1
!HDP-UTILS-1.1.0.21                HDP-UTILS-1.1.0.21                         64
!HDP-UTILS-2.6.0.3                 HDP-UTILS-2.6.0.3                          64
!ambari-2.6.0.0                    ambari Version - ambari-2.6.0.0            12
.....

Super Mentor

@chris herssens

Looks like you are hitting the issue reported in the JIRA: https://issues.apache.org/jira/browse/AMBARI-22469 which is expected to be addressed in Ambari 2.6.1

This information is also mentioned in the "Known Issues" Section of Ambari 2.6.0 Release Notes:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-release-notes/content/ambari_reln...

.

Please contact Hortonworks Support to get more details about this and to see if any workaround can be found. Else the code changes will be needed.

Mentor

@chris herssens

Your yum repolist output's first column starts with a '!' if the repo which indicates the metadata is expired. Download the repomd.xml file so that the repo is up to date.

Root

When content's view is promoted to a newer version with changes, the clients are not able to see the changes unless a cache on the client is manually cleared or is regenerated by yum after a set interval of time period,so to spare the time required for cache regeneration on client end yum would try to fetch cache on each run.

How to clear the yum cache:

When a package is downloaded, installed and is removed there is a chance that the package may still be saved/stored in the yum's cache. So to clean all the cached packages from the enabled repository cache directory, login as root and execute the following:

yum clean packages 

To purge the old package information completely, execute the following command:

yum clean headers 

To clean any cached xml metadata from any enabled repository, execute the following

yum clean metadata 

If you wish to clean all the cached files from any enabled repository at once, execute the Following command:

yum clean all

Now re-run

yum repolist 

If the "!" doesn't appear as before then you are good to go

Explorer

I get exactly the same

ambari-server upgrade
Using python /usr/bin/python
Upgrading ambari-server
INFO: Upgrade Ambari Server
INFO: Updating Ambari Server properties in ambari.properties ...
WARNING: Can not find ambari.properties.rpmsave file from previous version, skipping import of settings
INFO: Updating Ambari Server properties in ambari-env.sh ...
INFO: Can not find ambari-env.sh.rpmsave file from previous version, skipping restore of environment settings. ambari-env.sh may not include any user customization.
INFO: Fixing database objects owner
Ambari Server configured for Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
INFO: Upgrading database schema
INFO: Return code from schema upgrade command, retcode = 1
ERROR: Error executing schema upgrade, please check the server logs.
ERROR: Error output from schema upgrade command:
ERROR: Exception in thread "main" org.apache.ambari.server.AmbariException: Unable to find any CURRENT repositories.
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:203)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:418)
Caused by: org.apache.ambari.server.AmbariException: Unable to find any CURRENT repositories.
at org.apache.ambari.server.upgrade.UpgradeCatalog260.getCurrentVersionID(UpgradeCatalog260.java:510)
at org.apache.ambari.server.upgrade.UpgradeCatalog260.executeDDLUpdates(UpgradeCatalog260.java:194)
at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeSchema(AbstractUpgradeCatalog.java:923)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:200)
... 1 more


ERROR: Ambari server upgrade failed. Please look at /var/log/ambari-server/ambari-server.log, for more details.
ERROR: Exiting with exit code 11.
REASON: Schema upgrade failed.

The patch mentioned here

Looks like you are hitting the issue reported in the JIRA: https://issues.apache.org/jira/browse/AMBARI-22469 which is expected to be addressed in Ambari 2.6.1

Seem NOT to be able to apply?

-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12898511/AMBARI-22469.patch
against trunk revision .

-1 patch. The patch command could not apply the patch.

Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/12699//console

This message is automatically generated.

I tried looking for the involved files, but I cannot find them, does anyone know how I would be able to get past this please

BTW its not the yum repos problem, mine seem to be ok

yum repolist
Loaded plugins: fastestmirror
HDP-2.6.3.0 | 2.9 kB 00:00:00
HDP-UTILS-1.1.0.21 | 2.9 kB 00:00:00
Supporting-repo | 2.9 kB 00:00:00
ambari-ambari-2.6.0.0 | 2.9 kB 00:00:00
(1/4): HDP-2.6.3.0/primary_db | 99 kB 00:00:00
(2/4): HDP-UTILS-1.1.0.21/primary_db | 37 kB 00:00:00
(3/4): Supporting-repo/primary_db | 91 kB 00:00:00
(4/4): ambari-ambari-2.6.0.0/primary_db | 12 kB 00:00:00
Determining fastest mirrors
repo id repo name status
HDP-2.6.3.0 HDP Version - HDP-2.6.3.0 236
HDP-UTILS-1.1.0.21 HDP-UTILS Version - HDP-UTILS-1.1.0.21 64
Supporting-repo Supporting-repo 121
ambari-ambari-2.6.0.0 ambari Version - ambari-ambari-2.6.0.0 15
repolist: 436

Explorer

I am running ambari 2.6.2 which has released recently. and problem still there.