Created 10-10-2017 03:25 PM
Created 10-10-2017 03:57 PM
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
.
Created 10-10-2017 03:30 PM
I am using HDP-2.6.0.3 and ambari 2.5.1.0 on ubuntu 14.04
Created 10-10-2017 03:37 PM
- 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
.
Created 10-10-2017 03:54 PM
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)
Created 10-10-2017 03:57 PM
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
.
Created 10-10-2017 04:03 PM
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 :
Created 10-10-2017 04:14 PM
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.
Created 10-10-2017 04:11 PM
It is a permission issue as you noted. Thanks for the help !!!