Support Questions

Find answers, ask questions, and share your expertise

Downgrade did not finalize, cannot proceed to upgrade.

New Contributor


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 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 =, desired =

But this command from the ambari server returned: (

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             | 
host_a6 | YARN           | NODEMANAGER             |
host_a7 | YARN           | NODEMANAGER             |
host_a8 | YARN           | NODEMANAGER             |

Any ideas?


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

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


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    | | STARTED       |       1 | YARN         | NONE          | UNSECURED
 168 |          2 | NODEMANAGER    | | STARTED       |      51 | YARN         | COMPLETE      | UNSECURED
  35 |          2 | NODEMANAGER    | | STARTED       |       2 | YARN         | COMPLETE      | UNSECURED
 202 |          2 | NODEMANAGER    | | 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.


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:


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;