Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 044D6200C2F for ; Mon, 6 Mar 2017 22:42:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 02C79160B66; Mon, 6 Mar 2017 21:42:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0226B160B81 for ; Mon, 6 Mar 2017 22:42:38 +0100 (CET) Received: (qmail 64131 invoked by uid 500); 6 Mar 2017 21:42:38 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 64120 invoked by uid 99); 6 Mar 2017 21:42:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2017 21:42:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A9A68C9D64 for ; Mon, 6 Mar 2017 21:42:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id d0cPCeNd0xHt for ; Mon, 6 Mar 2017 21:42:35 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2722060E08 for ; Mon, 6 Mar 2017 21:42:35 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id ED10FE0AB0 for ; Mon, 6 Mar 2017 21:42:33 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4331324194 for ; Mon, 6 Mar 2017 21:42:33 +0000 (UTC) Date: Mon, 6 Mar 2017 21:42:33 +0000 (UTC) From: "Jeff W (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HDFS-11500) Java Unlimited Cryptography Extension doesn't work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 06 Mar 2017 21:42:40 -0000 [ https://issues.apache.org/jira/browse/HDFS-11500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898191#comment-15898191 ] Jeff W edited comment on HDFS-11500 at 3/6/17 9:42 PM: ------------------------------------------------------- Run command: curl -k -v -u nn/hdfs-nn1.cloud.local@CLOUD.LOCAL:password --negotiate https://jn1.cloud.local:8481/getJournal?jid=hadoop1&segmentTxId=1&storageInfo=-63%3A1598677718%3A0%3ACID-2eecd392-dae7-480b-a867-5e0295c78648 Will got the same error information, it must be the Jetty server configuration issue. was (Author: jeffwji@yahoo.com): Run command: curl -k -v --negotiate https://jn1.cloud.local:8481/getJournal?jid=hadoop1&segmentTxId=1&storageInfo=-63%3A1598677718%3A0%3ACID-2eecd392-dae7-480b-a867-5e0295c78648 Will got the same error information, it must be the Jetty server configuration issue. > Java Unlimited Cryptography Extension doesn't work > -------------------------------------------------- > > Key: HDFS-11500 > URL: https://issues.apache.org/jira/browse/HDFS-11500 > Project: Hadoop HDFS > Issue Type: Bug > Components: journal-node, namenode > Affects Versions: 2.7.3 > Environment: Centos 7, Java 1.8, HDFS HA > Reporter: Jeff W > Labels: security > Attachments: log_from_journal_node.txt, log_from_name_node.txt > > > I'm setting up my HDFS cluster with JQM service, and enabled Kerberos authentication. replaced JCE to unlimited extension, but I still got the following error information from the Journal node: > ----------------- > 2017-03-04 15:31:39,566 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for nn/hdfs-nn1.cloud.local@CLOUD.LOCAL (auth:KERBEROS) > 2017-03-04 15:31:39,585 INFO SecurityLogger.org.apache.hadoop.security.authorize.ServiceAuthorizationManager: Authorization successful for nn/hdfs-nn1.cloud.local@CLOUD.LOCAL (auth:KERBEROS) for protocol=interface org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocol > ... > 2017-03-04 15:31:40,345 WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: Authentication exception: GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - AES256 CTS mode with HMAC SHA1-96) > ---------------- > > IPC authentication for Namenode looks good, but following with AuthenticationFilter exception came from HTTP authentication, as I'm able to see the same error message appears in Namenode's log: > ----------------- > 2017-03-04 15:31:40,402 ERROR org.apache.hadoop.hdfs.server.namenode.EditLogInputStream: caught exception initializing https://jn1.cloud.local:8481/getJournal?jid=hadoop1&segmentTxId=1&storageInfo=-63%3A1598677718%3A0%3ACID-2eecd392-dae7-480b-a867-5e0295c78648 > java.io.IOException: org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed, status: 403, message: GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - AES256 CTS mode with HMAC SHA1-96) > at org.apache.hadoop.hdfs.server.namenode.EditLogFileInputStream$URLLog$1.run(EditLogFileInputStream.java:464) > at org.apache.hadoop.hdfs.server.namenode.EditLogFileInputStream$URLLog$1.run(EditLogFileInputStream.java:456) > at java.security.AccessController.doPrivileged(Native Method) > ... > Caused by: org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed, status: 403, message: GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - AES256 CTS mode with HMAC SHA1-96) > at org.apache.hadoop.security.authentication.client.AuthenticatedURL.extractToken(AuthenticatedURL.java:274) > at org.apache.hadoop.security.authentication.client.PseudoAuthenticator.authenticate(PseudoAuthenticator.java:77) > at org.apache.hadoop.security.authentication.client.KerberosAuthenticator.authenticate(KerberosAuthenticator.java:214) > at org.apache.hadoop.security.authentication.client.AuthenticatedURL.openConnection(AuthenticatedURL.java:215) > at org.apache.hadoop.hdfs.web.URLConnectionFactory.openConnection(URLConnectionFactory.java:161) > at org.apache.hadoop.hdfs.server.namenode.EditLogFileInputStream$URLLog$1.run(EditLogFileInputStream.java:461) > ... 30 more > 2017-03-04 20:06:51,612 ERROR org.apache.hadoop.hdfs.server.namenode.EditLogInputStream: Got error reading edit log input stream https://jn1.cloud.local:8481/getJournal?jid=hadoop1&segmentTxId=1&storageInfo=-63%3A1598677718%3A0%3ACID-2eecd392-dae7-480b-a867-5e0295c78648; failing over to edit log https://jn2.cloud.local:8481/getJournal?jid=hadoop1&segmentTxId=1&storageInfo=-63%3A1598677718%3A0%3ACID-2eecd392-dae7-480b-a867-5e0295c78648 > org.apache.hadoop.hdfs.server.namenode.RedundantEditLogInputStream$PrematureEOFException: got premature end-of-file at txid 0; expected file to go up to 2 > at org.apache.hadoop.hdfs.server.namenode.RedundantEditLogInputStream.nextOp(RedundantEditLogInputStream.java:194) > at org.apache.hadoop.hdfs.server.namenode.EditLogInputStream.readOp(EditLogInputStream.java:85) > at org.apache.hadoop.hdfs.server.namenode.EditLogInputStream.skipUntil(EditLogInputStream.java:151) > at org.apache.hadoop.hdfs.server.namenode.RedundantEditLogInputStream.nextOp(RedundantEditLogInputStream.java:178) > .... > ---------------- > > AES256 enabled keys are involved in both machines: > ----------------- > $ klist -kte hdfs.keytab | grep 'aes256' > 5 12/31/1969 19:00:00 jn/jn1.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 4 12/31/1969 19:00:00 jn/jn2.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 4 12/31/1969 19:00:00 jn/jn3.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 4 12/31/1969 19:00:00 nn/hdfs-nn1.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 4 12/31/1969 19:00:00 nn/hdfs-nn2.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 3 12/31/1969 19:00:00 dn/hdfs-dn1.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 3 12/31/1969 19:00:00 dn/hdfs-dn2.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 3 12/31/1969 19:00:00 dn/hdfs-dn3.cloud.local@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > 48 12/31/1969 19:00:00 hdfs@CLOUD.LOCAL (aes256-cts-hmac-sha1-96) > ---------------- > > > keytab export command: > ----------------- > > ktpass /princ jn/jn1.cloud.local@CLOUD.LOCAL /mapuser jn1@cloud.local /rndpass /crypto all /ptype KRB5_NT_PRINCIPAL /mapop set /out hdfs.keytab /in hdfs.keytab > ... > > ktpass /princ nn/hdfs-nn1.cloud.local@CLOUD.LOCAL /mapuser nn1@cloud.local /rndpass /crypto all /ptype KRB5_NT_PRINCIPAL /mapop set /out hdfs.keytab /in hdfs.keytab > ... > > ktpass /princ dn/hdfs-dn1.cloud.local@CLOUD.LOCAL /mapuser dn1@cloud.local /rndpass /crypto all /ptype KRB5_NT_PRINCIPAL /mapop set /out hdfs.keytab /in hdfs.keytab > ... > > ktpass /princ hdfs@CLOUD.LOCAL /mapuser hdfs@cloud.local /rndpass /crypto all /ptype KRB5_NT_PRINCIPAL /mapop set /out hdfs.keytab /in hdfs.keytab > ---------------- > > > JCE information: > ----------------- > Max allowed key length for AES: 2147483647 > SUN 1.8 > SunRsaSign 1.8 > SunEC 1.8 > SunJSSE 1.8 > SunJCE 1.8 > SunJGSS 1.8 > SunSASL 1.8 > XMLDSig 1.8 > SunPCSC 1.8 > ---------------- > > > Configuration for core-site.xml: > ----------------- > > hadoop.security.authentication > kerberos > > > hadoop.security.authorization > true > > ---------------- > > > And hdfs-site.xml: > ----------------- > > dfs.journalnode.keytab.file > /opt/hdfs/default/etc/hadoop/hdfs.keytab > > > dfs.journalnode.kerberos.principal > jn/_HOST@CLOUD.LOCAL > > ... > > path to the HDFS keytab > dfs.namenode.keytab.file > /opt/hdfs/default/etc/hadoop/hdfs.keytab > > > Kerberos principal name for the NameNode. > dfs.namenode.kerberos.principal > nn/_HOST@CLOUD.LOCAL > > ---------------- > > > JAAS configuration: > ----------------- > Client \{ > com.sun.security.auth.module.Krb5LoginModule required > useKeyTab=true > keyTab="/opt/hdfs/default/etc/hadoop/hdfs.keytab" > storeKey=true > useTicketCache=false > principal="hdfs@CLOUD.LOCAL"; > \}; > ---------------- > > > krb5.conf file is below: > ----------------- > $ cat /etc/krb5.conf > \[logging\] > default = FILE:/var/log/krb5libs.log > kdc = FILE:/var/log/krb5kdc.log > admin_server = FILE:/var/log/kadmind.log > > \[libdefaults\] > dns_lookup_realm = false > ticket_lifetime = 24h > renew_lifetime = 7d > forwardable = true > rdns = false > default_realm = CLOUD.LOCAL > \# default_ccache_name = KEYRING:persistent:%\{uid\} > > default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac > default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac > permitted_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 rc4-hmac > \[realms\] > CLOUD.LOCAL = \{ > kdc = dc.cloud.local > admin_server = dc.cloud.local > \} > > \[domain_realm\] > .cloud.local = CLOUD.LOCAL > cloud.local = CLOUD.LOCAL > ---------------- > > > I'm using AD as Kerberos server. "Use Kerberos DES encryption types for this account" is checked for all the accounts. Current logon user: > ------------------ > $ klist > Ticket cache: KEYRING:persistent:1179001683:krb_ccache_l7eifu1 > Default principal: hdfs@CLOUD.LOCAL > > Valid starting Expires Service principal > 03/04/2017 17:41:13 03/05/2017 03:41:13 krbtgt/CLOUD.LOCAL@CLOUD.LOCAL > renew until 03/11/2017 17:41:13 > ---------------- > > > Is there any thing else I should pay attention? -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org