Created 02-20-2018 09:13 PM
Our company has strict restriction on granting root access. So I had to manually install ambari-agent to register it with server. But the agent failed with the following error message:
"tput: No value for $TERM and no -T specified ambari-agent currently not running tput:
No value for $TERM and no -T specified Verifying Python version compatibility...
Using python /usr/bin/python
Checking for previously running Ambari Agent...
Checking ambari-common dir...
Starting ambari-agent"
"Ambari prefix dir %s not configured, can't continue"
my ambari-agent.init is like this
hostname=some.host.name
url_port=8440
secured_url_port=8441
piddir=/var/run/ambari-agent
logdir=/var/log/ambari-agent
keysdir=/var/lib/ambari-agent
Created 02-20-2018 09:51 PM
This was resolved using this solution
https://community.hortonworks.com/answers/117780/view.html
Please let me know if it was resolved.
Created 02-20-2018 10:30 PM
Thank you, Geoffrey
The issue remains after installing epel-release rpm.
From /var/log/ambari-agent/ambari-agent.log
INFO 2018-02-20 17:15:51,895 main.py:145 - loglevel=logging.INFO INFO 2018-02-20 17:15:51,895
main.py:145 - loglevel=logging.INFO INFO 2018-02-20 17:15:51,895
main.py:145 - loglevel=logging.INFO ERROR 2018-02-20 17:15:51,897
main.py:259 - Ambari prefix dir %s not configured, can't continue
INFO 2018-02-20 17:15:51,897 ExitHelper.py:56 - Performing cleanup before exiting...
Is this because I am installing ambari-agent on the same host with ambari-server ? Also if ambari-agent and ambari-server are on the same host can ambari cluster installation wizard continue without SSH private key ?
Created 02-20-2018 10:54 PM
The source code in /usr/lib/ambari-agent/lib/ambari_agent/main.py shows that the following config is required to start agent. Can someone give me an example on how to config [agent] prefix and what it is used for ?
[agent]
prefix=xxx
Created 02-20-2018 11:18 PM
Can you please check if you have added the "prefix" inside your "ambari-agent.ini" file as following: (But default it should be there) But please check if it is deleted by mistake.
[root@sandbox ~]# grep 'prefix' /etc/ambari-agent/conf/ambari-agent.ini prefix=/var/lib/ambari-agent/data
.
It it was missing then please add it back there and then try restarting agent.
Created 02-21-2018 02:43 PM
@Jay Kumar SenSharma, Thank you for your answer. I added the property, prefix, as you suggested and that fixed the original error. Then I notice that amari-agent needs more properties which are not mentioned in the Hortworks Amari-Agent manual installation doc. I run into a different issue now with Ambari agent start. Will ask a different question
Created 02-21-2018 05:24 PM
Ok. I have the agent running now. Install the Ambari Agents manually doc is missing a lot properties required to start the agent. Ambari assumes most users will choose the automatic installation option with SSH private key which is true but our company won't grant root access
Created 02-22-2018 12:21 AM
Actually when you do "yum install ambari-agent". then you get a default file "/etc/ambari-agent/conf/ambari-agent.ini". which has almost everything in it .
Default file content: https://github.com/apache/ambari/blob/release-2.6.1/ambari-agent/conf/unix/ambari-agent.ini
The Doc: Install the Ambari Agents manually simply asks users to change the value of those specific properties and leave the other properties as it is.
Created 02-22-2018 03:00 AM
If this answers your query then please mark this HCC thread as answered by clicking on "Accept" link on the correct answer, That way it will help other HCC users to quickly find the answers.