Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13476

CredentialProviderFactory fails at class loading from libhdfs (JNI)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0, 2.9.0, 3.0.0-alpha2
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: fs/s3
    • Labels:
      None

      Description

      This bug was discovered when trying to run Impala (libhdfs.so) with s3a and Java KeyStore credentials. Because JNI threads have a different classloader (bootstrap), we fail to load JavaKeyStoreProvider.

      15:11:42.658087 26310 jni-util.cc:166] java.util.ServiceConfigurationError: org.apache.hadoop.security.alias.CredentialProviderFactory: Provider
      org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory not found
      at java.util.ServiceLoader.fail(ServiceLoader.java:231)
      at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
      at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
      at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
      at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:57)
      at org.apache.hadoop.conf.Configuration.getPasswordFromCredentialProviders(Configuration.java:1950)
      at org.apache.hadoop.conf.Configuration.getPassword(Configuration.java:1930)
      at org.apache.hadoop.fs.s3a.S3AFileSystem.getAWSAccessKeys(S3AFileSystem.java:366)
      at org.apache.hadoop.fs.s3a.S3AFileSystem.getAWSCredentialsProvider(S3AFileSystem.java:415)
      at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:176)

        Issue Links

          Activity

          Hide
          fabbri Aaron Fabbri added a comment -

          I've tested the same fix as was used for HDFS-7075, and it worked. Patch coming soon.

          Show
          fabbri Aaron Fabbri added a comment - I've tested the same fix as was used for HDFS-7075 , and it worked. Patch coming soon.
          Hide
          fabbri Aaron Fabbri added a comment -

          Attaching v1 patch. Tested via libhdfs with impala-shell.

          Show
          fabbri Aaron Fabbri added a comment - Attaching v1 patch. Tested via libhdfs with impala-shell.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 13s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 6m 42s trunk passed
          +1 compile 6m 49s trunk passed
          +1 checkstyle 0m 23s trunk passed
          +1 mvnsite 0m 53s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 18s trunk passed
          +1 javadoc 0m 45s trunk passed
          +1 mvninstall 0m 37s the patch passed
          +1 compile 6m 41s the patch passed
          +1 javac 6m 41s the patch passed
          +1 checkstyle 0m 23s the patch passed
          +1 mvnsite 0m 51s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 24s the patch passed
          +1 javadoc 0m 45s the patch passed
          -1 unit 10m 7s hadoop-common in the patch failed.
          +1 asflicense 0m 21s The patch does not generate ASF License warnings.
          39m 59s



          Reason Tests
          Failed junit tests hadoop.net.TestDNS



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822919/HADOOP-13476.001.patch
          JIRA Issue HADOOP-13476
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 242ffe920c35 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / d00d3ad
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 13s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 6m 42s trunk passed +1 compile 6m 49s trunk passed +1 checkstyle 0m 23s trunk passed +1 mvnsite 0m 53s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 18s trunk passed +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 37s the patch passed +1 compile 6m 41s the patch passed +1 javac 6m 41s the patch passed +1 checkstyle 0m 23s the patch passed +1 mvnsite 0m 51s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 24s the patch passed +1 javadoc 0m 45s the patch passed -1 unit 10m 7s hadoop-common in the patch failed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 39m 59s Reason Tests Failed junit tests hadoop.net.TestDNS Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822919/HADOOP-13476.001.patch JIRA Issue HADOOP-13476 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 242ffe920c35 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / d00d3ad Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10216/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          cnauroth Chris Nauroth added a comment -

          +1 for the patch. The test failure in TestDNS is unrelated and tracked separately in HADOOP-13101. I have committed this to trunk and branch-2. Aaron Fabbri, thank you for the patch.

          Show
          cnauroth Chris Nauroth added a comment - +1 for the patch. The test failure in TestDNS is unrelated and tracked separately in HADOOP-13101 . I have committed this to trunk and branch-2. Aaron Fabbri , thank you for the patch.
          Hide
          fabbri Aaron Fabbri added a comment -

          woot. Thanks Chris Nauroth!

          Show
          fabbri Aaron Fabbri added a comment - woot. Thanks Chris Nauroth !
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #10252 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10252/)
          HADOOP-13476. CredentialProviderFactory fails at class loading from (cnauroth: rev 4d4fe07c3cdd5c57c455ef91daac3686b753b9be)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #10252 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10252/ ) HADOOP-13476 . CredentialProviderFactory fails at class loading from (cnauroth: rev 4d4fe07c3cdd5c57c455ef91daac3686b753b9be) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java

            People

            • Assignee:
              fabbri Aaron Fabbri
              Reporter:
              fabbri Aaron Fabbri
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development