<?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: Ambari agent not starting after host clean up in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133913#M47765</link>
    <description>&lt;P&gt;Yes, I could install it successfully after cleaning up the python libraries. Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 20:16:50 GMT</pubDate>
    <dc:creator>pmj</dc:creator>
    <dc:date>2016-12-02T20:16:50Z</dc:date>
    <item>
      <title>Ambari agent not starting after host clean up</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133911#M47763</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I had to clean up a host which had ambari and HDP running. I deleted all repos, rpm packages, directories, users and all (may be missed a few &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;  &lt;/P&gt;&lt;P&gt;Now when I try to install ambari-agent, it shows below messg (file exists ..) before completing installation.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Total download size: 20 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
ambari-agent-2.2.2.0-460.x86_64.rpm                                                                                                                                                                                  |  20 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ambari-agent-2.2.2.0-460.x86_64                                                                                                                                                                                          1/1
ln: creating symbolic link `/usr/lib/python2.6/site-packages/ambari_commons': File exists
ln: creating symbolic link `/usr/lib/python2.6/site-packages/resource_management': File exists
ln: creating symbolic link `/usr/lib/python2.6/site-packages/ambari_jinja2': File exists
ln: creating symbolic link `/usr/lib/python2.6/site-packages/ambari_simplejson': File exists
ln: creating symbolic link `/usr/lib/python2.6/site-packages/resource_management': File exists
ln: creating symbolic link `/usr/lib/python2.6/site-packages/ambari_jinja2': File exists
  Verifying  : ambari-agent-2.2.2.0-460.x86_64                                                                                                                                                                                          1/1
Installed:
  ambari-agent.x86_64 0:2.2.2.0-460
Complete!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;
&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;And when I try to restart ambari-agent, it is not starting ... can somebody help me what to do ... &lt;/P&gt;&lt;P&gt;&lt;EM&gt;[root@str17 /]# ambari-agent restart
Restarting ambari-agent
Verifying Python version compatibility...
Using python  /usr/bin/python
ambari-agent is not running. No PID found at /var/run/ambari-agent/ambari-agent.pid
Verifying Python version compatibility...
Using python  /usr/bin/python
Checking for previously running Ambari Agent...
Starting ambari-agent
Verifying ambari-agent process status...
ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
====================
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/AmbariAgent.py", line 24, in &amp;lt;module&amp;gt;
    from Controller import AGENT_AUTO_RESTART_EXIT_CODE
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 22, in &amp;lt;module&amp;gt;
    import ambari_simplejson as json
ImportError: No module named ambari_simplejson
====================
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log
[root@str17 /]# service ambari-agent status
ambari-agent currently not running
[root@str17 /]# ambari-agent start
Verifying Python version compatibility...
Using python  /usr/bin/python
Checking for previously running Ambari Agent...
Starting ambari-agent
Verifying ambari-agent process status...
ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
====================
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/AmbariAgent.py", line 24, in &amp;lt;module&amp;gt;
    from Controller import AGENT_AUTO_RESTART_EXIT_CODE
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 22, in &amp;lt;module&amp;gt;
    import ambari_simplejson as json
ImportError: No module named ambari_simplejson
====================
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 06:19:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133911#M47763</guid>
      <dc:creator>pmj</dc:creator>
      <dc:date>2016-12-02T06:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari agent not starting after host clean up</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133912#M47764</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/14451/pjalleda.html"&gt;PJ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You are getting the following error which indicates that the ambari agents python libraries are having either version mismatch or the missing package.&lt;/P&gt;&lt;PRE&gt; &amp;lt;module&amp;gt; import ambari_simplejson as json ImportError: No module named ambari_simplejson &lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;- So you should uninstall  ambari-agent&lt;/P&gt;&lt;P&gt;- Then clean the following packages form that host. This time you will need to make sure that the following directories are cleaned properly.&lt;/P&gt;&lt;PRE&gt;rm -f /usr/lib/python2.6/site-packages/ambari_commons
rm -rf /usr/lib/python2.6/site-packages/resource_management
rm -rf /usr/lib/python2.6/site-packages/ambari_jinja2

rm -rf /var/lib/ambari-agent/
rm -rf /usr/lib/ambari-agent/
&lt;/PRE&gt;&lt;P&gt;- Now install the ambari-agent again&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 11:26:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133912#M47764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-02T11:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari agent not starting after host clean up</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133913#M47765</link>
      <description>&lt;P&gt;Yes, I could install it successfully after cleaning up the python libraries. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 20:16:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-agent-not-starting-after-host-clean-up/m-p/133913#M47765</guid>
      <dc:creator>pmj</dc:creator>
      <dc:date>2016-12-02T20:16:50Z</dc:date>
    </item>
  </channel>
</rss>

