Support Questions

Find answers, ask questions, and share your expertise

service auto start

When I enable service auto start, after the reboot, most of the components are not started, although I enable and checked recovery enable is true for component with the following commands:


And checking recovery enabled with the below command :

curl -u admin:admin -H "X-Requested-By: ambari" -X PUT 'http://localhost:8080/api/v1/clusters/test/components?ServiceComponentInfo/' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'

i see ambari agent log and understand that change state services to install, for example:

<strong>INFO 2019-01-13 08:52:21,014 - Status for HST_AGENT has changed to INSTALLED
INFO 2019-01-13 08:52:21,014 - New status, current status is set to INSTALLED for HST_AGENT
INFO 2019-01-13 08:52:21,309 - Status for DRUID_BROKER has changed to INSTALLED
INFO 2019-01-13 08:52:21,309 - current status is set to INSTALLED for DRUID_BROKER
INFO 2019-01-13 08:52:21,602 - Status for OOZIE_CLIENT has changed to INSTALLED
INFO 2019-01-13 08:52:21,602 - current status is set to INSTALLED for OOZIE_CLIENT


After rebooting the system, the main components are not started, that showed in captures, and about 1h take to started all services.

what the problem?

@Jay Kumar SenSharma



Super Mentor

@abbas mohammadnejad

Auto start of a component is based on its current state and "desired state". So if you manually stop the services/components then the auto start may not work because the agent compares the current state of these components against the desired state, to determine if these components are to be installed, started, restarted or stopped.

So for testing you should do the following:

1). Make sure that the services are running fine and are in green state.

2). Now reboot a particular host to see whether the components installed on that host are restarted automatically or not ? (Do not manually stop the component / services via ambari UI/API calls to perform this test)


Auto start will be ignored for host components which are in maintenance mode. A host component can be in maintenance mode due one or more of following reasons:

1. The host component was placed in maintenance mode
2. The host was placed in maintenance mode
3. The service was placed in maintenance mode
4. The cluster where the hosts belongs to was placed in maintenance mode.

Maintenance state of a component is got from the maintenance_state field in hostcomponentdesiredstate table.

@Jay Kumar SenSharma

thank you so much for good guide.

in this case for service auto start, desired state is STARTED and current state is INSTALLED.

for reason after system reboot, It takes about 60 minutes to start the components and recovered.

change the cluster-env.xml property do not effect to service auto start and Blueprints.

  1. how can reduce time for service auto start?
  2. why edit cluster-env.xml do not effect on Blueprint and service auto start?


@abbas_kurdistan Did you fix this problem ? If yes, what was the solution ?