Products | Versions |
---|---|
TIBCO Data Virtualization | TDV All Versions |
During backup export execution we could notice below error, but backup file will be created successfully.
Error
- Setting KeyStore/TrustStore passwords has failed
com.compositesw.common.security.CompositeSecurityException: Given final block not properly padded
at com.compositesw.common.security.encryption.AESCipherService.doEncrypt(AESCipherService.java:114)
at com.compositesw.common.security.encryption.AESCipherService.decrypt(AESCipherService.java:232)
at com.compositesw.common.security.KeyStorePasswordUtil.setKeyStoreSystemProperty(KeyStorePasswordUtil.java:222)
at com.compositesw.common.security.KeyStorePasswordUtil.verifyKSInitScriptAndLoadPasswords(KeyStorePasswordUtil.java:240)
at com.compositesw.cmdline.archive.BackupCommand.startCommand(BackupCommand.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.compositesw.base.boot.ArchiveBoot.main(ArchiveBoot.java:59)
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.AESCipher.engineDoFinal(AESCipher.java:313)
at javax.crypto.Cipher.doFinal(Cipher.java:2087)
at com.compositesw.common.security.encryption.AESCipherService.doEncrypt(AESCipherService.java:112)
... 9 more
This issue is identified when there are multiple instances installed in the same network drive machine/server and in cluster.
As the backup_export was scheduled in cron and each cronjob was pointing to a single instance of the cluster which was failing to read the encryption password property.
To resolve this issue, please make sure each scheduled cronjob is pointing to it own installation directory.