Knowledge Center Monthly Newsletter - March 2025
Stay up to date with the latest from the Knowledge Center. See all new and updated Knowledge Center articles published in the last month and re:Post’s top contributors.
Amazon EMR 認証に使用するための、失効した Kerberos チケットを更新したいです。
失効した Kerberos チケットを更新するには、次の手順を実行します。
Amazon EMR プライマリノードに接続するには、SSH を使用します。
Kerberos チケットが失効していることを確認するには、klist コマンドを実行します。認証情報がキャッシュされていない場合、チケットは失効しています。
[hadoop@ip-xxx-x-x-xxx ~]$ klist klist: No credentials cache found (filename: /tmp/krb5cc_498)
keytab ファイルの内容を一覧表示し、Kerberos プリンシパル名を確認します。
[hadoop@ip-xxx-x-x-xxx ~]$ klist -kt /etc/hadoop.keytab Keytab name: FILE:/etc/hadoop.keytab KVNO Timestamp Principal ---- ------------------- ------------------------------------------------------ 2 07/04/2019 21:48:46 hadoop/ip-xxx-x-x-xxx.ec2.internal@EC2.INTERNAL 2 07/04/2019 21:48:46 hadoop/ip-xxx-x-x-xxx.ec2.internal@EC2.INTERNAL 2 07/04/2019 21:48:46 hadoop/ip-xxx-x-x-xxx.ec2.internal@EC2.INTERNAL
kinit を実行し、Kerberos チケットを更新します。keytab ファイルとプリンシパルを指定します。
[hadoop@ip-xxx-x-x-xxx ~]$ kinit -kt /etc/hadoop.keytab hadoop/ip-xxx-x-x-xxx.ec2.internal@EC2.INTERNAL
認証情報がキャッシュされていることを確認します。
[hadoop@ip-xxx-x-x-xxx ~]$ klist Ticket cache: FILE:/tmp/krb5cc_498 Default principal: hadoop/ip-xxx-x-x-xxx.ec2.internal@EC2.INTERNAL Valid starting Expires Service principal 11/04/2019 22:13:47 11/05/2019 08:13:47 krbtgt/EC2.INTERNAL@EC2.INTERNAL renew until 11/06/2019 22:13:47
Kerberos チケットが機能していることを確認するには、HDFS コマンドを実行します。
[hadoop@ip-XXX-XX-XX-XXX ~]$ hdfs dfs -ls / Found 4 items drwxr-xr-x - hdfs hadoop 0 2019-11-05 22:45 /apps drwxrwxrwt - hdfs hadoop 0 2019-11-05 22:46 /tmp drwxr-xr-x - hdfs hadoop 0 2019-11-05 22:45 /user drwxr-xr-x - hdfs hadoop 0 2019-11-05 22:45 /var
Amazon EMR での認証に Kerberos を使用する