Created on 04-12-2018 09:34 AM - edited 08-17-2019 08:44 PM
we enabled the service auto start on all services
and we make a simple test
we stop the service MapReduce2
and we wait some time to see if service will start automatically
but after one hour service still down
dose service auto if relevant in this case ?
Created 04-12-2018 09:47 AM
If you are stopping a service /component manually (gracefully) then ambari won't try to start it. Auto start of a component is based on its current state and desired state.
Try killing a component abruptly (like kill -9) and then check.
Created 04-12-2018 09:47 AM
If you are stopping a service /component manually (gracefully) then ambari won't try to start it. Auto start of a component is based on its current state and desired state.
Try killing a component abruptly (like kill -9) and then check.
Created 04-12-2018 09:56 AM
@Jay on which case service auto start will start the services?
Created 04-12-2018 09:59 AM
When the components are stopped normally (gratefully) like from Ambari UI or using API calls (or using direct DB edits) then ambari won't attempt to restart those components/services.
Ambari checks the "Desired State" of the service/component is matching with the current state or not to take the decision on whether to start or not.
So if a component crashes (or killed abruptly like using kill -9) or dues to some other issue then the Ambari Will still think that the component should be running but they are actually not running in that case ambari will attempt to start those component where the state are not matching as expected.
Created 04-12-2018 10:04 AM
@Jay , ok
can you refer my comments on - https://community.hortonworks.com/questions/185974/how-to-change-ips-on-all-machine-sin-ambari-clust...
Created 04-12-2018 10:09 AM
To understand how ambari determines to start a component please keep watching the state change in the following
ambari=> SELECT component_name, current_state FROM hostcomponentstate WHERE component_name='HISTORYSERVER'; ambari=> SELECT component_name, desired_state FROM hostcomponentdesiredstate WHERE component_name='HISTORYSERVER';
.
Created 04-11-2019 12:52 PM
As you suggested above can you please help me to know where i can run below query to get the result.
ambari=> SELECT component_name, current_state FROM hostcomponentstate WHERE component_name='HISTORYSERVER'; ambari=> SELECT component_name, desired_state FROM hostcomponentdesiredstate WHERE component_name='HISTORYSERVER';
Created 04-11-2019 01:01 PM
I have figured it out. Thank you!!
I also need to know one more thing.
Using the feature Enable Service Auto start is it a safe way to configure it in Ambari in any environment?
Is there any Cons having it enabled?
If we enable auto start, will there be affect on service which will ask for restarting the service?
Thanking in Advance!!!