View Issue Details

IDProjectCategoryView StatusLast Update
0006824SymmetricDS ProImprovementpublic2025-04-15 18:32
Reporterelong Assigned Toelong  
Prioritynormal 
Status resolvedResolutionfixed 
Product Version3.15.0 
Target Version3.16.2Fixed in Version3.16.2 
Summary0006824: Batch fails with BadPaddingException and keeps retrying
DescriptionWhen using encrypted staging, a batch can fail with a BadPaddingException or IllegalBlockSizeException if the batch is corrupted on disk in staging. It keeps retrying to send the batch, but fails each time. Instead, it could handle the exception as a ProtocolException to remove the batch from staging and retry extraction.

StackTraceKey.init [RuntimeException:3750370382] java.lang.RuntimeException: java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
    at org.jumpmind.symmetric.service.impl.DataExtractorService.transferFromStaging(DataExtractorService.java:1374)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.sendOutgoingBatch(DataExtractorService.java:1242)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.extract(DataExtractorService.java:612)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.extract(DataExtractorService.java:420)
    at org.jumpmind.symmetric.service.impl.PushService.pushToNode(PushService.java:212)
    at org.jumpmind.symmetric.service.impl.PushService.execute(PushService.java:167)
    at org.jumpmind.symmetric.service.impl.NodeCommunicationService$1.run(NodeCommunicationService.java:547)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
    at java.base/javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:148)
    at java.base/javax.crypto.CipherInputStream.read(CipherInputStream.java:261)
    at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:242)
    at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at java.base/java.util.zip.GZIPInputStream.read(GZIPInputStream.java:117)
    at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270)
    at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313)
    at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
    at java.base/java.io.InputStreamReader.read(InputStreamReader.java:177)
    at java.base/java.io.BufferedReader.fill(BufferedReader.java:162)
    at java.base/java.io.BufferedReader.readLine(BufferedReader.java:329)
    at java.base/java.io.BufferedReader.readLine(BufferedReader.java:396)
    at org.jumpmind.symmetric.service.impl.DataExtractorService.transferFromStaging(DataExtractorService.java:1284)
    ... 9 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
    at java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:862)
    at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:942)
    at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:826)
    at java.base/com.sun.crypto.provider.DESedeCipher.engineDoFinal(DESedeCipher.java:338)
    at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2152)
    at java.base/javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:145)
    ... 21 more
Steps To Reproduce1. Setup server and client
2. Stop push/pull jobs on client
3. Run heartbeat on client or server
4. View the batch contents, causing it to extract
5. Edit the file in staging and damage it
6. Run the push/pull jobs
Tagsextract

Relationships

related to 0006821 resolvedelong Batch fails with BadPaddingException and keeps retrying 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-04-15 18:31 elong New Issue
2025-04-15 18:31 elong Status new => assigned
2025-04-15 18:31 elong Assigned To => elong
2025-04-15 18:31 elong Tag Attached: extract
2025-04-15 18:31 elong Issue generated from: 0006821
2025-04-15 18:31 elong Relationship added related to 0006821
2025-04-15 18:32 elong Status assigned => resolved
2025-04-15 18:32 elong Resolution open => fixed
2025-04-15 18:32 elong Fixed in Version => 3.16.2