Support Questions

Find answers, ask questions, and share your expertise

ambari-agent files missing during installation

avatar
Super Collaborator

I am installing HDP2.4 with ambari2.4 and I am getting these "file not found " errors , if I create a directory manually the process moves ahead n fails on other directories.

apparently ambari install is expecting ambari-agent to be installed already? if that's the case I have never done this step manually before . so what i am missing ?

i have installed the cluster before by just installing ambari-server and initiating the install from web.

==========================
Running setup agent script...
==========================

Command start time 2017-06-16 17:41:00
/usr/sbin/ambari-agent: line 97: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 99: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 100: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 101: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 102: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 103: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 104: ambari-sudo.sh: command not found
/usr/sbin/ambari-agent: line 105: ambari-sudo.sh: command not found
('INFO 2017-06-16 17:41:06,285 DataCleaner.py:39 - Data cleanup thread started
INFO 2017-06-16 17:41:06,286 DataCleaner.py:120 - Data cleanup started
INFO 2017-06-16 17:41:06,287 DataCleaner.py:122 - Data cleanup finished
INFO 2017-06-16 17:41:06,328 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2017-06-16 17:41:06,330 main.py:349 - Connecting to Ambari server at https://hadoop1.tolls.dot.state.fl.us:8440 (10.100.44.17)
INFO 2017-06-16 17:41:06,330 NetUtil.py:65 - Connecting to https://hadoop1.tolls.dot.state.fl.us:8440/ca
INFO 2017-06-16 17:41:06,389 main.py:359 - Connected to Ambari server hadoop1.tolls.dot.state.fl.us
ERROR 2017-06-16 17:41:06,390 main.py:392 - Exiting with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 387, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 363, in main
    controller = Controller(config, server_hostname, heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 67, in __init__
    self.version = self.read_agent_version(config)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 134, in read_agent_version
    f = open(ver_file, "r")
IOError: [Errno 2] No such file or directory: \'/var/lib/ambari-agent/data/version\'
INFO 2017-06-16 17:41:07,060 ExitHelper.py:53 - Performing cleanup before exiting...
INFO 2017-06-16 17:41:07,069 Controller.py:141 - Server connection disconnected.
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Sami Ahmad

Ambari Agent can be installed manually as well as via Ambari UI and both options are valid.

You mentioned that "apparently ambari install is expecting ambari-agent to be installed already?"

>>> Ambari Server installation does not require the agent to be installed already. Can you please share the Ambari Server installation log/output of the console which makes you feel that ambari installation is expecting agent installation?

.

Are you getting the same IOError and file not found on every ambari agent host?

/usr/sbin/ambari-agent: line 97: ambari-sudo.sh: command not found

IOError: [Errno 2] No such file or directory: \'/var/lib/ambari-agent/data/version\'

If that is happening on any particular Agent host then it might be due to incomplete agent installation. So either you willl need to check the "yum.log" to see if the agent installation was successful or not? (OR) Better to run the following command manually on the agent hosts to recover the installation.

# yum reinstall ambari-agent -y

.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Sami Ahmad

Ambari Agent can be installed manually as well as via Ambari UI and both options are valid.

You mentioned that "apparently ambari install is expecting ambari-agent to be installed already?"

>>> Ambari Server installation does not require the agent to be installed already. Can you please share the Ambari Server installation log/output of the console which makes you feel that ambari installation is expecting agent installation?

.

Are you getting the same IOError and file not found on every ambari agent host?

/usr/sbin/ambari-agent: line 97: ambari-sudo.sh: command not found

IOError: [Errno 2] No such file or directory: \'/var/lib/ambari-agent/data/version\'

If that is happening on any particular Agent host then it might be due to incomplete agent installation. So either you willl need to check the "yum.log" to see if the agent installation was successful or not? (OR) Better to run the following command manually on the agent hosts to recover the installation.

# yum reinstall ambari-agent -y

.

avatar
Super Collaborator

Jay you were right , I removed the agent and reinstalled and it fixed the issue.