View Issue Details

IDProjectCategoryView StatusLast Update
0006292SymmetricDSImprovementpublic2024-04-19 15:46
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.15.0 
Target Version3.15.4Fixed in Version3.15.4 
Summary0006292: File sync BeanShell script should place files in a separate error directory if they are not writable
DescriptionWhen copying files to their target directory during file sync, if a file has strict permissions or is held open by another process, it's possible for the following exception to occur:

Failed to process file sync for batch [batch ID] StackTraceKey.init [IllegalArgumentException:2749692757] java.lang.IllegalArgumentException: File parameter 'destFile is not writable: [file name]
    at org.apache.commons.io.FileUtils.requireCanWrite(FileUtils.java:2725)
    at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:809)
    at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:773)
    at jdk.internal.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at bsh.Reflect.invokeMethod(Reflect.java:131)
    at bsh.Reflect.invokeStaticMethod(Reflect.java:95)
    at bsh.Name.invokeMethod(Name.java:868)
    at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:69)
    at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:96)
    at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:41)
    at bsh.BSHBlock.evalBlock(BSHBlock.java:125)
    at bsh.BSHBlock.eval(BSHBlock.java:75)
    at bsh.BSHBlock.eval(BSHBlock.java:41)
    at bsh.BSHIfStatement.eval(BSHIfStatement.java:45)
    at bsh.BSHBlock.evalBlock(BSHBlock.java:125)
    at bsh.BSHBlock.eval(BSHBlock.java:75)
    at bsh.BSHBlock.eval(BSHBlock.java:41)
    at bsh.BSHIfStatement.eval(BSHIfStatement.java:42)
    at bsh.BSHBlock.evalBlock(BSHBlock.java:125)
    at bsh.BSHBlock.eval(BSHBlock.java:75)
    at bsh.BSHBlock.eval(BSHBlock.java:41)
    at bsh.BSHIfStatement.eval(BSHIfStatement.java:42)
    at bsh.Interpreter.eval(Interpreter.java:659)
    at bsh.Interpreter.eval(Interpreter.java:750)
    at bsh.Interpreter.eval(Interpreter.java:739)
    at org.jumpmind.symmetric.service.impl.FileSyncService.processZip(FileSyncService.java:1014)
    at org.jumpmind.symmetric.service.impl.FileSyncService.pullFilesFromNode(FileSyncService.java:1118)
    at org.jumpmind.symmetric.service.impl.FileSyncService.execute(FileSyncService.java:869)
    at org.jumpmind.symmetric.service.impl.NodeCommunicationService$1.run(NodeCommunicationService.java:544)
    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)

If this exception occurs, file sync gets stuck in error. There is nothing SymmetricDS can do about this exception, so manual intervention is required. It would be better to catch the exception, write the file to a separate error directory within staging, and describe what happened in an error-level log message.
Tagsfile sync

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.15 70d325f1

2024-03-14 18:34:11

evan-miller-jumpmind

Details Diff
0006292: Made file sync BeanShell script place files in a separate error directory if they are not writable Affected Issues
0006292
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/file/BeanShellFileSyncZipScript.java Diff File

Issue History

Date Modified Username Field Change
2024-03-14 18:18 emiller New Issue
2024-03-14 18:18 emiller Status new => assigned
2024-03-14 18:18 emiller Assigned To => emiller
2024-03-14 18:18 emiller Tag Attached: file sync
2024-03-14 18:18 emiller Project SymmetricDS Pro => SymmetricDS
2024-03-14 18:34 emiller Status assigned => resolved
2024-03-14 18:34 emiller Resolution open => fixed
2024-03-14 18:34 emiller Fixed in Version => 3.15.4
2024-03-19 16:20 admin Status resolved => closed
2024-04-19 15:46 Changeset attached => SymmetricDS 3.15 70d325f1