Deployment error - Failed to handle get file
search cancel

Deployment error - Failed to handle get file

book

Article ID: 403790

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

Deployment is failing with following error :


Failed to transfer file <source file> to agent <agent_name> to location <destination_file>
Error occurred on remote agent:
failed to handle get file from <source file> to <destination file>

 

In agent log nolio_all.log there are these lines :

2025-07-10T10:16:02.939Z [job-9-jobServer-14-6:Put File Or Folder In Remote Agent(P3.F323.E324):Put File Or Folder In Remote Agent] ERROR (com.nolio.platform.shared.executables.actions.files.PutFileInRemoteAgent:234) - Exception thrown from remote agent.
com.nolio.platform.shared.utils.FileTransferUtils$GetFileException: failed to handle get file from [/tmp/source/output.dat] to [/tmp/dest/7/output.dat]:
        at com.nolio.platform.shared.utils.FileTransferUtils.getFileFromRemoteAgent(FileTransferUtils.java:132) ~[nolio-shared-6.8.5.jar:?]
        at com.nolio.platform.shared.files.service.FileTransferCommunicationService.handlePutByFileId(FileTransferCommunicationService.java:111) ~[nolio-shared-6.8.5.jar:?]
        at com.nolio.platform.shared.files.service.FileTransferCommunicationService.innerHandle(FileTransferCommunicationService.java:92) ~[nolio-shared-6.8.5.jar:?]
        at com.nolio.platform.shared.files.service.FileTransferCommunicationService$1.run(FileTransferCommunicationService.java:62) ~[nolio-shared-6.8.5.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_332]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_332]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_332]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_332]
        at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_332]
Caused by: com.nolio.platform.shared.utils.FileTransferUtils$GetFileException: Transferring file to output.dat failed.
        at com.nolio.platform.shared.utils.FileTransferUtils.getFileFromRemoteAgent(FileTransferUtils.java:119) ~[nolio-shared-6.8.5.jar:?]
        ... 8 more
Caused by: java.nio.file.FileAlreadyExistsException: /tmp/dest/7/output.dat
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) ~[?:1.8.0_332]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_332]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_332]
        at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:243) ~[?:1.8.0_332]
        at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581) ~[?:1.8.0_332]
        at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253) ~[?:1.8.0_332]
        at java.nio.file.Files.copy(Files.java:1274) ~[?:1.8.0_332]
        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:850) ~[commons-io-2.11.0.jar:2.11.0]
        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:756) ~[commons-io-2.11.0.jar:2.11.0]
        at com.nolio.platform.shared.utils.FileTransferUtils.copyFile(FileTransferUtils.java:194) ~[nolio-shared-6.8.5.jar:?]
        at com.nolio.platform.shared.utils.FileTransferUtils.getFileFromRemoteAgent(FileTransferUtils.java:117) ~[nolio-shared-6.8.5.jar:?]
        ... 8 more
2025-07-10T10:16:02.945Z [job-9-jobServer-14-6:Put File Or Folder In Remote Agent(P3.F323.E324):Put File Or Folder In Remote Agent] INFO  (com.nolio.platform.shared.datamodel.ActionExecutionState:375) - ------------------------About to execute action [Put File Or Folder In Remote Agent(P3.F323.E324):Put File Or Folder In Remote Agent]------------------------

 

This error occurs on action "Put File Or Folder In Remote Agent"
Example :

Environment

Release Automation 6.8.x, 6.9.x
Agents on Linux

Cause

This problem occurs when 2 or more agents are copying at the same time a file to the same target file.
In above example, the agents are copying the file /tmp/source/output.dat to the same remote agent into /tmp/dest/<releaseID>/output.dat

Remote Agent starts a thread to copy the file from one agent. But if at the same time a second thread is executed to copy a file from another agent in same target filename, it fails as destination file is locked by first thread.

Resolution

A solution is to put the <Node ID> variable in target filename to make sure that target directory/file is different for all agents

Example :