<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: missing folders under /var/run/ambari-server in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224513#M186377</link>
    <description>&lt;P&gt;@Jay , ok but do you have any API suggestion to perform some refresh or reload in order to create the folder , because  we are working on production clusters and we not want to change something that not necessary &lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 12:52:07 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2018-03-13T12:52:07Z</dc:date>
    <item>
      <title>missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224504#M186368</link>
      <description>&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;we have very strange problem &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;we installed new ambari cluster &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;but we notice that the folders - &lt;STRONG&gt;stack-recommendations &lt;/STRONG&gt;and&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;bootstrap&lt;/STRONG&gt;  on ambari server machine , are missing &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;stack-recommendations and bootstrap folders must be under /var/run/ambari-server&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;STRONG&gt;what could be the problem ?&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;cd /var/run/ambari-server/
[root@master02 ambari-server]# \ls -ltr
total 4
-rw-r--r-- 1 root root  6 Feb 25 10:32 ambari-server.pid&lt;/PRE&gt;
&lt;PRE&gt;from ambari-server log


WARN [ambari-client-thread-217] StackAdvisorCommand:304 - Error occured during stack advisor command invocation:
java.io.IOException: Cannot create /var/run/ambari-server/stack-recommendations
        at org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand.createRequestDirectory(StackAdvisorCommand.java:322)
        at org.apache.ambari.server.api.services.stackadvisor.commands.StackAdvisorCommand.invoke(StackAdvisorCommand.java:289)
        at org.apache.ambari.server.api.services.stackadvisor.StackAdvisorHelper.recommend(StackAdvisorHelper.java:113)
        at org.apache.ambari.server.controller.internal.RecommendationResourceProvider.createResources(RecommendationResourceProvider.java:92)
        at org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:298)
        at org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:97)
        at org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:37)
        at org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:73)
        at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:144)
        at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:126)
        at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:90)
        at org.apache.ambari.server.api.services.RecommendationService.getRecommendation(RecommendationService.java:59)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Feb 2018 19:00:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224504#M186368</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-02-25T19:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224505#M186369</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;With which user did you install your Ambari-Server during the &lt;STRONG&gt;ambari-server setup&lt;/STRONG&gt; ? Default is &lt;STRONG&gt;root&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;It looks like permission issue to me.&lt;/P&gt;&lt;P&gt;If you don't remember the user, check Ambari-Server logs on &lt;STRONG&gt;/var/log/ambari-server/ambari-server.log&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When you found it, run &lt;B&gt;chown -R &amp;lt;AMBARI-USER&amp;gt; /var/run/ambari-server&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Tell us if it works better after.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 17:09:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224505#M186369</guid>
      <dc:creator>thomas_chaniac</dc:creator>
      <dc:date>2018-02-26T17:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224506#M186370</link>
      <description>&lt;P&gt;yes , but only change the owner back to ambari is a partial solution  , because we have the missing folder - &lt;STRONG&gt;stack-recommendations &lt;/STRONG&gt;and &lt;STRONG&gt;bootstrap , &lt;/STRONG&gt;so need to find the complete solution how to recreate this folders &lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 17:45:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224506#M186370</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-02-26T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224507#M186371</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When we try to run ambari-server as a Non Root user then it is required that this user should have Read &amp;amp; Write access to the following directories.&lt;/P&gt;&lt;PRE&gt;pid.dir=/var/run/ambari-server
bootstrap.dir=/var/run/ambari-server/bootstrap
recommendations.dir=/var/run/ambari-server/stack-recommendations&lt;/PRE&gt;&lt;P&gt;.&lt;BR /&gt;Above 3 directories default values can be found inside the "/etc/ambari-server/conf/ambari.properties"&lt;BR /&gt;&lt;BR /&gt;All the permission changes are done when we run the "ambari-server setup" command which runs as root.&lt;BR /&gt;When we run "ambari-server setup" then ambari will create the directories with the correct permissions&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 17:58:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224507#M186371</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-26T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224508#M186372</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In some cases, we might see that once we reboot the ambari server host then this directory is getting created again with "root:root" permissions.&lt;BR /&gt;&lt;BR /&gt;This can happen, if by any chance if the "pid.dir" or "recommendations.dir" is mounted on "tmpfs" then rebooting the host might alter the permissions back to 'root:root' and hence the non root ambari user will again not be able to write to these directories.&lt;BR /&gt;&lt;BR /&gt;Please NOTE that if you face such issue of getting the permission changed for these directories then please change the values "pid.dir", "bootstrap.dir"  and "recommendations.dir" insife ambari.properties file to point to a directory which is not on tmpfs. Like "/var/ambari-server" shouldn't be deleted by the operating system after host reboot.  So in such scenarios moving the directories under non tmpfs and re-running ambari-server setup is the best option.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:22:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224508#M186372</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-26T18:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224509#M186373</link>
      <description>&lt;PRE&gt;&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;@Jay thank you so much for the solution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;just one question -  can we be sure that set the folders to be under &lt;STRONG&gt;/var &lt;/STRONG&gt;and not under&lt;STRONG&gt; /var/run&lt;/STRONG&gt; , not &lt;/EM&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;
&lt;DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Damage to ambari cluster functionality ?&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;first I will change the code in the ambari Kit in order to
update ambari.properties file per your great recommendation&lt;/P&gt;&lt;P&gt;so bootstrap.dir , pid.dir , recommendations.dir will be
under /var and not under /var/run  (this
is for scratch installation)&lt;/P&gt;&lt;PRE&gt;# grep run /etc/ambari-server/conf/ambari.properties

bootstrap.dir=/var/ambari-server/bootstrap
pid.dir=/var/ambari-server
recommendations.dir=/var/ambari-server/stack-recommendations&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;in order to fix the current ambari cluster we will change&lt;STRONG&gt;
ambari.properties&lt;/STRONG&gt; the same as below ( scratch installation ) , and we will run
ambari setup to recreate the missing folders&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;please just approve my steps &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 18:53:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224509#M186373</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-02-26T18:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224510#M186374</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, your steps looks correct:&lt;/P&gt;&lt;P&gt;0. Stop ambari-server&lt;/P&gt;&lt;PRE&gt;# ambari-server stop&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;1. Change the PATH for those 3 properties mentioned in the &lt;EM&gt;&lt;STRONG&gt;ambari.properties&lt;/STRONG&gt;&lt;/EM&gt; file.&lt;/P&gt;&lt;PRE&gt;pid.dir=/var/ambari-server
bootstrap.dir=/var/ambari-server/bootstrap
recommendations.dir=/var/ambari-server/stack-recommendations&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;2. Run the "ambari-server setup" and during the ambari-server setup process, when prompted to &lt;EM&gt;&lt;STRONG&gt;Customize user account for ambari-server daemon?,&lt;/STRONG&gt;&lt;/EM&gt; choose y&lt;BR /&gt;  (Please do not change any other properties)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;Just to avoid any mistakes it is always better to take ambari DB dump (just to make sure that by mistake we do not make any other db changes)&lt;/P&gt;&lt;P&gt;3. Then restart ambari-server.&lt;/P&gt;&lt;PRE&gt;# ambari-server start&lt;/PRE&gt;&lt;P&gt;.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:00:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224510#M186374</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-26T19:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224511#M186375</link>
      <description>&lt;P&gt;@Dear Jay&lt;/P&gt;&lt;P&gt;We performed the following "procedure" per you recommendation &lt;/P&gt;&lt;P&gt;Seems that procedure completed successfully but still &lt;STRONG&gt;stack-recommendations &lt;/STRONG&gt;folder not created under  &lt;STRONG&gt;/var/ambari-server &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;where we are wrong?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;we change the following in ambari.properties before the procedure :&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;pid.dir=/var/run/ambari-server&lt;/LI&gt;&lt;LI&gt;bootstrap.dir=/var/run/ambari-server/bootstrap&lt;/LI&gt;&lt;LI&gt;recommendations.dir=/var/run/ambari-server/stack-recommendations&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;The procedure&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt; - you mentioned that - "when prompted to &lt;STRONG&gt;Customize user account for ambari-server daemon?,&lt;/STRONG&gt; choose y"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;but this question not appears during the process&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;br&amp;gt;[root@master02 ~]# ambari-server stop
Using python  /usr/bin/python
Stopping ambari-server
Waiting for server stop...
Ambari Server stopped


[root@master02 ~]# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Ambari-server daemon is configured to run under user 'ambari'. Change this setting [y/n] (n)?
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)?
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)?
Configuring database...
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Configuring local database...
Configuring PostgreSQL...
Backup for pg_hba found, reconfiguration not required
Creating schema and user...
done.
Creating tables...
done.
Extracting system views...
............
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.


[root@master02 ~]# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.
[root@master02 ~]# ls -ltr /var/ambari-server/bootstrap/
total 0


[root@master02 ~]# ls -ltr /var/ambari-server/
total 4

drwxr-xr-x 2 ambari root 6 Mar 12 14:10 bootstrap
-rw-r--r-- 1 root   root 6 Mar 12 14:10 ambari-server.pid


[root@master02 ~]# find /var -name  stack-recommendations
[root@master02 ~]#&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 21:21:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224511#M186375</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-12T21:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224512#M186376</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Please try making any small config change from ambari UI and then see that the dir "stack-recommendations" created or not?  If there is nothing to recommend then you won't see the dir created.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 05:52:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224512#M186376</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-13T05:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224513#M186377</link>
      <description>&lt;P&gt;@Jay , ok but do you have any API suggestion to perform some refresh or reload in order to create the folder , because  we are working on production clusters and we not want to change something that not necessary &lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:52:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224513#M186377</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-13T12:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224514#M186378</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/174301/missing-folders-under-varrunambari-server.html?childToView=176526#"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;we do not need to worry about this  "stack-recommendations" directory it should be created as soon as we make any configuration changes to ambari UI and when ambari has some recommendations for us.&lt;/P&gt;&lt;P&gt;But if you want to test before hand then you might want to refer to the following HCC thread which suggexst how you can run some stack advisory scripts on your own. (i have not tested them manually on my own)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/141855/stack-advisor-how-to-use-it.html" target="_blank"&gt;https://community.hortonworks.com/questions/141855/stack-advisor-how-to-use-it.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 13:48:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224514#M186378</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-13T13:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224515#M186379</link>
      <description>&lt;P&gt;@Jay indeed when I change some value from ambari then I saw the folder - /var//ambari-server/stack-recommendations   , but after that we need to return the value back as was , but this approach require us the following steps ( from script )&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;1. change some value from ambari GUI ( by API )&lt;BR /&gt;2 because change we need to restart relevant services ( by API )&lt;BR /&gt;3 change back the value as was before ( by API )&lt;BR /&gt;4 second restart services to complete ( by API )&lt;/PRE&gt;&lt;P&gt;as you see from steps 1-4 all this are needed only to create the stack-recommendations folder&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want to share with you the all picture&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"we complete to create auto tool that perform ambari upgrade&lt;/P&gt;&lt;P&gt;during the ambari upgrade auto process it create ambari dump (pg_dump -U ambari -f /var/tmp/dbdumps/ambari.sql)&lt;/P&gt;&lt;P&gt;but this dump required&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;stack-recommendations&lt;/STRONG&gt; folder&lt;/P&gt;&lt;P&gt;so in case stack-recommendations isnt under /var/run then the script will update the ambari properties and re-run the ambari setup in order to prepare the folder under /var/ambari-server , and then script need to run API to change value in order to create the stack-recommendations folder and do restart ......."&lt;/P&gt;&lt;P&gt;so this approach required too many steps in order to bring the folder live &lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:21:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224515#M186379</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-13T15:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224516#M186380</link>
      <description>&lt;P&gt;@Jay regarding to my previeos comment , do you have other simple solution ( instead steps 1-4) ?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 17:34:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224516#M186380</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-13T17:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224517#M186381</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What i wanted to say is that if we have setup the "pid.dir" , 
"bootstrap.dir" , "recommendations.dir" outside the "tmpfs" mount and 
the non root ambari user has proper read/write permission to these 
directories then we do not need to worry about these directoies anymore.
 Whenever we make any changes to these directories only once we will 
need to run the "ambari-server setup" command just to ensure that ambari
 creates some of these directories (not necesarily all immediately) like
 "recommendations.dir" ambari might create later as well.&lt;BR /&gt;&lt;BR /&gt;Ambari will create those directories on it's own.  We do not need to run "ambari-serevr setup" command many times.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 04:58:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224517#M186381</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-14T04:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224518#M186382</link>
      <description>&lt;P&gt;Dear Jay thank you so much for all explains , &lt;/P&gt;&lt;P&gt;just one last idea that I was thinking about this, in order to enable the ambari-server backup &lt;/P&gt;&lt;P&gt;please tell me please you opinion?&lt;/P&gt;&lt;P&gt;as you see here when we backup the ambari we get error because the missing folders&lt;/P&gt;&lt;PRE&gt;/usr/sbin/ambari-server backup
Using python  /usr/bin/python
Backing up Ambari File System state... *this will not backup the server database*
Backup requested.
No path specified. Will use /var/lib/ambari-server/Ambari_State_Backup.zip
Backup process initiated.
Error while validating folders. Folder /var/run/ambari-server/bootstrap/ does not exist.&lt;/PRE&gt;&lt;P&gt;so as workaround I create empty folders as:&lt;/P&gt;&lt;PRE&gt;mkdir /var/run/ambari-server/stack-recommendations&lt;BR /&gt;mkdir /var/run/ambari-server/bootstrap/&lt;/PRE&gt;&lt;P&gt;now we run again the ambari-server backup , and backup succeeded &lt;/P&gt;&lt;PRE&gt; /usr/sbin/ambari-server backup
Using python  /usr/bin/python
Backing up Ambari File System state... *this will not backup the server database*
Backup requested.
No path specified. Will use /var/lib/ambari-server/Ambari_State_Backup.zip
Backup process initiated.
Creating zip file...
Zip file created at /var/lib/ambari-server/Ambari_State_Backup.zip
Backup complete.
Ambari Server 'backup' completed successfully.&lt;/PRE&gt;&lt;P&gt;Jay what you think about this approach ?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 13:36:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224518#M186382</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-14T13:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224519#M186383</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, that is correct that the "ambar-server backup" utility will check if the "stack-recommendation" directory exists or not?  &lt;/P&gt;&lt;P&gt;If this directory does not exist then we will need to manually create that directory so that it passes the check. That is a workaround. &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/python/ambari_server/BackupRestore.py#L131-L139" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/python/ambari_server/BackupRestore.py#L131-L139&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the following 4 directories it checks:&lt;/P&gt;&lt;PRE&gt;# The list of files where the ambari server state is kept on the filesystem
AMBARI_FILESYSTEM_STATE = [AmbariPath.get("/etc/ambari-server/conf"),
                           AmbariPath.get("/var/lib/ambari-server/resources"),
                           AmbariPath.get("/var/run/ambari-server/bootstrap/"),
                           AmbariPath.get("/var/run/ambari-server/stack-recommendations")]&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;In normal cases when the cluster is running for quite some time and some configuration changes have been made to the cluster then definitely we will see some contents inside this directory. even when the ambari is running as non root user.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:03:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224519#M186383</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-14T14:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224520#M186384</link>
      <description>&lt;P&gt;ok Jay , so I will do the workaround in order to enable the ambari-server backup ( create empty folders - stack-recommendations , bootstrap)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:17:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224520#M186384</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-14T14:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224521#M186385</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Yes, if ambari does not create them and we want to run the backup command then we can create the directories manually. It should be Ok.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:23:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224521#M186385</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-14T14:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224522#M186386</link>
      <description>&lt;P&gt;@Jay  again thasnk you so much yours remarks are very useful to us , and your knowledge is empresive &lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:35:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224522#M186386</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-03-14T14:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: missing folders under /var/run/ambari-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224523#M186387</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for appreciation and i apologies for making this thread a bit confusing in few of my previous update &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:37:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/missing-folders-under-var-run-ambari-server/m-p/224523#M186387</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-14T14:37:45Z</dc:date>
    </item>
  </channel>
</rss>

