<?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 Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111108#M33788</link>
    <description>&lt;P&gt;I refer to 
	&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services"&gt;Defining a Custom Stack and Services&lt;/A&gt;. (&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;
	My custom service directory structure is as follows:&lt;/P&gt;&lt;PRE&gt;SAMPLESRV/
├── configuration
│   └── test-config.xml
├── metainfo.xml
└── package
    ├── archive.zip
    └── scripts
        ├── master.py
        ├── sample_client.py
        └── slave.py
&lt;/PRE&gt;&lt;P&gt;When I add check_process_status method in master.py and restart ambari server, the service status will show red icon.
But the service is running. &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5473-add-check-process-status.png"&gt;add-check-process-status.png&lt;/A&gt; &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5474-add-check-process-status2.png"&gt;add-check-process-status2.png&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;  def status(self, env):
    print 'Status of the Sample Srv Master';
    my_test_pid = "/var/run/mytest/mytest_server.pid"
    check_process_status(my_test_pid)
&lt;/PRE&gt;&lt;P&gt;When I comment check_process_status method in master.py and restart ambari server, the service status will show green icon. &lt;/P&gt;&lt;P&gt;Do I miss something?&lt;/P&gt;&lt;P&gt;About my source code of custom service , please refer to attachment file &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5471-my-custom-service.tar.gz"&gt;my-custom-service.tar.gz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jul 2016 14:10:31 GMT</pubDate>
    <dc:creator>ianli</dc:creator>
    <dc:date>2016-07-04T14:10:31Z</dc:date>
    <item>
      <title>Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111108#M33788</link>
      <description>&lt;P&gt;I refer to 
	&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services"&gt;Defining a Custom Stack and Services&lt;/A&gt;. (&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;
	My custom service directory structure is as follows:&lt;/P&gt;&lt;PRE&gt;SAMPLESRV/
├── configuration
│   └── test-config.xml
├── metainfo.xml
└── package
    ├── archive.zip
    └── scripts
        ├── master.py
        ├── sample_client.py
        └── slave.py
&lt;/PRE&gt;&lt;P&gt;When I add check_process_status method in master.py and restart ambari server, the service status will show red icon.
But the service is running. &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5473-add-check-process-status.png"&gt;add-check-process-status.png&lt;/A&gt; &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5474-add-check-process-status2.png"&gt;add-check-process-status2.png&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;  def status(self, env):
    print 'Status of the Sample Srv Master';
    my_test_pid = "/var/run/mytest/mytest_server.pid"
    check_process_status(my_test_pid)
&lt;/PRE&gt;&lt;P&gt;When I comment check_process_status method in master.py and restart ambari server, the service status will show green icon. &lt;/P&gt;&lt;P&gt;Do I miss something?&lt;/P&gt;&lt;P&gt;About my source code of custom service , please refer to attachment file &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5471-my-custom-service.tar.gz"&gt;my-custom-service.tar.gz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2016 14:10:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111108#M33788</guid>
      <dc:creator>ianli</dc:creator>
      <dc:date>2016-07-04T14:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111109#M33789</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11606/ianli.html" nodeid="11606"&gt;@Ian Li&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I followed the steps from &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Defining+a+Custom+Stack+and+Services&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I was able to launch the service and it shows green . Please find the attached. &lt;/P&gt;&lt;P&gt;My assumption is within the documentation I see the steps for applicable for HDP 2.0.6 -&amp;gt; 2.1.&lt;/P&gt;&lt;P&gt;Can you try the steps in &lt;/P&gt;&lt;P&gt;/var/lib/ambari-server/resources/stacks/HDP/2.4/services&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5528-new-sample-service.png"&gt;new-sample-service.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5529-screenshot1.png"&gt;screenshot1.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps. Let me know in case of issues.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujitha&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 08:23:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111109#M33789</guid>
      <dc:creator>ssanku</dc:creator>
      <dc:date>2016-07-06T08:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111110#M33790</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3915/ssanku.html" nodeid="3915"&gt;@sujitha sanku&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the information.&lt;/P&gt;&lt;P&gt;I use Hortonworks Sandbox HDP 2.4 and try the steps in "/var/lib/ambari-server/resources/stacks/HDP/2.4/services"&lt;/P&gt;&lt;P&gt;The service status shows green. When I stop service, it will show red a while and turn green. It doesn't make sense.&lt;/P&gt;&lt;P&gt;After I add check_process_status(my_test_pid) in status method, the service status show red.&lt;/P&gt;&lt;P&gt;I have already refer to some information. For example: How to deploy Zeppelin(http://hortonworks.com/apache/zeppelin/#section_3) and Jupyter(https://github.com/randerzander/jupyter-service) on ambari&lt;/P&gt;&lt;P&gt;But I still don't know why the check_process_status doesn't work.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 10:42:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111110#M33790</guid>
      <dc:creator>ianli</dc:creator>
      <dc:date>2016-07-06T10:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111111#M33791</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11606/ianli.html" nodeid="11606"&gt;@Ian Li&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I was able to get this to stop and start by adding these lines in the master.py and slave.py&lt;/P&gt;&lt;P&gt;I added a dummy PID, Since we have not installed a real service, there is no PID file created by it.Therefore we are going to artificially create the PID,remove the PIDand check the process status of the dummy pid.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5573-screen-shot-2016-07-06-at-20304-pm.png"&gt;screen-shot-2016-07-06-at-20304-pm.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5573-screen-shot-2016-07-06-at-20304-pm.png"&gt;&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5574-screen-shot-2016-07-06-at-20322-pm.png"&gt;screen-shot-2016-07-06-at-20322-pm.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5575-screen-shot-2016-07-06-at-20340-pm.png"&gt;screen-shot-2016-07-06-at-20340-pm.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Let me know in case of any other issues.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujitha&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 04:05:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111111#M33791</guid>
      <dc:creator>ssanku</dc:creator>
      <dc:date>2016-07-07T04:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111112#M33792</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11606/ianli.html" nodeid="11606"&gt;@Ian Li&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;If this issue was resolved can you pick the best answer and we can think this as resolved.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujitha&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 00:54:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111112#M33792</guid>
      <dc:creator>ssanku</dc:creator>
      <dc:date>2016-07-13T00:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom service check process status failed(show red icon) on ambari 2.2.1 and HDP 2.4</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111113#M33793</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3915/ssanku.html" nodeid="3915"&gt;@sujitha sanku&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;It's working.&lt;/P&gt;&lt;P&gt;Thank you again for everything you have done!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 08:06:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-service-check-process-status-failed-show-red-icon-on/m-p/111113#M33793</guid>
      <dc:creator>ianli</dc:creator>
      <dc:date>2016-07-14T08:06:32Z</dc:date>
    </item>
  </channel>
</rss>

