Support Questions
Find answers, ask questions, and share your expertise

Downgrade did not finalize, cannot proceed to upgrade.

New Contributor

Hi,

After trying to upgrade to 2.6.3 and failing I proceeded to a downgrade back to 2.6.2

The downgrade finished with the following error: (Finalize Downgrade -> Save Cluster State -> Save Cluster State)

Reason: There is an existing downgrade from 2.6.3.0-235 which has not completed. This downgrade must be completed before a new upgrade or downgrade can begin.

And the stderr output:

org.apache.ambari.server.AmbariException: The following 1 host component(s) have not been downgraded to their desired versions:
host_a5: NODEMANAGER (current = 2.6.3.0-235, desired = 2.6.2.0-205)

But this command from the ambari server returned: (https://community.hortonworks.com/questions/141083/hdp-262-upgrade-stuck.html)

psql ambari -U ambari...
SELECT h.host_name, hcs.service_name, hcs.component_name, hcs.version FROM hostcomponentstate hcs JOIN hosts h ON hcs.host_id = h.host_id ORDER BY hcs.version, hcs.service_name, hcs.component_name, h.host_name;
host_a5 | YARN           | NODEMANAGER             | 2.6.2.0-205 
host_a6 | YARN           | NODEMANAGER             | 2.6.2.0-205
host_a7 | YARN           | NODEMANAGER             | 2.6.2.0-205
host_a8 | YARN           | NODEMANAGER             | 2.6.2.0-205

Any ideas?

7 REPLIES 7

Cloudera Employee

Hello Aviram,

I would try to execute a REST API command to check if there is anything else still using the previous version of HDP, something like that:

curl -u $AMBARI_USER:$AMBARI_PASSWD -H 'X-Requested-By: ambari' -X GET "http://<ambari-server:8080/api/v1/clusters/<cluster_name>/hosts/host_a5" | grep 2.6.3.0-235

This would give you an idea if all the components were indeed upgraded.

Regards

Danilo Perez

New Contributor

Thank you for the reply,

The grep returned no match, I again see that NodeManager is at 2.6.2. (by changing the grep cmd)

The problem is that the upgrade/downgrade process shows differently and prevents me from moving forward.

Super Mentor

@Aviram Voda

Please check the following Table.

SELECT * FROM hostcomponentstate WHERE component_name = 'NODEMANAGER';

.

If that shows the incorrect version then try to fix it (After taking a Ambari DB backup).

Then restart Ambari Server.

New Contributor

Thanks Jay,

The output is the same, all showing the correct version but one showing upgrade state = NONE:

 id  | cluster_id | component_name |   version   | current_state | host_id | service_name | upgrade_state | security_state
-----+------------+----------------+-------------+---------------+---------+--------------+---------------+----------------
 251 |          2 | NODEMANAGER    | 2.6.2.0-205 | STARTED       |       1 | YARN         | NONE          | UNSECURED
 168 |          2 | NODEMANAGER    | 2.6.2.0-205 | STARTED       |      51 | YARN         | COMPLETE      | UNSECURED
  35 |          2 | NODEMANAGER    | 2.6.2.0-205 | STARTED       |       2 | YARN         | COMPLETE      | UNSECURED
 202 |          2 | NODEMANAGER    | 2.6.2.0-205 | STARTED       |     101 | YARN         | COMPLETE      | UNSECURED
(4 rows)

Updating the column upgrade_state to COMPLETE did not help as well.

The server was restarted as well a few times.

Contributor

hi Aviram, how did you resolve this?

New Contributor

I have the similar problem. Is there a solution to this issue?

New Contributor

 

I solved my problem by follow the steps in this link: https://community.cloudera.com/t5/Support-Questions/HDP-Upgrade-blocked-by-another-INTERNAL-REQUEST/...

 

 
Super Mentor

@Toky Raobelina

Please check the "clusters" table and if you find any previous "upgrade_id" there then please try setting that to NULL (this null should be your Database specific NULL value) and then restart ambari server.

UPDATE clusters SET upgrade_id=NULL;