java.io.IOException: Bad configuration of hadoop.security.credential.provider.path at jceks://fileC:\hdc\hadoop-common-project\hadoop-common\target\test\data\creds/test.jks

Apache's JIRA Issue Tracker | Mike Yoder | 2 years ago
  1. 0

    I was attempting to use the LdapGroupsMapping code and the JavaKeyStoreProvider at the same time, and hit a really interesting, yet fatal, issue. The code goes into what ought to have been an infinite loop, were it not for it overflowing the stack and Java ending the loop. Here is a snippet of the stack; my annotations are at the bottom. {noformat} at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296) at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:88) at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:65) at org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory.createProvider(JavaKeyStoreProvider.java:291) at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:58) at org.apache.hadoop.conf.Configuration.getPasswordFromCredentialProviders(Configuration.java:1863) at org.apache.hadoop.conf.Configuration.getPassword(Configuration.java:1843) at org.apache.hadoop.security.LdapGroupsMapping.getPassword(LdapGroupsMapping.java:386) at org.apache.hadoop.security.LdapGroupsMapping.setConf(LdapGroupsMapping.java:349) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) at org.apache.hadoop.security.Groups.<init>(Groups.java:70) at org.apache.hadoop.security.Groups.<init>(Groups.java:66) at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280) at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:260) at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:804) at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:774) at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:647) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2753) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2745) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2611) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296) at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:88) at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:65) at org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory.createProvider(JavaKeyStoreProvider.java:291) at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:58) at org.apache.hadoop.conf.Configuration.getPasswordFromCredentialProviders(Configuration.java:1863) at org.apache.hadoop.conf.Configuration.getPassword(Configuration.java:1843) at org.apache.hadoop.security.LdapGroupsMapping.getPassword(LdapGroupsMapping.java:386) at org.apache.hadoop.security.LdapGroupsMapping.setConf(LdapGroupsMapping.java:349) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) at org.apache.hadoop.security.Groups.<init>(Groups.java:70) at org.apache.hadoop.security.Groups.<init>(Groups.java:66) at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280) at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283) at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:260) at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:804) at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:774) at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:647) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2753) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2745) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2611) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296){noformat} Here's my annotation, going from bottom to top. * Somehow we enter Path.getFileSystem() * This goes to FileSystem cache stuff, and then it wants the current user * So we get to UserGroupInformation.getCurrentUser(), which as you can imagine gets to * getUserToGroupsMappingService and thence to LdapGroupsMapping.setConf(). * That code gets the needed passwords, and we're using the CredentialProvider, so unsurprisingly we get to * getPasswordFromCredentialProviders() - which chooses the JavaKeyStoreProvider like I told it to. * The JavaKeyStoreProvider, in its constructor, does "fs = path.getFileSystem(conf);" * And guess what, we're back in Path.getFileSystem, where we started at the beginning. Please let me know if I've somehow configured something incorrectly, but if I have I can't figure out what it is...

    Apache's JIRA Issue Tracker | 2 years ago | Mike Yoder
    java.io.IOException: Bad configuration of hadoop.security.credential.provider.path at jceks://fileC:\hdc\hadoop-common-project\hadoop-common\target\test\data\creds/test.jks
  2. 0

    Hadoop lucene-dev - [jira] [Created] (HADOOP-12589) Fix intermittent test failure of TestCopyPreserveFlag

    nabble.com | 11 months ago
    java.io.IOException: Mkdirs failed to create d0 (exists=false, cwd=/testptch/hadoop/hadoop-common-project/hadoop-common/target/test/data/2/testStat)
  3. 0

    Compression and symbolic link surefire test failures while building Hadoop 2.4.1 using Maven

    Stack Overflow | 2 years ago | Thomas Hubregtsen
    java.io.IOException: Path file:/home/tom/hadoop/hadoop-2.4.1-native/hadoop-2.4.1-src/hadoop-common-project/hadoop-common/target/test/data/jBQavzwkcW/test1/linkToFile is not a symbolic link
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: Error while building.

    ranger-dev | 2 years ago | Ashish Singh
    java.io.IOException: Bad configuration of > > > > > > > > > hadoop.security.credential.provider.path at jceks://fileC:\Users\HomeXPS/testkeystore.jceks at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(Cr edentialProviderFactory.java:70) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell$Command.getCredentialProv ider(CredentialShell.java:164) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell$DeleteCommand.validate(Cr edentialShell.java:254) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java: 67) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.ranger.authorization.hadoop.utils.RangerCredentialProviderTest. teardown(RangerCredentialProviderTest.java:85) at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > > > > Method) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm pl.java:25)
  6. 0

    Re: Error while building.

    ranger-dev | 2 years ago | Sitaraman Vilayannur
    java.io.IOException: Bad configuration of > > > > > > > > hadoop.security.credential.provider.path at jceks://fileC:\Users\HomeXPS/testkeystore.jceks at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(Cr edentialProviderFactory.java:70) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell$Command.getCredentialProv ider(CredentialShell.java:164) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell$CreateCommand.validate(Cr edentialShell.java:323) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java: 67) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.ranger.authorization.hadoop.utils.RangerCredentialProviderTest. setup(RangerCredentialProviderTest.java:50) at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > > > Method) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm pl.java:25)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Bad configuration of hadoop.security.credential.provider.path at jceks://fileC:\hdc\hadoop-common-project\hadoop-common\target\test\data\creds/test.jks

      at java.net.URI$Parser.fail()
    2. Java RT
      URI.<init>
      1. java.net.URI$Parser.fail(URI.java:2829)
      2. java.net.URI$Parser.parseAuthority(URI.java:3167)
      3. java.net.URI$Parser.parseHierarchical(URI.java:3078)
      4. java.net.URI$Parser.parse(URI.java:3034)
      5. java.net.URI.<init>(URI.java:595)
      5 frames
    3. org.apache.hadoop
      TestCredentialProviderFactory.testFactory
      1. org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:55)
      2. org.apache.hadoop.security.alias.TestCredentialProviderFactory.testFactory(TestCredentialProviderFactory.java:58)
      2 frames