<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to get automatically services started when we restart the machine? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160821#M29184</link>
    <description>&lt;P&gt;I'm saying Ambari server and agent process will start by ini.d script and I think this has been implemented long back &lt;A href="https://issues.apache.org/jira/browse/AMBARI-1492"&gt;https://issues.apache.org/jira/browse/AMBARI-1492&lt;/A&gt; . The rest HDP components services like NN,SNN DN etc should start manually through Ambari UI or API's.&lt;/P&gt;</description>
    <pubDate>Sat, 21 May 2016 21:33:08 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-05-21T21:33:08Z</dc:date>
    <item>
      <title>How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160817#M29180</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;When I restarted the machine due to some problem, all the services on that particular machine are getting stopped except SmartSense agent. The only SmartSense agent is getting automatically started as soon as the machine is up. In the same way, even I want other services also get started automatically like ambari-agent, services like DN, NM, AMS, etc.., &lt;/P&gt;&lt;P&gt;Now my questions are: Is it possible to get all the services automatically get started same as HST agent? If no, then why is only HST getting started automatically? &lt;/P&gt;&lt;P&gt;Any help is highly appreciated and Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 20:05:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160817#M29180</guid>
      <dc:creator>bandarusridhar1</dc:creator>
      <dc:date>2016-05-21T20:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160818#M29181</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/5746/bandarusridhar1.html" nodeid="5746"&gt;@Sridhar  Bandaru&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Ambari server and agent should start after OS reboot, as far as concern about hadoop services we recommend to use Ambari UI or  API's. Also there are some services to collect metrics from OS and Hadoop will start automatically.&lt;/P&gt;&lt;P&gt;Hope that make sense. Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 20:43:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160818#M29181</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-21T20:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160819#M29182</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/2528/jyadav.html"&gt;Jitendra Yadav&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;FroFrom my understanding this is the summer you mean: Ambari-server and agent will start automatically when we start the server after stop, but services won't start automatically and we need to start manually each service. In that case I always see &lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 21:15:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160819#M29182</guid>
      <dc:creator>bandarusridhar1</dc:creator>
      <dc:date>2016-05-21T21:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160820#M29183</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/5746/bandarusridhar1.html" nodeid="5746"&gt;@Sridhar  Bandaru&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In addition to what &lt;A rel="user" href="https://community.cloudera.com/users/2528/jyadav.html" nodeid="2528"&gt;@Jitendra Yadav&lt;/A&gt; mentioned if you still wish to get all services up after reboot then below are 2 options -&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;You can use ambari api to start the service. Just club all the services according to the order they needs to be started in a script/file and put the file in /etc/rc.local.
 refer below link - &lt;A href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517" target="_blank"&gt;https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Or you can create init script of the file too so that it will act as like existing(ssh) service where you can start/stop using command and enable after reboot using chkconfig.&lt;/P&gt;&lt;P&gt;Pls do refer this -&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/825/how-to-write-cluster-startup-shutdown-order-and-sc.html" target="_blank"&gt;https://community.hortonworks.com/questions/825/how-to-write-cluster-startup-shutdown-order-and-sc.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sample script -&lt;/P&gt;&lt;P&gt;===========&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;export $PASSWORD = *****&lt;/CODE&gt;
&lt;CODE&gt;export $CLUSTER_NAME = {Your Cluster Name}&lt;/CODE&gt;
&lt;CODE&gt;curl -u admin:$PASSWORD -i -H &lt;/CODE&gt;&lt;CODE&gt;'X-Requested-By: ambari'&lt;/CODE&gt; &lt;CODE&gt;-X PUT -d &lt;/CODE&gt;&lt;CODE&gt;'{"RequestInfo": {"context" :"Start HDFS via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}'&lt;/CODE&gt; &lt;CODE&gt;http:&lt;/CODE&gt;&lt;CODE&gt;//`hostname -f`:8080/api/v1/clusters/$CLUSTER_NAME/services/HDFS&lt;/CODE&gt;
&lt;CODE&gt;curl -u admin:$PASSWORD -i -H &lt;/CODE&gt;&lt;CODE&gt;'X-Requested-By: ambari'&lt;/CODE&gt; &lt;CODE&gt;-X PUT -d &lt;/CODE&gt;&lt;CODE&gt;'{"RequestInfo": {"context" :"Start YARN via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}'&lt;/CODE&gt; &lt;CODE&gt;http:&lt;/CODE&gt;&lt;CODE&gt;//`hostname -f`:8080/api/v1/clusters/$CLUSTER_NAME/services/YARN&lt;/CODE&gt;
&lt;CODE&gt;curl -u admin:$PASSWORD -i -H &lt;/CODE&gt;&lt;CODE&gt;'X-Requested-By: ambari'&lt;/CODE&gt; &lt;CODE&gt;-X PUT -d &lt;/CODE&gt;&lt;CODE&gt;'{"RequestInfo": {"context" :"Start MAPREDUCE2 via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}'&lt;/CODE&gt; &lt;CODE&gt;http:&lt;/CODE&gt;&lt;CODE&gt;//`hostname -f`:8080/api/v1/clusters/$CLUSTER_NAME/services/MAPREDUCE2&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;==========&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;2. You can use ambari blueprint to start and stop the services.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 21:20:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160820#M29183</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2016-05-21T21:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160821#M29184</link>
      <description>&lt;P&gt;I'm saying Ambari server and agent process will start by ini.d script and I think this has been implemented long back &lt;A href="https://issues.apache.org/jira/browse/AMBARI-1492"&gt;https://issues.apache.org/jira/browse/AMBARI-1492&lt;/A&gt; . The rest HDP components services like NN,SNN DN etc should start manually through Ambari UI or API's.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 21:33:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160821#M29184</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-21T21:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160822#M29185</link>
      <description>&lt;P&gt;Thanks @&lt;A href="https://community.hortonworks.com/users/2648/sshimpi.html"&gt;Sagar Shimp&lt;/A&gt;i and &lt;A href="https://community.hortonworks.com/users/2528/jyadav.html"&gt;@Jitendra Yadav&lt;/A&gt; for valuable information, let me try and get back to you.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 21:49:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160822#M29185</guid>
      <dc:creator>bandarusridhar1</dc:creator>
      <dc:date>2016-05-21T21:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160823#M29186</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/5746/bandarusridhar1.html" nodeid="5746" target="_blank"&gt;@Sridhar  Bandaru&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I have written a utility(work is still in progress) which can be very helpful in your case.&lt;/P&gt;&lt;P&gt;1. Clone my repository&lt;/P&gt;&lt;PRE&gt;git clone &lt;A href="https://github.com/crazyadmins/useful-scripts.git" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/crazyadmins/useful-scripts.git&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;2. Goto useful-scripts/ambari/&lt;/P&gt;&lt;P&gt;3. Edit ambari.properties according to your cluster environment&lt;/P&gt;&lt;P&gt;4. Start using script &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the usage screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4406-screen-shot-2016-05-22-at-123445-am.png" style="width: 1894px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20707iB26E700A1D39606F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4406-screen-shot-2016-05-22-at-123445-am.png" alt="4406-screen-shot-2016-05-22-at-123445-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Happy Hadooping!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 11:57:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160823#M29186</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2019-08-18T11:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160824#M29187</link>
      <description>&lt;P&gt;FWIW, There is API info on how to determine and restart host components on a given host.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Restart+Host+Components" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Restart+Host+Components&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And this is the JIRA for Ambari to support auto-start of services + components:&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/AMBARI-2330" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-2330&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 19:28:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160824#M29187</guid>
      <dc:creator>jeff1</dc:creator>
      <dc:date>2016-05-23T19:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160825#M29188</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/5746/bandarusridhar1.html" nodeid="5746"&gt;@Sri Bandaru&lt;/A&gt; You can use the auto-start feature to specify the list of components that you want to restart after a node comes up. The documentation of the feature is here: &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Recovery%3A+auto+start+components" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Recovery%3A+auto+start+components&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 23:26:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160825#M29188</guid>
      <dc:creator>nsomasundaram</dc:creator>
      <dc:date>2016-05-23T23:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160826#M29189</link>
      <description>&lt;P&gt;Thanks Jeff for posting this Ambari case. I had read the wiki as mentioned in this thread and found "The user has to enable auto start via the UI." But I couldn't find it. Then read the jira, and it states that "Reopening since in 2.4.0 we hid this from the UI as an experimental feature."&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 23:37:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160826#M29189</guid>
      <dc:creator>bhagan</dc:creator>
      <dc:date>2016-10-11T23:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get automatically services started when we restart the machine?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160827#M29190</link>
      <description>&lt;P&gt;Could you please provide examples according to :&lt;/P&gt;&lt;P&gt;&amp;lt; 2. You can use ambari blueprint to start and stop the services.&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2017 00:19:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-automatically-services-started-when-we-restart/m-p/160827#M29190</guid>
      <dc:creator>tyura1</dc:creator>
      <dc:date>2017-01-28T00:19:24Z</dc:date>
    </item>
  </channel>
</rss>

