<?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: HDP2.6 datanode failing to start with &amp;quot;cannot execute: Permission denied&amp;quot; error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227765#M67177</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/30153/winniephilip.html" nodeid="30153"&gt;@Winnie Philip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have not given the Execute permission to your "java" binary. Please check the permission on this.&lt;/P&gt;&lt;PRE&gt;# ls -lart  /home/winnie/apps/jdk1.8.0_144//bin/java&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please give it correct execute permission.&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;PRE&gt;# cd  /home/winnie/apps/jdk1.8.0_144//bin/java
# chmod 755 /home/winnie/apps/jdk1.8.0_144//bin/*&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;[root@sandbox bin]# pwd
/usr/jdk64/jdk1.8.0_112/bin

[root@sandbox bin]# ls -l java
-rwxr-xr-x 1 root root 7734 Sep 23  2016 java&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2017 20:29:48 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-08-24T20:29:48Z</dc:date>
    <item>
      <title>HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227764#M67176</link>
      <description>&lt;P&gt;I'm in the process of installing and starting a 3 node HDP2.6 cluster using Ambari UI.  Completed installation successfully, but services failed to start.  How do I fix this problem?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Datanode does not start, and gives below error on each node:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-08-23 12:00:49,443 - Mount point for directory /hadoop/hdfs/data is /&lt;BR /&gt;2017-08-23 12:00:49,443 - Mount point for directory /appl/hadoop/hdfs/data is /appl&lt;BR /&gt;2017-08-23 12:00:49,444 - Mount point for directory /usr/db/hadoop/hdfs/data is /usr/db&lt;BR /&gt;2017-08-23 12:00:49,444 - Mount point for directory /usr/local/opt/hadoop/hdfs/data is /usr/local/opt&lt;BR /&gt;2017-08-23 12:00:49,444 - File['/var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist'] {'content': ..., 'owner': 'hdfs', 'group': 'hadoop', 'mode': 0644}&lt;BR /&gt;2017-08-23 12:00:49,445 - Writing File['/var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist'] because it doesn't exist&lt;BR /&gt;2017-08-23 12:00:49,445 - Changing owner for /var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist from 0 to hdfs&lt;BR /&gt;2017-08-23 12:00:49,445 - Changing group for /var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist from 0 to hadoop&lt;BR /&gt;2017-08-23 12:00:49,447 - Directory['/var/run/hadoop'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 0755}&lt;BR /&gt;2017-08-23 12:00:49,447 - Changing owner for /var/run/hadoop from 0 to hdfs&lt;BR /&gt;2017-08-23 12:00:49,447 - Changing group for /var/run/hadoop from 0 to hadoop&lt;BR /&gt;2017-08-23 12:00:49,448 - Directory['/var/run/hadoop/hdfs'] {'owner': 'hdfs', 'group': 'hadoop', 'create_parents': True}&lt;BR /&gt;2017-08-23 12:00:49,448 - Creating directory Directory['/var/run/hadoop/hdfs'] since it doesn't exist.&lt;BR /&gt;2017-08-23 12:00:49,448 - Changing owner for /var/run/hadoop/hdfs from 0 to hdfs&lt;BR /&gt;2017-08-23 12:00:49,448 - Changing group for /var/run/hadoop/hdfs from 0 to hadoop&lt;BR /&gt;2017-08-23 12:00:49,448 - Directory['/var/log/hadoop/hdfs'] {'owner': 'hdfs', 'group': 'hadoop', 'create_parents': True}&lt;BR /&gt;2017-08-23 12:00:49,449 - Creating directory Directory['/var/log/hadoop/hdfs'] since it doesn't exist.&lt;BR /&gt;2017-08-23 12:00:49,449 - Changing owner for /var/log/hadoop/hdfs from 0 to hdfs&lt;BR /&gt;2017-08-23 12:00:49,449 - Changing group for /var/log/hadoop/hdfs from 0 to hadoop&lt;BR /&gt;2017-08-23 12:00:49,450 - File['/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid'] {'action': ['delete'], 'not_if': 'ambari-sudo.sh  -H -E test -f /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid &amp;amp;&amp;amp; ambari-sudo.sh  -H -E pgrep -F /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid'}&lt;BR /&gt;2017-08-23 12:00:49,456 - Execute['ambari-sudo.sh su hdfs -l -s /bin/bash -c 'ulimit -c unlimited ;  /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf start datanode''] {'environment': {'HADOOP_LIBEXEC_DIR': '/usr/hdp/current/hadoop-client/libexec'}, 'not_if': 'ambari-sudo.sh  -H -E test -f /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid &amp;amp;&amp;amp; ambari-sudo.sh  -H -E pgrep -F /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid'}&lt;BR /&gt;2017-08-23 12:00:53,609 - Execute['find /var/log/hadoop/hdfs -maxdepth 1 -type f -name '*' -exec echo '==&amp;gt; {} &amp;lt;==' \; -exec tail -n 40 {} \;'] {'logoutput': True, 'ignore_failures': True, 'user': 'hdfs'}&lt;BR /&gt;==&amp;gt; /var/log/hadoop/hdfs/hadoop-hdfs-datanode-vlmazgrpmaster.fisdev.local.out &amp;lt;==&lt;BR /&gt;/usr/hdp/2.6.1.0-129//hadoop-hdfs/bin/hdfs.distro: line 317: /home/e1009156/apps/jdk1.8.0_144//bin/java: Permission denied&lt;BR /&gt;&lt;STRONG&gt;/usr/hdp/2.6.1.0-129//hadoop-hdfs/bin/hdfs.distro: line 317: exec: /home/winnie/apps/jdk1.8.0_144//bin/java: cannot execute: Permission denied&lt;/STRONG&gt;&lt;BR /&gt;ulimit -a for user hdfs&lt;BR /&gt;core file size  (blocks, -c) 0&lt;BR /&gt;data seg size  (kbytes, -d) unlimited&lt;BR /&gt;scheduling priority  (-e) 0&lt;BR /&gt;file size  (blocks, -f) unlimited&lt;BR /&gt;pending signals  (-i) 64084&lt;BR /&gt;max locked memory  (kbytes, -l) 64&lt;BR /&gt;max memory size  (kbytes, -m) unlimited&lt;BR /&gt;open files  (-n) 128000&lt;BR /&gt;pipe size  (512 bytes, -p) 8&lt;BR /&gt;POSIX message queues  (bytes, -q) 819200&lt;BR /&gt;real-time priority  (-r) 0&lt;BR /&gt;stack size  (kbytes, -s) 8192&lt;BR /&gt;cpu time  (seconds, -t) unlimited&lt;BR /&gt;max user processes  (-u) 65536&lt;BR /&gt;virtual memory  (kbytes, -v) unlimited&lt;BR /&gt;file locks  (-x) unlimited&lt;/P&gt;&lt;P&gt;Command failed after 1 tries&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 19:49:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227764#M67176</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2017-08-24T19:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227765#M67177</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/30153/winniephilip.html" nodeid="30153"&gt;@Winnie Philip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have not given the Execute permission to your "java" binary. Please check the permission on this.&lt;/P&gt;&lt;PRE&gt;# ls -lart  /home/winnie/apps/jdk1.8.0_144//bin/java&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please give it correct execute permission.&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;PRE&gt;# cd  /home/winnie/apps/jdk1.8.0_144//bin/java
# chmod 755 /home/winnie/apps/jdk1.8.0_144//bin/*&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;[root@sandbox bin]# pwd
/usr/jdk64/jdk1.8.0_112/bin

[root@sandbox bin]# ls -l java
-rwxr-xr-x 1 root root 7734 Sep 23  2016 java&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 20:29:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227765#M67177</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-24T20:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227766#M67178</link>
      <description>&lt;P&gt;It looks like I have permissions:  The owner of the folder was different, I changed them all to root:root and restarted all servers as well. still getting same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@vlmazgrpdata2 ~]# ls -lart  /home/winnie/apps/jdk1.8.0_144//bin/java&lt;BR /&gt;-rwxr-xr-x 1 root root 7734 Jul 22 00:07 /home/winnie/apps/jdk1.8.0_144//bin/java&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;here are the additional info:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@vlmazgrpdata2 ~]# which java&lt;BR /&gt;/bin/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]# ls -l /bin/java&lt;BR /&gt;lrwxrwxrwx 1 root root 22 Aug 16 15:16 /bin/java -&amp;gt; /etc/alternatives/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]# ls -l /etc/alternatives/java&lt;BR /&gt;lrwxrwxrwx 1 root root 41 Aug 16 15:16 /etc/alternatives/java -&amp;gt; /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]# ls -l /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;-rwxr-xr-x 1 root root 7734 Jul 22 00:07 /home/e1009156/apps/jdk1.8.0_144/bin/java&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 21:42:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227766#M67178</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2017-08-24T21:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227767#M67179</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/30153/winniephilip.html" nodeid="30153"&gt;@Winnie Philip&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Line 317  of the script "/usr/hdp/2.6.0.3-8/hadoop-hdfs/bin/hdfs.distro" is following:&lt;/P&gt;&lt;PRE&gt;  exec "$JAVA" -Dproc_$COMMAND $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So if you have enough permission for "java"  then i suspect that &lt;STRONG&gt; "exec" &lt;/STRONG&gt;might not have enough permission to be executed.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Can you check if you are able to do the following:&lt;/P&gt;&lt;PRE&gt;# su - hdfs
#  /home/winnie/apps/jdk1.8.0_144//bin/java  -version
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;AND then try the following to see if it works? &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;/STRONG&gt;# su - hdfs
#  exec /home/winnie/apps/jdk1.8.0_144//bin/java  -version&lt;STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/30153/winniephilip.html" nodeid="30153"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 21:51:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227767#M67179</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-24T21:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227768#M67180</link>
      <description>&lt;P&gt;How do I check the permission for &lt;STRONG&gt;"exec"?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 22:08:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227768#M67180</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2017-08-24T22:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227769#M67181</link>
      <description>&lt;P&gt;Thank you, Jay!  That's exactly is the problem.  I can execute the java -version as root, but not as "hdfs".  I don't know how to fix it.  I issued 777 permission, still not worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@vlmazgrpdata2 ~]#  ls -l /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;-rwxr-xr-x 1 root root 7734 Jul 22 00:07 /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]# chmod 777 /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]#  ls -l /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;-rwxrwxrwx 1 root root 7734 Jul 22 00:07 /home/winnie/apps/jdk1.8.0_144/bin/java&lt;BR /&gt;[root@vlmazgrpdata2 ~]# su hdfs&lt;BR /&gt;[&lt;STRONG&gt;hdfs&lt;/STRONG&gt;@vlmazgrpdata2 root]$ /home/winnie/apps/jdk1.8.0_144//bin/java -version&lt;BR /&gt;bash: /home/winnie/apps/jdk1.8.0_&lt;STRONG&gt;144//bin/java: Permission denied&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 23:56:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227769#M67181</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2017-08-24T23:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227770#M67182</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/30153/winniephilip.html" nodeid="30153"&gt;@Winnie Philip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you try moving the "/home/winnie/apps/jdk1.8.0_144&lt;STRONG&gt;/"  &lt;/STRONG&gt; JDK to outside the /home/winnie directory adn then try again.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# mkdir -p /usr/jdk64
# mv /home/winnie/apps/jdk1.8.0_144  /usr/jdk64
# chmod -R 755 /usr/jdk64//jdk1.8.0_144&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Set the JAVA_HOME at the environment level or globally and also alternatives.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also i see there are two  //  slash between  "&lt;/STRONG&gt;jdk1.8.0_144//bin"  can you please fix that as well.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;/home/winnie/apps/jdk1.8.0_144//bin/java -version&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 00:04:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227770#M67182</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-25T00:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: HDP2.6 datanode failing to start with "cannot execute: Permission denied" error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227771#M67183</link>
      <description>&lt;P&gt;Thanks so much Jay!&lt;/P&gt;&lt;P&gt;My problem is fixed.  After fixing JAVA_HOME path, I stopped ambari-server and edited ambari-server.property file to reflect the new java_home path, and restarted. After that I was able to start datanode etc.  &lt;/P&gt;&lt;P&gt;Thanks again for helping me today!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 01:55:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP2-6-datanode-failing-to-start-with-quot-cannot-execute/m-p/227771#M67183</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2017-08-25T01:55:49Z</dc:date>
    </item>
  </channel>
</rss>

