Запись на hdfs с поддержкой Kerberos с помощью python | Превышено максимальное количество попыток с URL-адресом
Я пытаюсь использовать python для записи в безопасные hdfs, используя следующую ссылку lib
Часть аутентификации:
def init_kinit():
kinit_args = ['/usr/bin/kinit', '-kt', '/tmp/xx.keytab',
'kerberos_principle']
subp = Popen(kinit_args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
subp.wait()
часть клиента/загрузки:
from hdfs.ext.kerberos import KerberosClient
client = KerberosClient(url='http://xx.com:port', session=session,
mutual_auth="REQUIRED")
client.upload(
f'/hdfspath/file.parquet',
f'/localpath/file.parquet')
вот ошибка
requests.exceptions.ConnectionError: HTTPConnectionPool(host='xxx', port=xxx):
Max retries exceeded with url: /webhdfs/v1/user/xxx/xxx.parquet?op=LISTSTATUS (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f499c104d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
Я попробовал следующую ссылку и убедился, что dfs.webhdfs.enabled включен