Databricks fails accessing a Data Lake Gen1 while trying to enumerate a directory Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Azure Data Lake Store: Request Was Unauthorized When Writing to ADLS from Data Factory in a Different SubscriptionHow to connect ADLS account with Azure VMTest environment for microsoft graph api and Azure v2.0Does Cortana Skill support login with Azure AD B2C account?ADAL V3, Azure Data Lake, Certificates and ServiceClientCredentialsAzure AD Application - Manifest settings caching. Can I refresh this cache?Azure AD OAuth2.0: I dont get a refresh tokenGetting SSL error while running experiment on azure databricksPolybase to Azure Data Lake Gen 2 FailingAccess unmanaged (external) Azure Databricks Hive table via JDBC

How to evaluate this function?

The test team as an enemy of development? And how can this be avoided?

Is a copyright notice with a non-existent name be invalid?

How to make an animal which can only breed for a certain number of generations?

Why do C and C++ allow the expression (int) + 4?

By what mechanism was the 2017 UK General Election called?

Is the time—manner—place ordering of adverbials an oversimplification?

Is there a spell that can create a permanent fire?

What are some likely causes to domain member PC losing contact to domain controller?

"Destructive power" carried by a B-52?

How to achieve cat-like agility?

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

Order between one to one functions and their inverses

latest version of QGIS fails to edit attribute table of GeoJSON file

Why BitLocker does not use RSA

Any stored/leased 737s that could substitute for grounded MAXs?

What did Turing mean when saying that "machines cannot give rise to surprises" is due to a fallacy?

Noise in Eigenvalues plot

How does TikZ render an arc?

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

How to make triangles with rounded sides and corners? (squircle with 3 sides)

Is there a verb for listening stealthily?

Flight departed from the gate 5 min before scheduled departure time. Refund options

When does a function NOT have an antiderivative?



Databricks fails accessing a Data Lake Gen1 while trying to enumerate a directory



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Azure Data Lake Store: Request Was Unauthorized When Writing to ADLS from Data Factory in a Different SubscriptionHow to connect ADLS account with Azure VMTest environment for microsoft graph api and Azure v2.0Does Cortana Skill support login with Azure AD B2C account?ADAL V3, Azure Data Lake, Certificates and ServiceClientCredentialsAzure AD Application - Manifest settings caching. Can I refresh this cache?Azure AD OAuth2.0: I dont get a refresh tokenGetting SSL error while running experiment on azure databricksPolybase to Azure Data Lake Gen 2 FailingAccess unmanaged (external) Azure Databricks Hive table via JDBC



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am using (well... trying to use) Azure Databricks and I have created a notebook.



I would like the notebook to connect my Azure Data Lake (Gen1) and transform the data. I followed the documentation and put the code in the first cell of my notebook:



spark.conf.set("dfs.adls.oauth2.access.token.provider.type", "ClientCredential")
spark.conf.set("dfs.adls.oauth2.client.id", "**using the application ID of the registered application**")
spark.conf.set("dfs.adls.oauth2.credential", "**using one of the registered application keys**")
spark.conf.set("dfs.adls.oauth2.refresh.url", "https://login.microsoftonline.com/**using my-tenant-id**/oauth2/token")

dbutils.fs.ls("adl://**using my data lake uri**.azuredatalakestore.net/tenantdata/events")


The execution fails with this error:




com.microsoft.azure.datalake.store.ADLException: Error enumerating
directory /



Operation null failed with exception java.io.IOException : Server
returned HTTP response code: 400 for URL:
https://login.microsoftonline.com/using my-tenant-id/oauth2/token
Last encountered exception thrown after 5 tries.



[java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException]
[ServerRequestId:null] at
com.microsoft.azure.datalake.store.ADLStoreClient.getExceptionFromResponse(ADLStoreClient.java:1169)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectoryInternal(ADLStoreClient.java:558)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:534)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:398)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:384)




I have given the registered application the Reader role to the Data Lake:



enter image description here



Question



How can I allow Spark to access the Data Lake?



Update



I have granted both the tenantdata and events folders Read and Execute access:



Granted persmissions on folder










share|improve this question
























  • Maybe try setting the application to the Contributor role instead of Reader.

    – Jon
    Mar 24 at 14:18

















0















I am using (well... trying to use) Azure Databricks and I have created a notebook.



I would like the notebook to connect my Azure Data Lake (Gen1) and transform the data. I followed the documentation and put the code in the first cell of my notebook:



spark.conf.set("dfs.adls.oauth2.access.token.provider.type", "ClientCredential")
spark.conf.set("dfs.adls.oauth2.client.id", "**using the application ID of the registered application**")
spark.conf.set("dfs.adls.oauth2.credential", "**using one of the registered application keys**")
spark.conf.set("dfs.adls.oauth2.refresh.url", "https://login.microsoftonline.com/**using my-tenant-id**/oauth2/token")

dbutils.fs.ls("adl://**using my data lake uri**.azuredatalakestore.net/tenantdata/events")


The execution fails with this error:




com.microsoft.azure.datalake.store.ADLException: Error enumerating
directory /



Operation null failed with exception java.io.IOException : Server
returned HTTP response code: 400 for URL:
https://login.microsoftonline.com/using my-tenant-id/oauth2/token
Last encountered exception thrown after 5 tries.



[java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException]
[ServerRequestId:null] at
com.microsoft.azure.datalake.store.ADLStoreClient.getExceptionFromResponse(ADLStoreClient.java:1169)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectoryInternal(ADLStoreClient.java:558)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:534)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:398)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:384)




I have given the registered application the Reader role to the Data Lake:



enter image description here



Question



How can I allow Spark to access the Data Lake?



Update



I have granted both the tenantdata and events folders Read and Execute access:



Granted persmissions on folder










share|improve this question
























  • Maybe try setting the application to the Contributor role instead of Reader.

    – Jon
    Mar 24 at 14:18













0












0








0








I am using (well... trying to use) Azure Databricks and I have created a notebook.



I would like the notebook to connect my Azure Data Lake (Gen1) and transform the data. I followed the documentation and put the code in the first cell of my notebook:



spark.conf.set("dfs.adls.oauth2.access.token.provider.type", "ClientCredential")
spark.conf.set("dfs.adls.oauth2.client.id", "**using the application ID of the registered application**")
spark.conf.set("dfs.adls.oauth2.credential", "**using one of the registered application keys**")
spark.conf.set("dfs.adls.oauth2.refresh.url", "https://login.microsoftonline.com/**using my-tenant-id**/oauth2/token")

dbutils.fs.ls("adl://**using my data lake uri**.azuredatalakestore.net/tenantdata/events")


The execution fails with this error:




com.microsoft.azure.datalake.store.ADLException: Error enumerating
directory /



Operation null failed with exception java.io.IOException : Server
returned HTTP response code: 400 for URL:
https://login.microsoftonline.com/using my-tenant-id/oauth2/token
Last encountered exception thrown after 5 tries.



[java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException]
[ServerRequestId:null] at
com.microsoft.azure.datalake.store.ADLStoreClient.getExceptionFromResponse(ADLStoreClient.java:1169)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectoryInternal(ADLStoreClient.java:558)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:534)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:398)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:384)




I have given the registered application the Reader role to the Data Lake:



enter image description here



Question



How can I allow Spark to access the Data Lake?



Update



I have granted both the tenantdata and events folders Read and Execute access:



Granted persmissions on folder










share|improve this question
















I am using (well... trying to use) Azure Databricks and I have created a notebook.



I would like the notebook to connect my Azure Data Lake (Gen1) and transform the data. I followed the documentation and put the code in the first cell of my notebook:



spark.conf.set("dfs.adls.oauth2.access.token.provider.type", "ClientCredential")
spark.conf.set("dfs.adls.oauth2.client.id", "**using the application ID of the registered application**")
spark.conf.set("dfs.adls.oauth2.credential", "**using one of the registered application keys**")
spark.conf.set("dfs.adls.oauth2.refresh.url", "https://login.microsoftonline.com/**using my-tenant-id**/oauth2/token")

dbutils.fs.ls("adl://**using my data lake uri**.azuredatalakestore.net/tenantdata/events")


The execution fails with this error:




com.microsoft.azure.datalake.store.ADLException: Error enumerating
directory /



Operation null failed with exception java.io.IOException : Server
returned HTTP response code: 400 for URL:
https://login.microsoftonline.com/using my-tenant-id/oauth2/token
Last encountered exception thrown after 5 tries.



[java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException,java.io.IOException]
[ServerRequestId:null] at
com.microsoft.azure.datalake.store.ADLStoreClient.getExceptionFromResponse(ADLStoreClient.java:1169)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectoryInternal(ADLStoreClient.java:558)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:534)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:398)
at
com.microsoft.azure.datalake.store.ADLStoreClient.enumerateDirectory(ADLStoreClient.java:384)




I have given the registered application the Reader role to the Data Lake:



enter image description here



Question



How can I allow Spark to access the Data Lake?



Update



I have granted both the tenantdata and events folders Read and Execute access:



Granted persmissions on folder







scala azure apache-spark azure-data-lake azure-databricks






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 1 at 12:01







Kzrystof

















asked Mar 22 at 12:52









KzrystofKzrystof

2,26831628




2,26831628












  • Maybe try setting the application to the Contributor role instead of Reader.

    – Jon
    Mar 24 at 14:18

















  • Maybe try setting the application to the Contributor role instead of Reader.

    – Jon
    Mar 24 at 14:18
















Maybe try setting the application to the Contributor role instead of Reader.

– Jon
Mar 24 at 14:18





Maybe try setting the application to the Contributor role instead of Reader.

– Jon
Mar 24 at 14:18












1 Answer
1






active

oldest

votes


















1














The RBAC roles on the Gen1 lake do not grant access to the data (just the resource itself), with exception of the Owner role which grants Super User access and does grant full data access.



You must grant access to the folders/files themselves using Data Explorer in the Portal or download storage explorer using POSIX permissions.



This guide explains the detail of how to do that: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-access-control



Reference: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-secure-data




Only the Owner role automatically enables file system access. The
Contributor, Reader, and all other roles require ACLs to enable any
level of access to folders and files







share|improve this answer























  • Sorry for the delayed response. I did have the permissions on both folders... :(

    – Kzrystof
    Apr 1 at 12:01











  • You must have at least Execute permission on every folder above the folder you are trying to access (including root).

    – simon_dmorias
    Apr 3 at 12:19











  • The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

    – Kzrystof
    Apr 3 at 12:41







  • 1





    As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

    – simon_dmorias
    Apr 3 at 13:10











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55300048%2fdatabricks-fails-accessing-a-data-lake-gen1-while-trying-to-enumerate-a-director%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The RBAC roles on the Gen1 lake do not grant access to the data (just the resource itself), with exception of the Owner role which grants Super User access and does grant full data access.



You must grant access to the folders/files themselves using Data Explorer in the Portal or download storage explorer using POSIX permissions.



This guide explains the detail of how to do that: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-access-control



Reference: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-secure-data




Only the Owner role automatically enables file system access. The
Contributor, Reader, and all other roles require ACLs to enable any
level of access to folders and files







share|improve this answer























  • Sorry for the delayed response. I did have the permissions on both folders... :(

    – Kzrystof
    Apr 1 at 12:01











  • You must have at least Execute permission on every folder above the folder you are trying to access (including root).

    – simon_dmorias
    Apr 3 at 12:19











  • The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

    – Kzrystof
    Apr 3 at 12:41







  • 1





    As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

    – simon_dmorias
    Apr 3 at 13:10















1














The RBAC roles on the Gen1 lake do not grant access to the data (just the resource itself), with exception of the Owner role which grants Super User access and does grant full data access.



You must grant access to the folders/files themselves using Data Explorer in the Portal or download storage explorer using POSIX permissions.



This guide explains the detail of how to do that: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-access-control



Reference: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-secure-data




Only the Owner role automatically enables file system access. The
Contributor, Reader, and all other roles require ACLs to enable any
level of access to folders and files







share|improve this answer























  • Sorry for the delayed response. I did have the permissions on both folders... :(

    – Kzrystof
    Apr 1 at 12:01











  • You must have at least Execute permission on every folder above the folder you are trying to access (including root).

    – simon_dmorias
    Apr 3 at 12:19











  • The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

    – Kzrystof
    Apr 3 at 12:41







  • 1





    As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

    – simon_dmorias
    Apr 3 at 13:10













1












1








1







The RBAC roles on the Gen1 lake do not grant access to the data (just the resource itself), with exception of the Owner role which grants Super User access and does grant full data access.



You must grant access to the folders/files themselves using Data Explorer in the Portal or download storage explorer using POSIX permissions.



This guide explains the detail of how to do that: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-access-control



Reference: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-secure-data




Only the Owner role automatically enables file system access. The
Contributor, Reader, and all other roles require ACLs to enable any
level of access to folders and files







share|improve this answer













The RBAC roles on the Gen1 lake do not grant access to the data (just the resource itself), with exception of the Owner role which grants Super User access and does grant full data access.



You must grant access to the folders/files themselves using Data Explorer in the Portal or download storage explorer using POSIX permissions.



This guide explains the detail of how to do that: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-access-control



Reference: https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-secure-data




Only the Owner role automatically enables file system access. The
Contributor, Reader, and all other roles require ACLs to enable any
level of access to folders and files








share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 25 at 11:39









simon_dmoriassimon_dmorias

7741514




7741514












  • Sorry for the delayed response. I did have the permissions on both folders... :(

    – Kzrystof
    Apr 1 at 12:01











  • You must have at least Execute permission on every folder above the folder you are trying to access (including root).

    – simon_dmorias
    Apr 3 at 12:19











  • The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

    – Kzrystof
    Apr 3 at 12:41







  • 1





    As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

    – simon_dmorias
    Apr 3 at 13:10

















  • Sorry for the delayed response. I did have the permissions on both folders... :(

    – Kzrystof
    Apr 1 at 12:01











  • You must have at least Execute permission on every folder above the folder you are trying to access (including root).

    – simon_dmorias
    Apr 3 at 12:19











  • The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

    – Kzrystof
    Apr 3 at 12:41







  • 1





    As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

    – simon_dmorias
    Apr 3 at 13:10
















Sorry for the delayed response. I did have the permissions on both folders... :(

– Kzrystof
Apr 1 at 12:01





Sorry for the delayed response. I did have the permissions on both folders... :(

– Kzrystof
Apr 1 at 12:01













You must have at least Execute permission on every folder above the folder you are trying to access (including root).

– simon_dmorias
Apr 3 at 12:19





You must have at least Execute permission on every folder above the folder you are trying to access (including root).

– simon_dmorias
Apr 3 at 12:19













The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

– Kzrystof
Apr 3 at 12:41






The root, the tenantdata folder and the events folder all do have the Read and Execute permission... :(

– Kzrystof
Apr 3 at 12:41





1




1





As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

– simon_dmorias
Apr 3 at 13:10





As a test can you add your principal to the owner group on the resource. If that works then you have missed a folder permission somewhere.

– simon_dmorias
Apr 3 at 13:10



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55300048%2fdatabricks-fails-accessing-a-data-lake-gen1-while-trying-to-enumerate-a-director%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해