Yi Yao created HADOOP-11141:
-------------------------------

             Summary: KMS server throws unclear 500 error while creating a key 
with invalid cipher
                 Key: HADOOP-11141
                 URL: https://issues.apache.org/jira/browse/HADOOP-11141
             Project: Hadoop Common
          Issue Type: Bug
          Components: security
    Affects Versions: 2.6.0
            Reporter: Yi Yao


hadoop key create test2 -cipher aes-ctr -size 128 -provider 
kms://http@localhost:16000/kms

The cipher in the above command is an invalid value. I got the following 
exception. The exception is not clear to end-user.

[LOG]
test2 has not been created. HTTP status [500], exception 
[java.lang.reflect.UndeclaredThrowableException], message [null] 
java.io.IOException: HTTP status [500], exception 
[java.lang.reflect.UndeclaredThrowableException], message [null] 
        at 
org.apache.hadoop.util.HttpExceptionUtils.validateResponse(HttpExceptionUtils.java:159)
        at 
org.apache.hadoop.crypto.key.kms.KMSClientProvider.call(KMSClientProvider.java:430)
        at 
org.apache.hadoop.crypto.key.kms.KMSClientProvider.createKeyInternal(KMSClientProvider.java:561)
        at 
org.apache.hadoop.crypto.key.kms.KMSClientProvider.createKey(KMSClientProvider.java:569)
        at 
org.apache.hadoop.crypto.key.KeyShell$CreateCommand.execute(KeyShell.java:481)
        at org.apache.hadoop.crypto.key.KeyShell.run(KeyShell.java:79)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.hadoop.crypto.key.KeyShell.main(KeyShell.java:513)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to