linkedin / ambry

Distributed object store
https://github.com/linkedin/ambry/wiki
Apache License 2.0
1.75k stars 275 forks source link

Build failure in freshly checked-out copy. #767

Open xiahome opened 7 years ago

xiahome commented 7 years ago

java version "1.8.0_144"

git clone *** cd ambry ./gradlew clean && ./gradlew build

com.github.ambry.router.GCMCryptoServiceTest > testEncryptDecryptKeys FAILED
    java.security.GeneralSecurityException: Exception thrown while encrypting data
        at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:77)
        at com.github.ambry.router.GCMCryptoService.encryptKey(GCMCryptoService.java:103)
        at com.github.ambry.router.GCMCryptoService.encryptKey(GCMCryptoService.java:41)
        at com.github.ambry.router.GCMCryptoServiceTest.testEncryptDecryptKeys(GCMCryptoServiceTest.java:76)

        Caused by:
        java.security.InvalidKeyException: Illegal key size
            at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
            at javax.crypto.Cipher.init(Cipher.java:1393)
            at javax.crypto.Cipher.init(Cipher.java:1327)
            at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:69)
            ... 3 more

com.github.ambry.router.GCMCryptoServiceTest > testEncryptDecryptBytes FAILED
    java.security.GeneralSecurityException: Exception thrown while encrypting data
        at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:77)
        at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:41)
        at com.github.ambry.router.GCMCryptoServiceTest.testEncryptDecryptBytes(GCMCryptoServiceTest.java:54)

        Caused by:
        java.security.InvalidKeyException: Illegal key size
            at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
            at javax.crypto.Cipher.init(Cipher.java:1393)
            at javax.crypto.Cipher.init(Cipher.java:1327)
            at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:69)
            ... 2 more

com.github.ambry.router.GCMCryptoServiceTest > testEncryptDecryptKeysDiffIvSize FAILED
    java.security.GeneralSecurityException: Exception thrown while encrypting data
        at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:77)
        at com.github.ambry.router.GCMCryptoService.encryptKey(GCMCryptoService.java:103)
        at com.github.ambry.router.GCMCryptoService.encryptKey(GCMCryptoService.java:41)
        at com.github.ambry.router.GCMCryptoServiceTest.testEncryptDecryptKeysDiffIvSize(GCMCryptoServiceTest.java:99)

        Caused by:
        java.security.InvalidKeyException: Illegal key size
            at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
            at javax.crypto.Cipher.init(Cipher.java:1393)
            at javax.crypto.Cipher.init(Cipher.java:1327)
            at com.github.ambry.router.GCMCryptoService.encrypt(GCMCryptoService.java:69)
            ... 3 more

138 tests completed, 3 failed
:ambry-router:unitTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ambry-router:unitTest'.
> There were failing tests. See the report at: file:///Users/m.xia/study/ambry/ambry-router/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 53.542 secs
vgkholla commented 7 years ago

Thanks for reporting @xiahome !

nsivabalan commented 7 years ago

I couldn't reproduce. Will try it in a diff host and see if I can reproduce.

nsivabalan commented 7 years ago

@xiahome : Can you try downloading JCE and see if it works Ref: https://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters