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 HostCheckReportFileHandler.py:91 - Host check report at /var/lib/ambari-agent/data/hostcheck.result
INFO 2015-09-01 01:28:55,106 HostCheckReportFileHandler.py:141 - Removing old host check file at /var/lib/ambari-agent/data/hostcheck.result
INFO 2015-09-01 01:28:55,106 HostCheckReportFileHandler.py:146 - Creating host check file at /var/lib/ambari-agent/data/hostcheck.result
ERROR 2015-09-01 01:28:55,107 Controller.py:170 - Unable to connect to: https://172.16.2.132:8441/agent/v1/register/iaccm002.zymesolutions.local
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 120, in registerWithServer
    data = json.dumps(self.register.build())
  File "/usr/lib/python2.6/site-packages/ambari_agent/Register.py", line 45, in build
    version = self.read_agent_version()
  File "/usr/lib/python2.6/site-packages/ambari_agent/Register.py", line 63, in read_agent_version
    f = open(ver_file, "r")

Solution

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