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

不问归期 提交于 2019-12-21 12:32:00

问题


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://container@storagename.core.windows.net/inputdir wasb://container@storagename.core.windows.net/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.


回答1:


EDIT: Your storage location should be wasb://container@storageacctname.blob.core.windows.net/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!




回答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://data2@dsparqstorage.core.windows.net/



来源:https://stackoverflow.com/questions/33601065/azureexception-unable-to-access-container-using-anonymous-credentials-and-no-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!