AzureException: Unable to access container using anonymous credentials, and no credentials found for them in the configuration
Asked Answered
S

4

11

I am trying to use Hadoop of Azure HDInsight. I am logging into the cluster by ssh and running the following

hadoop jar jar_name class_name wasb://[email protected]/inputdir wasb://[email protected]/outputdir 

But I get the following exception:

Exception in thread "main" org.apache.hadoop.fs.azure.AzureException: org.apache.hadoop.fs.azure.AzureException: Unable to access container xxx in account yyy.core.windows.net using anonymous credentials, and no credentials found for them in the configuration.

I am using azure cli and I ran "azure login" before running the above mentioned hadoop job.

Please let me know how I can fix this error.

Ubuntu 12.04 runs on these machines.

PS: posted this on Azure forums as well, but reposting it here to get broader audience.

Sham answered 9/11, 2015 at 1:15 Comment(0)
D
12

EDIT: Your storage location should be wasb://[email protected]/inputdir

It sounds like your cluster is not attached to that storage account. Recreate your cluster and make sure that the account that holds the jar is attached to the cluster. Otherwise, move your jar to a storage account that is connected!

Diplococcus answered 10/11, 2015 at 22:28 Comment(4)
I am using the same storage but a different container from the one I specified during cluster creation time. I also created a public container within the same storage. I am unable to access this container as well using a command such as hdfs dfs -ls wasb://[email protected] where data2 is a public container.Sham
Try hdfs dfs -ls wasb://[email protected]Diplococcus
Sorry* hdfs dfs -ls wasb://[email protected]/inputdir You should always have your files in an input directory.Diplococcus
Problem is with the missing trailing '/'. There should be a / at the end.Sham
L
4

The correct format to use Azure Blob storage is

wasbs://<container>@<storage-account-name>.blob.core.windows.net/<directory>/

Always make sure to end your wasbs with /

Litchfield answered 6/1, 2021 at 18:21 Comment(0)
S
2

This problem has been resolved and I am putting up the answer here in case someone faces the same issue.

I made couple of silly mistakes.

1) It should be wasb://@.blob.core.windows.net. I missed 'blob' earlier. 2) There should be a trailing '/'. So it should be hdfs dfs -ls wasb://[email protected]/

Sham answered 12/11, 2015 at 21:7 Comment(1)
and you missed blob again in the last linkMethacrylate
H
0

I faced this error.

I used to write

wasb://directory/

instead of

wasb://[email protected]/directory/
Heedful answered 26/3, 2020 at 18:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.