Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari agent failed to start Permission denied

avatar

I want to manually install ambari-agent in the same host that contains ambari-server when I try ambari-agent start it gives me "bash: /var/lib/ambari-agent/bin/ambari-agent: Permission denied" I run the command with root permission, how to start ambari-agent

any help, please

10 REPLIES 10

avatar
Super Guru

@chaouki trabelsi,

Are you running ambari agent as a non-root user or root user. If you are running as a non-root user, you need to follow these steps.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_security/content/_how_to_configure_an_am...

.

-Aditya

avatar

Thanks @Aditya Sirna for the quick response, I m running as a root user, I already installed and start ambari server and it didn't gives errors

avatar
New Contributor

Hi @chaouki trabelsi

Were you able to resolve the issue ? Im also facing same problem and trying to figure it out.

Thanks

avatar
Super Guru

You will need to add the ssh-key for the ambari server to ~/ or /root/.ssh/authorized_keys. This will allow the server to ssh to itself and install the agent. Be sure to test before trying: ssh root@localhost and accept the prompts the first time.

If this answer helps, please ACCEPT.

avatar

@chaouki trabelsi simply run "ambari-agent start" command. if you are attempting that command with non-root user then switch to root user and try again.

avatar

Hi @chaouki trabelsi ,

Are you able to resolve the issue.

I hope if you run the Command ambari-agent start as root user you should be able to start the ambari-agent.

If you are still facing the issue . Please attach the error logs while running the command to this thread.

hope this helps.

avatar
New Contributor

Hi All,

After fresh installation of ambari-agent its giving below permission denied error on /var/lib/ambari-agent/bin/ambari-agent file.

I have tried changing file owneship and read write access permissions. Appreciate any help

86637-ambari.png

avatar

Hi @Wasantha Herath ,

have you installed ambari-agent via root only ?

whats permission of this folder and this file now.

this looks permission issue only.

avatar
Explorer

Check your /var mount in /etc/fstab, if it has noexec then /var has enough permissions.

Try to remount giving the permission :

#mount -o remount,defaults,nosuid,nodev,exec /var/