Cannot start ambari services with 400 status code
Error Message
You maybe meet this kind of error message showing below when you click the button “Start All”.
Error message: java.lang.IllegalArgumentException: Invalid transition for servicecomponenthost, clusterName=ambari, clusterId=2, serviceName=SMARTSENSE, componentName=ACTIVITY_EXPLORER, hostname=ambari.com, currentState=STOPPING, newDesiredState=STARTED
Solution
It’s so annoying I cannot find any great solutions online until I saw this article in the hortonworks community.
Step1: Update the state of components in Ambari
So, update the table hostcomponentstate.
Step2: Restart Ambari agents and server
1 | ambari-agent restart |
Reason
Stopping your Ambari cluster in an exceptional steps will cause this kind of message such as exceptional poweroff.
So, we ought to follow the correct steps blow to avoid this kind of unexpectable error.
Clicking the button “Stop All”.
Running the commands below.
1
2
3ambari-agent stop
ambari-server stopPowering off VMs.