Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

service auto start

Highlighted

service auto start

New Contributor

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:

curl -u admin:admin -H "X-Requested-By: ambari" -X PUT 'http://localhost:8080/api/v1/clusters/test/components?ServiceComponentInfo/component_name.in(APP_TIMELINE_SERVER,DATANODE,HBASE_MASTER,HBASE_REGIONSERVER,HISTORYSERVER,HIVE_METASTORE,HIVE_SERVER,INFRA_SOLR,LIVY_SERVER,LOGSEARCH_LOGFEEDER,LOGSEARCH_SERVER,METRICS_COLLECTOR,METRICS_GRAFANA,METRICS_MONITOR,MYSQL_SERVER,NAMENODE,NODEMANAGER,RESOURCEMANAGER,SECONDARY_NAMENODE,WEBHCAT_SERVER,ZOOKEEPER_SERVER)' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'

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/component_name.in(HBASE_REGIONSERVER)' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'

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

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

</strong>

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

96680-1.png

2 REPLIES 2

Re: service auto start

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.

Re: service auto start

New Contributor

@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?