-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58697/#review175480
-----------------------------------------------------------


Ship it!




Ship It!

- Colm O hEigeartaigh


On April 28, 2017, 1:21 a.m., Qiang Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58697/
> -----------------------------------------------------------
> 
> (Updated April 28, 2017, 1:21 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Colm O hEigeartaigh, Ramesh Mani, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1542
>     https://issues.apache.org/jira/browse/RANGER-1542
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> there is a bug, as follows:
> 
>     try {
>               decryptedPwd = PasswordUtils.decryptPassword(password);
>       } catch (Exception ex) {
>           LOG.info("Password decryption failed; trying Atlas connection with 
> received password string");
>               decryptedPwd = null;
>       } finally {
>               if (decryptedPwd == null) {
>                       decryptedPwd = password;
>               }
>       }
>       formData.add("j_password", PasswordUtils.decryptPassword(password));
>             
> we should change the code 'formData.add("j_password", 
> PasswordUtils.decryptPassword(password));'
> to 'formData.add("j_password", decryptedPwd);'.
>             
> 
> Error message poped out as below:
> 2017-04-25 07:02:20,358 [timed-executor-pool-0] ERROR 
> org.apache.ranger.plugin.util.PasswordUtils (PasswordUtils.java:127) - Unable 
> to decrypt password due to error
> javax.crypto.BadPaddingException: Given final block not properly padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:183)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> 2017-04-25 07:02:20,358 [timed-executor-pool-0] INFO  
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:185) - 
> Password decryption failed; trying Atlas connection with received password 
> string
> 2017-04-25 07:02:20,359 [timed-executor-pool-0] ERROR 
> org.apache.ranger.plugin.util.PasswordUtils (PasswordUtils.java:127) - Unable 
> to decrypt password due to error
> javax.crypto.BadPaddingException: Given final block not properly padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> 2017-04-25 07:02:20,360 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:212) - 
> Exception while getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
> java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,361 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:251) - 
> Exception while getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
> org.apache.ranger.plugin.client.HadoopException: Exception while getting 
> Atlas Resource List. URL : http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:211)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       ... 20 more
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,361 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient$1$1 (AtlasClient.java:144) - 
> Exception while getting Atlas Resource List.
> org.apache.ranger.plugin.client.HadoopException: Exception while getting 
> Atlas Resource List. URL : http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:250)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:211)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       ... 19 more
> Caused by: java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       ... 20 more
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,362 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:163) - 
> Unable to get Atlas Resource list
> org.apache.ranger.plugin.client.HadoopException: Exception while getting 
> Atlas Resource List.
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:143)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:250)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       ... 18 more
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:211)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       ... 19 more
> Caused by: java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       ... 20 more
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,363 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:167) - 
> Unable to get a valid response for expected mime type : [application/json] 
> org.apache.ranger.plugin.client.HadoopException: Exception while getting 
> Atlas Resource List.
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:143)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:250)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       ... 18 more
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:211)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       ... 19 more
> Caused by: java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       ... 20 more
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,364 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasClient (AtlasClient.java:683) - 
> getAtlasResource: Unable to get Atlas Resources.
> org.apache.ranger.plugin.client.HadoopException: Unable to get a valid 
> response for expected mime type : [application/json] 
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:166)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getAtlasResource(AtlasClient.java:673)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTest(AtlasClient.java:619)
>       at 
> org.apache.ranger.services.atlas.client.AtlasResourceMgr.validateConfig(AtlasResourceMgr.java:40)
>       at 
> org.apache.ranger.services.atlas.RangerServiceAtlas.validateConfig(RangerServiceAtlas.java:58)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:563)
>       at 
> org.apache.ranger.biz.ServiceMgr$ValidateCallable.actualCall(ServiceMgr.java:550)
>       at 
> org.apache.ranger.biz.ServiceMgr$TimedCallable.call(ServiceMgr.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List.
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:143)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:114)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:356)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:114)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1.call(AtlasClient.java:107)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.timedTask(AtlasClient.java:692)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getResourceList(AtlasClient.java:161)
>       ... 11 more
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:250)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient$1$1.run(AtlasClient.java:123)
>       ... 18 more
> Caused by: org.apache.ranger.plugin.client.HadoopException: Exception while 
> getting Atlas Resource List. URL : 
> http://localhost:21000/j_spring_security_check
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:211)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.connectionTestResource(AtlasClient.java:227)
>       ... 19 more
> Caused by: java.io.IOException: Unable to decrypt password due to error
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:128)
>       at 
> org.apache.ranger.services.atlas.client.AtlasClient.getStatusResponse(AtlasClient.java:192)
>       ... 20 more
> Caused by: javax.crypto.BadPaddingException: Given final block not properly 
> padded
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
>       at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
>       at com.sun.crypto.provider.PBECipherCore.doFinal(PBECipherCore.java:422)
>       at 
> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(PBEWithMD5AndDESCipher.java:316)
>       at javax.crypto.Cipher.doFinal(Cipher.java:2131)
>       at 
> org.apache.ranger.plugin.util.PasswordUtils.decryptPassword(PasswordUtils.java:112)
>       ... 21 more
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasResourceMgr 
> (AtlasResourceMgr.java:42) - <== AtlasResourceMgr.validateConfig Error: 
> org.apache.ranger.plugin.client.HadoopException: getAtlasResource: Unable to 
> get Atlas Resources.
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> org.apache.ranger.services.atlas.RangerServiceAtlas 
> (RangerServiceAtlas.java:60) - <== RangerServiceAtlas.validateConfig 
> Error:org.apache.ranger.plugin.client.HadoopException: getAtlasResource: 
> Unable to get Atlas Resources.
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> org.apache.ranger.biz.ServiceMgr$TimedCallable (ServiceMgr.java:513) - 
> TimedCallable.call: Error:org.apache.ranger.plugin.client.HadoopException: 
> getAtlasResource: Unable to get Atlas Resources.
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> apache.ranger.services.atlas.client.AtlasResourceMgr 
> (AtlasResourceMgr.java:42) - <== AtlasResourceMgr.validateConfig Error: 
> org.apache.ranger.plugin.client.HadoopException: getAtlasResource: Unable to 
> get Atlas Resources.
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> org.apache.ranger.services.atlas.RangerServiceAtlas 
> (RangerServiceAtlas.java:60) - <== RangerServiceAtlas.validateConfig 
> Error:org.apache.ranger.plugin.client.HadoopException: getAtlasResource: 
> Unable to get Atlas Resources.
> 2017-04-25 07:02:20,365 [timed-executor-pool-0] ERROR 
> org.apache.ranger.biz.ServiceMgr$TimedCallable (ServiceMgr.java:513) - 
> TimedCallable.call: Error:org.apache.ranger.plugin.client.HadoopException: 
> getAtlasResource: Unable to get Atlas Resources.
> 2017-04-25 07:02:20,366 [http-bio-6080-exec-5] ERROR 
> org.apache.ranger.biz.ServiceMgr (ServiceMgr.java:188) - ==> 
> ServiceMgr.validateConfig 
> Error:org.apache.ranger.plugin.client.HadoopException: 
> org.apache.ranger.plugin.client.HadoopException: getAtlasResource: Unable to 
> get Atlas Resources.
> 
> 
> Diffs
> -----
> 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/client/AtlasClient.java
>  116fceb 
> 
> 
> Diff: https://reviews.apache.org/r/58697/diff/2/
> 
> 
> Testing
> -------
> 
> tested
> 
> 
> Thanks,
> 
> Qiang Zhang
> 
>

Reply via email to