In this scenario, we have an integration of Release Automation(RA) with Team-city build definition under post build task where on completion of Team-city build a Release will be triggered in RA. In the build definition of Team-city the artifacts are getting store in Team-city artifactory and same will be used in RA releases as an artifacts.
Problem faced in above scenario is that, the releases executed are pause-failed/halt intermittently in the stage of "Artifact distribution" and on resuming same halted releases progresses fine and artifact distribution complete successfully.
During review of logs of agents, we identified that the issue is lying within Team-city artifactory where the uploaded artifacts during Team-city build is not getting index ready by time RA agents (agents responsible for distribution of artifacts) are making a download request to Team-city artifactory.
We identified the same from the logs (nolio_all.log) which during failed-paused state throws HTTP 404 error which on resume goes fine.
2017-09-19 04:45:53,843 [ArtifactsHandlers-4] INFO (com.nolio.platform.shared.communication.services.artifacts.repositoryplugins.ArtifactRepositoryPlugin:231) - Artifact [/20/Test_Service_EAR/test-33/EAR-test-33.zip] was not found in the repository [https://NAC-URL:NAC-Port/nexus/content/repositories/nolio]. response was [HTTP/1.1 404 Not Found]
2017-09-19 04:45:53,845 [ArtifactsHandlers-4] DEBUG (com.nolio.platform.shared.communication.services.artifacts.ArtifactCommunicationService:318) - Artifact [/20/Test_Service_EAR/test-33/EAR-test-33.zip] was not found in the repository, It will be uploaded to the repository after it's retrieved.
To overcome this issue, where newly created/uploaded artifacts are not yet indexed ready in Team-city repository a delay in execution of Release can be introduced either at Team-city end or at Release Automation process(mapped in release) end making sure the indexed are ready before a GET request for same is made by RA agents.