Created 12-19-2016 08:18 AM
I just setup Hortonworks Data Platform2.3.4 on Windows 2012 R2 server and was trying -ls command from Hadoop Command Line but it says "Permission denied: user=ritjain, access=READ_EXECUTE, inode="/user":hadoop:hdfs:drwx...". I understand about permission but not sure how to resolve the issue. Also When I started "Hadoop Name Node Status", browser does not show anything. Kindly suggest..
Created 12-21-2016 11:28 AM
Try following the below steps for windows machine. If helped, please vote/accept answer
1. Switch to a command prompt as the hadoop user For example:
>runas /user:hadoop cmd
2. Navigate to the the hadoop directory. For example:
>cd C:\hdp\hadoop-2.7.1.2.3.4.0-3485\bin
3. From the hadoop directory, create a ritjain user. For example:
>hadoop dfs -mkdir /user/ritjain
4. Change ownership to the ritjain user and add the user to hdfs group.
>hadoop dfs chown -R ritjain:hdfs /user/ritjain
Created 12-20-2016 06:10 PM
Please provide the exact command you executed.
Created 12-20-2016 06:14 PM
If looks like an output on 'hdfs dfs -ls ' which tries to get the user home directory (which points to /user/ritjain) in your case. This is missing here. Use hdfs user to create home directory for the user and change owner to 'ritjain'. Then if you execute it, you should be able to get there.
Regarding namenode status, post a screenshot of what you are looking at on browser. Error from command shows that NN seems to be running fine.
Created 12-21-2016 05:27 AM
Probably need to know how to change the user to hdfs user. I know how to do that in Linux as it is by using sudo command. But I am using Azure VM with Windows server 21012 R2.
Regarding namenode status, when I click on the shortcut which is on desktop (http://ritjainvmws2012:50070/), blank screen opens.
Created 12-28-2016 02:13 PM
blank NN issue has been poster at below link. Inputs would be appreciated -
Created 12-20-2016 06:16 PM
sudo -u hdfs hadoop fs -ls
Does this work for you?
If it works, then create a home directory for your user (in HDFS) and make sure that your user is member of hadoop or hdfs group.
***
If helped, please vote/accept answer.
For the second question, please create a new question and remove it from the current question. We are trying to build a body of knowledge easy to follow and avoid open-ended questions.
Created 12-21-2016 05:24 AM
No. sudo is not working. I am using Azure VM with Windows server 21012 R2. Installed HDP2.3 there.
C:\hdp\hadoop-2.7.1.2.3.4.0-3485>sudo -u hdfs hadoop fs -ls 'sudo' is not recognized as an internal or external command, operable program or batch file.
Created 12-21-2016 03:32 PM
Created 12-21-2016 11:28 AM
Try following the below steps for windows machine. If helped, please vote/accept answer
1. Switch to a command prompt as the hadoop user For example:
>runas /user:hadoop cmd
2. Navigate to the the hadoop directory. For example:
>cd C:\hdp\hadoop-2.7.1.2.3.4.0-3485\bin
3. From the hadoop directory, create a ritjain user. For example:
>hadoop dfs -mkdir /user/ritjain
4. Change ownership to the ritjain user and add the user to hdfs group.
>hadoop dfs chown -R ritjain:hdfs /user/ritjain
Created 12-21-2016 03:22 PM
Thanks. that really helped. I was not aware about switching user in windows. 🙂 I believe, -chown command, as you suggested, would add the user to hdfs group as well. correct?
On a side note - would appreciate if you have any inputs around debugging MR job in windows. I have already posted about the issue at below link -
Thanks in advance..