尝试将数据加载到 Data Lake Storage Gen1 时出现 NameOrService 未知错误
Getting NameOrService not known error when trying to load data to Data Lake Storage Gen1
我正在尝试使用 python 将数据加载到 Data Lake Storage Gen1,但 NameOrService 未知。
我已经创建了一个 AD 应用程序并获得了文档中提到的客户端密钥和租户 ID
adlsAccountName = '*******'
adlCreds = lib.auth(tenant_id = '*****', client_secret = '*****', client_id ='******')
##Create a filesystem client object
adlsFileSystemClient = core.AzureDLFileSystem(adlCreds, store_name=adlsAccountName)
adlsFileSystemClient.ls('/')
我得到的错误是:
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',))",),)
我已经尝试了 mkdir 和 ls,但得到了同样的错误。
"Name or service not known"是网络错误,表示主机无法解析junipertest.azuredatalakestore.net
或者443端口没有服务
Check the name resolution (DNS):
> nslookup junipertest.azuredatalakestore.net # Windows
$ dig junipertest.azuredatalakestore.net # Linux
- 确保您有到达数据湖的路线。
- 来自 Azure Portal Select Data Lake Storage 和 select 防火墙和虚拟网络
- For Gen1 storage, follow this guide to secure data
我正在尝试使用 python 将数据加载到 Data Lake Storage Gen1,但 NameOrService 未知。 我已经创建了一个 AD 应用程序并获得了文档中提到的客户端密钥和租户 ID
adlsAccountName = '*******'
adlCreds = lib.auth(tenant_id = '*****', client_secret = '*****', client_id ='******')
##Create a filesystem client object
adlsFileSystemClient = core.AzureDLFileSystem(adlCreds, store_name=adlsAccountName)
adlsFileSystemClient.ls('/')
我得到的错误是:
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',))",),)
我已经尝试了 mkdir 和 ls,但得到了同样的错误。
"Name or service not known"是网络错误,表示主机无法解析junipertest.azuredatalakestore.net
或者443端口没有服务
Check the name resolution (DNS):
> nslookup junipertest.azuredatalakestore.net # Windows
$ dig junipertest.azuredatalakestore.net # Linux
- 确保您有到达数据湖的路线。
- 来自 Azure Portal Select Data Lake Storage 和 select 防火墙和虚拟网络
- For Gen1 storage, follow this guide to secure data