Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari-agent won't start on Redhat Enterprise 7.2

ambari-agent won't start on Redhat Enterprise 7.2

New Contributor

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
8 REPLIES 8

Re: ambari-agent won't start on Redhat Enterprise 7.2

Mentor

@Zaili Xu

This was resolved using this solution

https://community.hortonworks.com/answers/117780/view.html

Please let me know if it was resolved.

Re: ambari-agent won't start on Redhat Enterprise 7.2

New Contributor

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 ?

Re: ambari-agent won't start on Redhat Enterprise 7.2

New Contributor

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

Re: ambari-agent won't start on Redhat Enterprise 7.2

Super Mentor

@Zaili Xu

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.

Re: ambari-agent won't start on Redhat Enterprise 7.2

New Contributor

@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

Highlighted

Re: ambari-agent won't start on Redhat Enterprise 7.2

New Contributor

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

Re: ambari-agent won't start on Redhat Enterprise 7.2

Super Mentor

@Zaili Xu

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.

Re: ambari-agent won't start on Redhat Enterprise 7.2

Super Mentor

@Zaili Xu

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.

Don't have an account?
Coming from Hortonworks? Activate your account here