Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

while trying to add a client only host to an existing cluster , in the Assign Slaves and Clients dialog the NEXT button is always disabled. How can I get it to be enabled?

avatar
New Contributor
 
1 ACCEPTED SOLUTION

avatar
Super Mentor

@Gordon Muster

The following error can occur if you are runnign ambari server as a "Non Root User" and that user does not have permission to write on the "/var/run/ambari-server/stack-recommendations" directory.

org.apache.ambari.server.controller.spi.SystemException: Error occured during stack advisor command invocation: Cannot create /var/run/ambari-server/stack-recommendations

.

View solution in original post

7 REPLIES 7

avatar
New Contributor

I am using HDP-2.6.0.3 and ambari 2.5.1.0 on ubuntu 14.04

avatar
Super Mentor

@Gordon Muster

- Do you see any strange ERROR or WARNING message inside the ambari-server.log?

- In your Browser can you check if you see any error message in the Java Script Debugger tool.

Browser Menu --> More Tools > Developer Tools from Chrome's Main Menu

.

avatar
New Contributor

10 Oct 2017 16:31:13,898 ERROR [ambari-client-thread-151] BaseManagementHandler:61 - Caught a system exception while attempting to create a resource: Error occured during stack advisor command invocation: Cannot create /var/run/ambari-server/stack-recommendations
org.apache.ambari.server.controller.spi.SystemException: Error occured during stack advisor command invocation: Cannot create /var/run/ambari-server/stack-recommendations
at org.apache.ambari.server.controller.internal.ValidationResourceProvider.createResources(ValidationResourceProvider.java:91)

avatar
Super Mentor

@Gordon Muster

The following error can occur if you are runnign ambari server as a "Non Root User" and that user does not have permission to write on the "/var/run/ambari-server/stack-recommendations" directory.

org.apache.ambari.server.controller.spi.SystemException: Error occured during stack advisor command invocation: Cannot create /var/run/ambari-server/stack-recommendations

.

avatar
Super Mentor

@Gordon Muster


If you are runnign ambari server as a Non-Root Directory and if it is RHEL7 (or CentOS7) then please do the following:


Edit the "/etc/ambari-server/conf/ambari.properties" and then edit the following properties to a directory which is out side of the "/var/run"

Example: Default Values

pid.dir=/var/run/ambari-server
bootstrap.dir=/var/run/ambari-server/bootstrap
recommendations.dir=/var/run/ambari-server/stack-recommendations



Changed Values: (some other directory other than "/var/run")

pid.dir=/var/ambari-server
bootstrap.dir=/var/ambari-server/bootstrap
recommendations.dir=/var/ambari-server/stack-recommendations



This may happen on CentOS7/RHEL7 because the "/var" is not mounted as tmpfs so "/var/ambari-server" shouldn't be deleted by the operating system after host reboot.

Now Please re-run the "ambari-server setup" command to make sure that ambari changes all the directory permissions to Non Root User as following: (please enter your non root user name when it asks)

# ambari-server setup 
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):ambari


**NOTE: ** Please do not make any other changes during the above setup command ... Only change the "Enter user account for ambari-server daemon (root): <YOUR NON ROOT USER>"

.

For more information please refer to :

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

avatar
Super Mentor

@Gordon Muster

Great!! Good to know that you found the permission issue. If this issue is resolved then it will be also great if you can mark this HCC thread as Answered by clicking on the "Accept" Button. That way other HCC users can quickly find the solution when they encounter the same issue.

avatar
New Contributor

It is a permission issue as you noted. Thanks for the help !!!

Labels