Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari agent not starting after host clean up

Solved Go to solution

Ambari agent not starting after host clean up

Expert Contributor

Hi all,

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 :-(

Now when I try to install ambari-agent, it shows below messg (file exists ..) before completing installation.

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!

And when I try to restart ambari-agent, it is not starting ... can somebody help me what to do ...

[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 <module> from Controller import AGENT_AUTO_RESTART_EXIT_CODE File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 22, in <module> 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 <module> from Controller import AGENT_AUTO_RESTART_EXIT_CODE File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 22, in <module> 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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Ambari agent not starting after host clean up

@PJ

You are getting the following error which indicates that the ambari agents python libraries are having either version mismatch or the missing package.

 <module> import ambari_simplejson as json ImportError: No module named ambari_simplejson 

.

- So you should uninstall ambari-agent

- Then clean the following packages form that host. This time you will need to make sure that the following directories are cleaned properly.

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/

- Now install the ambari-agent again

.

View solution in original post

2 REPLIES 2
Highlighted

Re: Ambari agent not starting after host clean up

@PJ

You are getting the following error which indicates that the ambari agents python libraries are having either version mismatch or the missing package.

 <module> import ambari_simplejson as json ImportError: No module named ambari_simplejson 

.

- So you should uninstall ambari-agent

- Then clean the following packages form that host. This time you will need to make sure that the following directories are cleaned properly.

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/

- Now install the ambari-agent again

.

View solution in original post

Highlighted

Re: Ambari agent not starting after host clean up

Expert Contributor

Yes, I could install it successfully after cleaning up the python libraries. Thanks

Don't have an account?
Coming from Hortonworks? Activate your account here