<?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 Ambari Service Start not resolving $USER in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172575#M54319</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using HDP 2.5.0.0 on RHEL7. We had the cluster up and running for about 6 months now. We had to reboot the cluster couple of days back and noticed that the service status did not get correctly reflected on Ambari. If I do ps -ef  on the box, I see that the process is running. Upon digging further I find that the $USER variable in the scripts is not getting resolved. As a result the pid files are created in the wrong directory with incorrect name. e.g /var/run/hadoop-mapreduce/mapred--historyserver.pid instead of /var/run/hadoop-mapreduce/mapred/mapred-mapred-history-server.pid. Any pointers in troubleshooting this? TIA&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh su mapred -l -s /bin/bash -c 'ls /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid &amp;amp;&amp;amp; ps -p `cat /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid`'' returned 2. ls: cannot access /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid: No such file or directory&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Feb 2017 02:06:45 GMT</pubDate>
    <dc:creator>vijaysl</dc:creator>
    <dc:date>2017-02-14T02:06:45Z</dc:date>
    <item>
      <title>Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172575#M54319</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using HDP 2.5.0.0 on RHEL7. We had the cluster up and running for about 6 months now. We had to reboot the cluster couple of days back and noticed that the service status did not get correctly reflected on Ambari. If I do ps -ef  on the box, I see that the process is running. Upon digging further I find that the $USER variable in the scripts is not getting resolved. As a result the pid files are created in the wrong directory with incorrect name. e.g /var/run/hadoop-mapreduce/mapred--historyserver.pid instead of /var/run/hadoop-mapreduce/mapred/mapred-mapred-history-server.pid. Any pointers in troubleshooting this? TIA&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh su mapred -l -s /bin/bash -c 'ls /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid &amp;amp;&amp;amp; ps -p `cat /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid`'' returned 2. ls: cannot access /var/run/hadoop-mapreduce/mapred/mapred-mapred-historyserver.pid: No such file or directory&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2017 02:06:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172575#M54319</guid>
      <dc:creator>vijaysl</dc:creator>
      <dc:date>2017-02-14T02:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172576#M54320</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13476/vijaylakshman.html" nodeid="13476"&gt;@Vijay Lakshman&lt;/A&gt;, how did you restart the mapred history server after machine reboot ? Did you start it through ambari ?&lt;/P&gt;&lt;P&gt;Can you also check the value of HADOOP_MAPRED_PID_DIR var in hadoop-env.sh ? ideally it should be as below.&lt;/P&gt;&lt;PRE&gt;export HADOOP_MAPRED_PID_DIR=/var/run/hadoop-mapreduce/$USER&lt;/PRE&gt;&lt;P&gt;In order to fix this issue, stop the mapred-history server and make sure /var/run/hadoop-mapreduce/mapred--historyserver.pid  and /var/run/hadoop-mapreduce/mapred/mapred-mapred-history-server.pid is deleted. Then start mapred history server through ambari. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 08:14:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172576#M54320</guid>
      <dc:creator>yvora</dc:creator>
      <dc:date>2017-02-14T08:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172577#M54321</link>
      <description>&lt;P&gt;Thanks. I am starting all the services by clicking on Start All in Ambari. I am facing the same issue with all the services.&lt;/P&gt;&lt;P&gt;Yes, the environment variable is using the default and not overriden.&lt;/P&gt;&lt;P&gt;e.g for timeline server&lt;/P&gt;&lt;P&gt;drwxr-xr-x 2 yarn hadoop 40 Feb 13 18:45 yarn &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 yarn hadoop  6 Feb 13 18:48 yarn--resourcemanager.pid &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 yarn hadoop  5 Feb 13 18:47 yarn--timelineserver.pid &lt;/P&gt;&lt;P&gt;$ ls yarn &lt;/P&gt;&lt;P&gt;$ &lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 08:25:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172577#M54321</guid>
      <dc:creator>vijaysl</dc:creator>
      <dc:date>2017-02-14T08:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172578#M54322</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13476/vijaylakshman.html" nodeid="13476"&gt;@Vijay Lakshman&lt;/A&gt;, looks like the USER env variable got missing from the machines. Can you please check on your hosts whether $USER is set for all the users ( such as hdfs, yarn, mapred etc ). You can also use "printenv" to print all env var.&lt;/P&gt;&lt;PRE&gt;[root@xxx]# sudo su hdfs

 bash-4.2$ echo $USER

 hdfs&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2017 08:41:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172578#M54322</guid>
      <dc:creator>yvora</dc:creator>
      <dc:date>2017-02-15T08:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172579#M54323</link>
      <description>&lt;P&gt;Thanks that's helpful. We upgraded to RHEL7.3. Looks like this is not supported by HDP 2.5.3 yet. &lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 00:34:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172579#M54323</guid>
      <dc:creator>vijaysl</dc:creator>
      <dc:date>2017-02-16T00:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172580#M54324</link>
      <description>&lt;P&gt;Glad to know I was able to help.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 05:00:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172580#M54324</guid>
      <dc:creator>yvora</dc:creator>
      <dc:date>2017-02-16T05:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Service Start not resolving $USER</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172581#M54325</link>
      <description>&lt;P&gt;It helped us troubleshoot the issue but we could not figure out why this is happening. We went back to reinstalling a new cluster on RHEL 7.2 and that is working fine. We still need to figure why RHEL 7.3 is causing this issue. Will post an update if we ever figure out.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 02:31:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Service-Start-not-resolving-USER/m-p/172581#M54325</guid>
      <dc:creator>vijaysl</dc:creator>
      <dc:date>2017-02-17T02:31:39Z</dc:date>
    </item>
  </channel>
</rss>

