Hello, I just installed an HDP 2.3 cluster and I have notice that when I reboot the cluster the only service that automatically starts is ambari-server, so I have to manually join in ambari console and start all the services, I've it installed in CentOS7. I also notice that there is no .service files or script at /etc/init.d for the services... Do I have to manually create all of them? Thank you in advance.
ambari-agent should be started automatically as well on all hosts.
For starting the individual services within HDP, it is recommended to use the ambari api. Take a look at the answer provided here: https://community.hortonworks.com/questions/825/how-to-write-cluster-startup-shutdown-order-and-sc.h....
Hi Tom I've currently read that post but this method drops a question to me.. if non ambari-server nodes start after the ambari api call is made, the services hosted there are going to start? will ambari wait until the nodes start? because if I put a script in each node and they run the script before ambari-server is up I have the same problem... services won't start.
And If I try to start services as in http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_HDP_Reference_Guide/content/starting_hdp_... services doesn't read the configurations made in ambari and for example knox doesn't start because doesn't try to find the pid directory in the right place...
There are a few things at play here. Let me try to summarize:
1) Ambari Server and Ambari Agent can be set to automatically restart on a server start/reboot.
2) You are correct, tho, that the services/components on the hosts are not restarting automatically.
3) We are not recommending to write your own init scripts to start the components on the machines. Since Ambari knows the correct settings/options to start a component with, we really want to have Ambari perform the component starts in an Ambari managed cluster.
4) There is a enhancement underway in the community to have Ambari automatically do this. https://issues.apache.org/jira/browse/AMBARI-2330. A lot of the auto-start backend has been implemented in the (upcoming) Ambari 2.4.0 release although it has not been brought to the Ambari UI yet. That looks like the release following Ambari 2.4.
5) Therefore, in the meantime, we suggest you implement a script that executes on host restart that calls Ambari, finds out what components are installed, and asks Ambari to start them. We have some info on the API calls here: