Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Ambari metrics collector and monitor is not starting

avatar
New Member

Hi...

I have configured ambari agent with non root user hadoop. I am trying to start ambari metrics collector. but it keeps failing with the error below.

ExecutionFailed: Execution of '/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf start' returned 1. sudo: no tty present and no askpass program specified

Also I have updated the sudoers file with the below lines

# Ambari metrics commands
ams ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/ambari-metrics-monitor *, /usr/sbin/ambari-metrics-collector *
hadoop ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/ambari-metrics-monitor *, /usr/sbin/ambari-metrics-collector *

Still is does not work any idea which user ambari is using to start the services ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Yasin Mohammed

AMS collector and Monitor will always as non root user "ams".

The error you are noticing because ambari agent (which seems to be running as non root user) does not have Sodoer permissions setup properly.

Please refer to the following doc and make sure that ambari agent is setup to run as non root user with the list of command mentioned in the below links:

1. https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/how_to_configure...

.

2. Commands - Ambari Agents : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/commands_agent.h...

.

3. Sudo Defaults - Ambari Agents : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/sudo_defaults_ag...

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Yasin Mohammed

AMS collector and Monitor will always as non root user "ams".

The error you are noticing because ambari agent (which seems to be running as non root user) does not have Sodoer permissions setup properly.

Please refer to the following doc and make sure that ambari agent is setup to run as non root user with the list of command mentioned in the below links:

1. https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/how_to_configure...

.

2. Commands - Ambari Agents : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/commands_agent.h...

.

3. Sudo Defaults - Ambari Agents : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/sudo_defaults_ag...

avatar
New Member

Hi...Jay

Thanks for the advice I missed this piece while updating the sudoers

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/sudo_defaults_ag...