You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Larry McCay (JIRA)" <ji...@apache.org> on 2015/06/08 17:34:00 UTC
[jira] [Commented] (KNOX-556) Knox needs better diagnostics for
Keystore failures
[ https://issues.apache.org/jira/browse/KNOX-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14577359#comment-14577359 ]
Larry McCay commented on KNOX-556:
----------------------------------
This fix requires better error handling and use of exceptions.
It will affect many core gateway classes but shouldn't affect existing custom service implementations.
> Knox needs better diagnostics for Keystore failures
> ---------------------------------------------------
>
> Key: KNOX-556
> URL: https://issues.apache.org/jira/browse/KNOX-556
> Project: Apache Knox
> Issue Type: Bug
> Components: KnoxCLI, Server
> Reporter: Larry McCay
> Assignee: Larry McCay
> Fix For: 0.7.0
>
>
> In the instance when a keystore cannot be opened, DefaultKeystoreService returns null rather than provide any appropriate diagnostics.
> Specific usecase: On suse - gateway run with sun jdk and keystores created with same.
> Try to provision a credential with knoxcli running with an IBM jdk and we get a NPE:
> java.lang.NullPointerException
> at org.apache.hadoop.gateway.services.security.impl.BaseKeystoreService.writeKeystoreToFile(BaseKeystoreService.java:225)
> at org.apache.hadoop.gateway.services.security.impl.DefaultKeystoreService.addCredentialForCluster(DefaultKeystoreService.java:202)
> at org.apache.hadoop.gateway.services.security.impl.DefaultAliasService.addAliasForCluster(DefaultAliasService.java:119)
> at org.apache.hadoop.gateway.util.KnoxCLI$AliasCreateCommand.execute(KnoxCLI.java:414)
> at org.apache.hadoop.gateway.util.KnoxCLI.run(KnoxCLI.java:94)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.gateway.util.KnoxCLI.main(KnoxCLI.java:649)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at org.apache.hadoop.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:70)
> at org.apache.hadoop.gateway.launcher.Invoker.invoke(Invoker.java:39)
> at org.apache.hadoop.gateway.launcher.Command.run(Command.java:101)
> at org.apache.hadoop.gateway.launcher.Launcher.run(Launcher.java:69)
> at org.apache.hadoop.gateway.launcher.Launcher.main(Launcher.java:46)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)