1
votes

I am trying to load data to Data Lake Storage Gen1 using python but getting NameOrService not known. I have created an AD application and got the client key, tenant id as mentioned in docs

adlsAccountName = '*******'
adlCreds = lib.auth(tenant_id = '*****', client_secret = '*****', client_id ='******')
##Create a filesystem client object
adlsFileSystemClient = core.AzureDLFileSystem(adlCreds, store_name=adlsAccountName)
adlsFileSystemClient.ls('/')

The error i am getting is :

azure.datalake.store.exceptions.DatalakeRESTException: HTTP error: ConnectionError(MaxRetryError("HTTPSConnectionPool(host='junipertest.azuredatalakestore.net', port=443): Max retries exceeded with url: /webhdfs/v1/.?api-version=2018-09-01&listSize=4000&OP=LISTSTATUS (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',))",),)

I have tried mkdir and ls both but getting the same error.

1

1 Answers

2
votes

"Name or service not known" is a network error that indicates the host cannot be resolved junipertest.azuredatalakestore.net or there is no service on port 443.

  1. Check the name again in the Azure portal.

  2. Check the name resolution (DNS):

> nslookup junipertest.azuredatalakestore.net # Windows

$ dig junipertest.azuredatalakestore.net # Linux

  1. Ensure you have a route to reach the data lake.