I am using streamsets pipeline to upload a file from GCS bucket to SFTP location, occasionally i am getting the below error. the error is causing due to renaming the file after uploading to the SFTP location. not sure how to fix it.
"errorCode":"REMOTE_UPLOAD_03","errorMessage":"REMOTE_UPLOAD_03 - Error happened when writing to file 'net.schmizz.sshj.sftp.SFTPException: Resource busy. Failed to temp/_tmp_testTrigger.txt to temp/testTrigger.txt because the file is currently in progress.'. Reason: {}","errorTimestamp":1667283307037,"errorStackTrace":"net.schmizz.sshj.sftp.SFTPException: Resource busy. Failed to rename temp/_tmp_testTrigger.txt to temp/testTrigger.txt because the file is currently in progress.\n\tat net.schmizz.sshj.sftp.Response.error(Response.java:140)\n\tat
in progress.\n\tat net.schmizz.sshj.sftp.Response.error(Response.java:140)\n\tat net.schmizz.sshj.sftp.Response.ensureStatusIs(Response.java:133)\n\tat net.schmizz.sshj.sftp.Response.ensureStatusPacketIsOK(Response.java:125)\n\tat net.schmizz.sshj.sftp.SFTPEngine.rename(SFTPEngine.java:245)\n\tat net.schmizz.sshj.sftp.SFTPClient.rename(SFTPClient.java:124)\n\tat net.schmizz.sshj.sftp.SFTPClient.rename(SFTPClient.java:119)\n\tat com.streamsets.pipeline.lib.remote.ChrootSFTPClient.renameInternal(ChrootSFTPClient.java:237)\n\tat com.streamsets.pipeline.lib.remote.ChrootSFTPClient.rename(ChrootSFTPClient.java:215)\n\tat com.streamsets.pipeline.lib.remote.SFTPRemoteFile.commitOutputStream(SFTPRemoteFile.java:51)\n\tat com.streamsets.pipeline.stage.destination.remote.RemoteUploadTarget.write(RemoteUploadTarget.java:123)\n\tat com.streamsets.pipeline.api.base.configurablestage.DTarget.write(DTarget.java:34)\n\tat com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:291)\n\tat com.streamsets.pipeline.api.impl.CreateByRef.call(CreateByRef.java:40)\n\tat com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:232)\n\tat com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:299)\n\tat com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:209)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processPipe(ProductionPipelineRunner.java:859)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.lambda$executeRunner$3(ProductionPipelineRunner.java:903)\n\tat com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:195)\n\tat com.streamsets.datacollector.runner.PipeRunner.forEachInternal(PipeRunner.java:140)\n\tat com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:120)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.executeRunner(ProductionPipelineRunner.java:902)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runSourceLessBatch(ProductionPipelineRunner.java:880)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runPollSource(ProductionPipelineRunner.java:602)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.run(ProductionPipelineRunner.java:388)\n\tat com.streamsets.datacollector.runner.Pipeline.run(Pipeline.java:525)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipeline.run(ProductionPipeline.java:100)\n\tat com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunnable.run(ProductionPipelineRunnable.java:63)\n\tat com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.startInternal(StandaloneRunner.java:746)\n\tat com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.start(StandaloneRunner.java:739)\n\tat com.streamsets.datacollector.execution.runner.common.AsyncRunner.lambda$start$3(AsyncRunner.java:150)\n\tat com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:214)\n\tat com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:43)\n\tat com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:24)\n\tat com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:210)\n\tat com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:214)\n\tat com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:43)\n\tat com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:24)\n\tat com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:210)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\n\tat com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:88)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat