I am planning to setup Ambari 2.0 in CentOS 5 with one node. I was successful in setting up Ambari server in one box and was trying installing Ambari agent in another box automatically through Ambari admin Server UI. I have a passwordless SSH with my other server and it is working fine, but while trying to register with the other node I encounter below error. Can anyone please help resolving it?
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")
Looks like you have an invalid install of ambari-agent on that host, due to the error: No such file or directory: '/var/lib/ambari-agent/data/version'
I would uninstall and reinstall it:
sudo yum erase ambari-agent
sudo yum install ambari-agent
Then try your install again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.