GSSException:PolybaseをKerberosに接続しているときに、有効な資格情報が提供されません(メカニズムレベル:Kerberos tgtが見つかりませんでした)

SQL Server 2016 EnterpriseをPolybase経由で、Cloudera5.14を使用するKerberizedOnPremHadoop-Clusterに接続します。

私は、その後マイクロソフトポリ塩基ガイドをポリ塩基を設定します。このトピックに数日取り組んだ後、例外のために続行できません:javax.security.sasl.SaslException:GSSの開始に失敗しました[GSSExceptionが原因:有効な資格情報が提供されていません(メカニズムレベル:Kerberos tgtが見つかりませんでした) ]

Microsoftには、PolyBaseおよびKerberosとの接続をトラブルシューティングするための診断ツールが組み込まれています。Microsoftのこのトラブルシューティングガイドには、4つのチェックポイントがあり、チェックポイント4でスタックしています。チェックポイントに関する短い情報(成功した場合):

  • チェックポイント1:成功しました!KDCに対して認証され、TGTを受信しました
  • チェックポイント2:成功しました!トラブルシューティングガイドに関して、PolyBaseはHDFSへのアクセスを試みますが、リクエストに必要なサービスチケットが含まれていなかったため、失敗します。
  • チェックポイント3:成功しました!2番目の16進ダンプは、SQL ServerがTGTを正常に使用し、名前ノードのSPNに該当するサービスチケットをKDCから取得したことを示します。
  • チェックポイント4:未成功しSQL ServerがST(サービスチケット)を使用して、Hadoopので認証されたとのセッションが保護されたリソースにアクセスすることを許可されました。

krb5.confファイル

[libdefaults]
default_realm = COMPANY.REALM.COM
dns_lookup_kdc = false
dns_lookup_realm = false
ticket_lifetime = 86400
renew_lifetime = 604800
forwardable = true
default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
permitted_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
udp_preference_limit = 1
kdc_timeout = 3000
[realms]
COMPANY.REALM.COM = {
kdc = ipadress.kdc.host
admin_server = ipadress.kdc.host
}
[logging]
default = FILE:/var/log/krb5/kdc.log
kdc = FILE:/var/log/krb5/kdc.log
admin_server = FILE:/var/log/krb5/kadmind.log

SQL-Server上のPolybaseのcore-site.xml

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
  <property>
    <name>io.file.buffer.size</name>
    <value>131072</value>
  </property>
  <property>
    <name>ipc.client.connect.max.retries</name>
    <value>2</value>
  </property>
  <property>
    <name>ipc.client.connect.max.retries.on.timeouts</name>
    <value>2</value>
  </property>

<!-- kerberos security information, PLEASE FILL THESE IN ACCORDING TO HADOOP CLUSTER CONFIG -->
<property>
    <name>polybase.kerberos.realm</name>
    <value>COMPANY.REALM.COM</value>
  </property>
  <property>
    <name>polybase.kerberos.kdchost</name>
    <value>ipadress.kdc.host</value>
  </property>
  <property>
    <name>hadoop.security.authentication</name>
    <value>KERBEROS</value>
  </property>
</configuration>

SQL-Server上のPolybaseのhdfs-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
  <property>
    <name>dfs.block.size</name>
    <value>268435456</value> 
  </property>
  <!-- Client side file system caching is disabled below for credential refresh and 
       settting the below cache disabled options to true might result in 
       stale credentials when an alter credential or alter datasource is performed
  -->
  <property>
    <name>fs.wasb.impl.disable.cache</name>
    <value>true</value>
  </property>
  <property>
    <name>fs.wasbs.impl.disable.cache</name>
    <value>true</value>
  </property>
  <property>
    <name>fs.asv.impl.disable.cache</name>
    <value>true</value>
  </property>
  <property>
    <name>fs.asvs.impl.disable.cache</name>
    <value>true</value>
  </property>
  <property>
    <name>fs.hdfs.impl.disable.cache</name>
    <value>true</value>
  </property>
<!-- kerberos security information, PLEASE FILL THESE IN ACCORDING TO HADOOP CLUSTER CONFIG -->
  <property>
    <name>dfs.namenode.kerberos.principal</name>
    <value>hdfs/[email protected]</value> 
  </property>
</configuration>

ポリベースの例外

[2018-06-22 12:51:50,349] WARN  2872[main] - org.apache.hadoop.security.UserGroupInformation.hasSufficientTimeElapsed(UserGroupInformation.java:1156) - Not attempting to re-login since the last re-login was attempted less than 600 seconds before.
[2018-06-22 12:51:53,568] WARN  6091[main] - org.apache.hadoop.security.UserGroupInformation.hasSufficientTimeElapsed(UserGroupInformation.java:1156) - Not attempting to re-login since the last re-login was attempted less than 600 seconds before.
[2018-06-22 12:51:56,127] WARN  8650[main] - org.apache.hadoop.security.UserGroupInformation.hasSufficientTimeElapsed(UserGroupInformation.java:1156) - Not attempting to re-login since the last re-login was attempted less than 600 seconds before.
[2018-06-22 12:51:58,998] WARN 11521[main] - org.apache.hadoop.security.UserGroupInformation.hasSufficientTimeElapsed(UserGroupInformation.java:1156) - Not attempting to re-login since the last re-login was attempted less than 600 seconds before.
[2018-06-22 12:51:59,139] WARN 11662[main] - org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:676) - Couldn't setup connection for [email protected] to IPADRESS_OF_NAMENODE:8020
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]

NameNodeのログエントリ

Socket Reader #1 for port 8020: readAndProcess from client IP-ADRESS_SQL-SERVER threw exception [javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: Failure unspecified at GSS-API level (Mechanism level: AES128 CTS mode with HMAC SHA1-96 encryption type not in permitted_enctypes list)]]

Auth failed for IP-ADRESS_SQL-SERVER:60484:null (GSS initiate failed) with true cause: (GSS initiate failed)

私にとって紛らわしいのは、HMACSHA1-96を使用したAES128CTSモードがkrb5.confとClouderaManager UIに示されているように、許可されたenctypeのリストにすでに含まれているため、NameNodeからのログエントリです。

Cloudera Manager UI krb_enc_types

私たちはあなたの助けに感謝します!

クラスタを再起動した後、問題自体は解決しました。問題は、実行中のサービスが原因で、Hadoopクラスター内のkrb5.confファイルをすべてのノードに配布できなかったことだと思います。Cloudera Managerには、Kerberosに関する古い構成に関する警告もありました。みんなありがとう!

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ