Upgrade Agent problem - Failed copying files to agent
search cancel

Upgrade Agent problem - Failed copying files to agent

book

Article ID: 401129

calendar_today

Updated On:

Products

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

Issue/Introduction

Upgrade of Agent is failing with message :
100% Failed copying files to agent :

On Agent in nolio_all.log we could see error like : 

2024-11-21T16:05:36.761+01:00 [FileHandlers-2] ERROR (com.nolio.platform.shared.files.service.FilesDistributionMgr:52) - failed to update file content for file [files_registry/<uuid>] to destination [files/-1975/-1975/-1975/upgradeData].
com.nolio.platform.shared.communication.postoffice.FileDownloadException: Can not delete file [/opt/CA/ReleaseAutomationAgent/files/-1975/-1975/-1975/upgradeData.nolio]
    at com.nolio.nimi.NimiPostOffice.downloadFile(NimiPostOffice.java:111) ~[nolio-nimi-6.8.0.jar:?]
    at com.nolio.platform.shared.communication.NimiCommunicationNetwork.doDownloadFile(NimiCommunicationNetwork.java:411) ~[nolio-shared-6.8.0.jar:?]
    at com.nolio.platform.shared.communication.CommunicationNetwork.downloadFile(CommunicationNetwork.java:261) ~[nolio-shared-6.8.0.jar:?]
    at com.nolio.platform.shared.files.cms.CommunicationNetworkFileGetter.getFile(CommunicationNetworkFileGetter.java:28) ~[nolio-shared-6.8.0.jar:?]
...

Caused by: java.io.FileNotFoundException: /opt/CA/ReleaseAutomationAgent/files/-1975/-1975/-1975/upgradeData.nolio (Permission denied)
    at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_72]
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316) ~[?:1.8.0_72]
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243) ~[?:1.8.0_72]
    at com.nolio.nimi.NimiPostOffice.downloadFile(NimiPostOffice.java:106) ~[nolio-nimi-6.8.0.jar:?]
    ... 12 more
2024-11-21T16:05:36.762+01:00 [FileHandlers-3] ERROR (com.nolio.platform.shared.files.service.FilesDistributionMgr:52) - failed to update file content for file [files_registry/<uuid>] to destination [files/-1975/-1975/-3004/JRE_LINUX].
com.nolio.platform.shared.communication.postoffice.FileDownloadException: Can not delete file [/opt/CA/ReleaseAutomationAgent/files/-1975/-1975/-3004/JRE_LINUX.nolio]
    at com.nolio.nimi.NimiPostOffice.downloadFile(NimiPostOffice.java:111) ~[nolio-nimi-6.8.0.jar:?]
    at com.nolio.platform.shared.communication.NimiCommunicationNetwork.doDownloadFile(NimiCommunicationNetwork.java:411) ~[nolio-shared-6.8.0.jar:?]
    at com.nolio.platform.shared.communication.CommunicationNetwork.downloadFile(CommunicationNetwork.java:261) ~[nolio-shared-6.8.0.jar:?]
    at com.nolio.platform.shared.files.cms.CommunicationNetworkFileGetter.getFile(CommunicationNetworkFileGetter.java:28) ~[nolio-shared-6.8.0.jar:?]
    at com.nolio.platform.shared.files.cms.CMSFilesDistributionMgr.updateFileContent(CMSFilesDistributionMgr.java:21) ~[nolio-shared-6.8.0.jar:?]
  at com.nolio.platform.shared.files.service.FilesDistributionMgr.handleFileLoad(FilesDistributionMgr.java:35) ~[nolio-shared-6.8.0.jar:?]

Environment

Release Automation - All Versions
Agent on Linux

Cause

User running the nolio service on the agent has not enough rights to all files or directories under <ra_home>

Resolution

Check the owner and permissions of directories and files under <ra_home>
A possible solution is to change the owner of all files and directories to user which is running the Agent :

chown -R <user_running_agent> <ra_home>