Python – Ambari 2.0 installation in centOS 5

Ambari 2.0 installation in centOS 5… here is a solution to the problem.

Ambari 2.0 installation in centOS 5

I plan to set up Ambari 2.0 with a node in CentOS 5. I successfully set up an Ambari server in one box and tried to automatically install the Ambari agent in another box via the Ambari Management Server UI. I have a passwordless SSH with my other server and it works fine, but I get the following error when trying to register with another node. Can anyone help with this?

IOError: [Errno 2] No such file or directory: '/var/lib/ambari-agent/data/version'
INFO 2015-09-01 01:28:55,105 - Host check report at /var/lib/ambari-agent/data/hostcheck.result
INFO 2015-09-01 01:28:55,106 - Removing old host check file at /var/lib/ambari-agent/data/hostcheck.result
INFO 2015-09-01 01:28:55,106 - Creating host check file at /var/lib/ambari-agent/data/hostcheck.result
ERROR 2015-09-01 01:28:55,107 - Unable to connect to:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/", line 120, in registerWithServer
    data = json.dumps(
  File "/usr/lib/python2.6/site-packages/ambari_agent/", line 45, in build
    version = self.read_agent_version()
  File "/usr/lib/python2.6/site-packages/ambari_agent/", line 63, in read_agent_version
    f = open(ver_file, "r")


It looks like the ambari-agent

you installed on that host doesn’t work because of the error: No such file or directory: '/var/lib/ambari-agent/data/version' I'll uninstall and reinstall it:

sudo yum erase ambari-agent
sudo yum install ambari-agent

Then try the installation again.

Related Problems and Solutions