<?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: Problem Controlling CM Agent Start / Stop in a Script in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28004#M32503</link>
    <description>&lt;P&gt;Resolved by upgrade coreutils to&amp;nbsp;8.4-37.el6 (CentOS 6.5 original version:&amp;nbsp;8.4-31.el6)&lt;/P&gt;</description>
    <pubDate>Thu, 28 May 2015 04:15:19 GMT</pubDate>
    <dc:creator>athtsang</dc:creator>
    <dc:date>2015-05-28T04:15:19Z</dc:date>
    <item>
      <title>Problem Controlling CM Agent Start / Stop in a Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/27975#M32500</link>
      <description>&lt;P&gt;I tried to use a script which start / stop CM agent. It's found that if the agent was started and then stopped, the script will be killed. As show below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@cdh52 ~]# cat myscript.sh
#!/bin/bash

service cloudera-scm-agent start
service cloudera-scm-agent stop
echo "Still Alive"


You have new mail in /var/spool/mail/root
[root@cdh52 ~]# ./myscript.sh
Starting cloudera-scm-agent:                               [  OK  ]
Stopping cloudera-scm-agent: Terminated&lt;/PRE&gt;&lt;P&gt;Note that [OK] and "Still Alive" is not displayed, because the parent script was killed when cloudera-scm-agent trying to stop the agent. The same effect if "service&amp;nbsp;cloudera-scm-agent" was replaced by /etc/init.d/cloudera-scm-agent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i don't understand is HOW kill find the parent processto kill. The &lt;SPAN&gt;cloudera-scm-agent script has already disown'ed the agent. And ps show that the PID of agent's parent is 1 (init), not myscript.sh.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:30:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/27975#M32500</guid>
      <dc:creator>athtsang</dc:creator>
      <dc:date>2022-09-16T09:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Controlling CM Agent Start / Stop in a Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28001#M32501</link>
      <description>The supervisord log might have a clue. It is in&lt;BR /&gt;/var/log/cloudera-scm-agent/supervisord.log&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 May 2015 02:47:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28001#M32501</guid>
      <dc:creator>GautamG</dc:creator>
      <dc:date>2015-05-28T02:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Controlling CM Agent Start / Stop in a Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28002#M32502</link>
      <description>&lt;P&gt;Thanks for the reply. It seems this is a general Linux issue&amp;nbsp;when killing a "su" process (where agent is), not caused by CM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will update here when I get meaningful&amp;nbsp;finding.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 03:36:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28002#M32502</guid>
      <dc:creator>athtsang</dc:creator>
      <dc:date>2015-05-28T03:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Controlling CM Agent Start / Stop in a Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28004#M32503</link>
      <description>&lt;P&gt;Resolved by upgrade coreutils to&amp;nbsp;8.4-37.el6 (CentOS 6.5 original version:&amp;nbsp;8.4-31.el6)&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 04:15:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28004#M32503</guid>
      <dc:creator>athtsang</dc:creator>
      <dc:date>2015-05-28T04:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Controlling CM Agent Start / Stop in a Script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28005#M32504</link>
      <description>Thanks for the update!</description>
      <pubDate>Thu, 28 May 2015 04:17:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Problem-Controlling-CM-Agent-Start-Stop-in-a-Script/m-p/28005#M32504</guid>
      <dc:creator>GautamG</dc:creator>
      <dc:date>2015-05-28T04:17:21Z</dc:date>
    </item>
  </channel>
</rss>

