Support Questions

Find answers, ask questions, and share your expertise

Read/Write on HDP data platform on Windows 21012 R2

avatar
Contributor

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..

1 ACCEPTED SOLUTION

avatar
Contributor
@Ritesh jain

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

View solution in original post

11 REPLIES 11

avatar
Super Guru

@Ritesh jain

Please provide the exact command you executed.

avatar
Guru

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.

avatar
Contributor

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.

avatar
Contributor

blank NN issue has been poster at below link. Inputs would be appreciated -

https://community.hortonworks.com/questions/73366/blank-name-node-status-in-hdp-on-windows-2012-r2.h...

avatar
Super Guru

@Ritesh jain

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.

avatar
Contributor

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.

avatar
Contributor

avatar
Contributor
@Ritesh jain

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

avatar
Contributor

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 -

https://community.hortonworks.com/questions/72672/unable-to-connect-to-the-remote-server-while-conne...

Thanks in advance..