Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why is build workspace sometimes deleted while running?

leegyu86 March 9, 2024

During execution, an error was reported saying that progress.log does not exist, as shown below.

 

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT/PLAN_SCRIPT/script/process/checkout_subRepos.py", line 35, in checkout_subRepos
  File "/home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT/PLAN_SCRIPT/script/common/append_description.py", line 20, in append_description
FileNotFoundError: [Errno 2] No such file or directory: 'progress.log'

 

When I connected to the server and checked, the workspace performed by the agent had been deleted.

 

The agent's log was as follows.

please help


INFO | jvm 242 | 2024/03/09 21:29:01 | 2024-03-09 21:29:01,490 INFO [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [TaskExecutorImpl] Starting task '[preprocess 8] check out sub repositories to the target revision' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
INFO | jvm 242 | 2024/03/09 21:29:01 | 2024-03-09 21:29:01,491 WARN [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [EnvironmentVariableAccessorImpl] The size of environment is 9288, make sure your build environment handles this correctly
INFO | jvm 242 | 2024/03/09 21:29:01 | 2024-03-09 21:29:01,492 INFO [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-BUILD - BUILD_JOB #2 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT-2)'\n ... running command line: \n/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent20/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT-2-ScriptBuildTask-6008075926138251910.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT\n
INFO | jvm 242 | 2024/03/09 21:29:03 | 2024-03-09 21:29:03,134 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] ExecutableQueueUpdate: addToQueue, agents known to be affected: []
INFO | jvm 242 | 2024/03/09 21:29:30 | 2024-03-09 21:29:30,204 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] ExecutableQueueUpdate: addToQueue, agents known to be affected: []
INFO | jvm 242 | 2024/03/09 21:29:32 | 2024-03-09 21:29:32,566 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] ExecutableQueueUpdate: addToQueue, agents known to be affected: []
INFO | jvm 242 | 2024/03/09 21:29:32 | 2024-03-09 21:29:32,702 INFO [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [TaskResultBuilder] Failing task since return code of [/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent20/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT-2-ScriptBuildTask-6008075926138251910.sh] was 1 while expected 0
INFO | jvm 242 | 2024/03/09 21:29:32 | 2024-03-09 21:29:32,703 INFO [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [TaskExecutorImpl] Starting task '[postprocess 1] inform dependency' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
INFO | jvm 242 | 2024/03/09 21:29:38 | 2024-03-09 21:29:38,854 ERROR [0-BAM::CICD_VEHICLE_AGENT_20::Agent:pool-5-thread-1] [TaskExecutorImpl] Error occurred while running Task '[postprocess 1] inform dependency(10)' of type com.atlassian.bamboo.plugins.scripttask:task.builder.script.
INFO | jvm 242 | 2024/03/09 21:29:38 | com.atlassian.bamboo.task.TaskException: Failed to execute task
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:63) ~[atlassian-bamboo-plugin-scripttask-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.plugins.script.task.ScriptBuildTask.execute(ScriptBuildTask.java:66) ~[atlassian-bamboo-plugin-scripttask-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:323) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:323) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:126) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:207) ~[atlassian-bamboo-agent-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:179) ~[atlassian-bamboo-agent-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:169) ~[atlassian-bamboo-agent-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118) ~[atlassian-bamboo-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:162) ~[atlassian-bamboo-agent-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:124) ~[atlassian-bamboo-agent-core-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) ~[atlassian-bamboo-api-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) ~[atlassian-bamboo-api-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) ~[atlassian-bamboo-api-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) ~[atlassian-bamboo-api-9.2.7.jar:?]
INFO | jvm 242 | 2024/03/09 21:29:38 | at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372]
INFO | jvm 242 | 2024/03/09 21:29:38 | Caused by: java.lang.IllegalArgumentException: The working directory /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT must exist before executing the process

 

1 answer

1 accepted

1 vote
Answer accepted
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 11, 2024

Hello leegyu86,

Build workspace will be deleted if you have chosen the below option for the Jobs, but this workspace will be deleted after the Job has finished executing ( either success or Failed ) not in middle of it. 

image.png

Can you explain little bit more about your scenario when did you see this error and also explain the structure of your plans. 

Regards,

Shashank Kumar

leegyu86 March 13, 2024

Sorry for the late confirmation of your reply.

I checked the option you mentioned and it was Disabled.

Also I configured linux's auditd to monitor the bamboo workspace folder.

Strangely enough, the AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT plan was not logged in auditd.

Below is the result of searching the plan in the bamboo log folder.

This problem is keeping me up overtime.
Please help me.

 

[root@aescmapp04 /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/logs]# grep -rnI AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT .
./atlassian-bamboo.log.1:92249:2024-01-19 17:29:32,991 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log.1:92250:2024-01-19 17:29:32,991 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log.1:473432:2024-02-17 12:36:41,827 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteAgentWorkspaceManagerImpl] Removing obsolete workspace for VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:266532:2024-03-04 11:26:19,199 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:266533:2024-03-04 11:26:19,199 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-3] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log:268663:2024-03-04 12:52:19,146 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:268664:2024-03-04 12:52:19,146 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-7] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log:271530:2024-03-04 12:58:55,489 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteAgentWorkspaceManagerImpl] Removing obsolete workspace for VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:277931:2024-03-04 13:19:38,988 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:277932:2024-03-04 13:19:38,988 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-9] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log:282167:2024-03-04 16:02:20,869 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteAgentWorkspaceManagerImpl] Removing obsolete workspace for VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:391174:2024-03-09 20:51:03,808 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:391175:2024-03-09 20:51:03,808 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-7] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log:392281:2024-03-09 23:14:35,663 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteAgentWorkspaceManagerImpl] Removing obsolete workspace for VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:463755:2024-03-13 22:16:53,295 INFO [remoteEventRebroadcasterMessageListenerContainerLongLived-1] [RemoteEventRebroadcasterMessageListener] com.atlassian.bamboo.event.BuildDeletedEvent[source=null] job=VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:463756:2024-03-13 22:16:53,295 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-4] [RemoteAgentWorkspaceManagerImpl] Workspace VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT is no longer in use. It will be removed at the next opportunity.
./atlassian-bamboo.log:463774:2024-03-13 22:22:07,815 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [BuildAgentControllerImpl] Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) taken from queue.
./atlassian-bamboo.log:463775:2024-03-13 22:22:07,831 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) assigned to agent 156139573
./atlassian-bamboo.log:463776:2024-03-13 22:22:07,848 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [DefaultBuildAgent] Changing context: null -> VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1 on CICD_VEHICLE_AGENT_15/6f962245
./atlassian-bamboo.log:463777:2024-03-13 22:22:07,900 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [BuildAgentControllerImpl] Build Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) is being prepared for building on agent CICD_VEHICLE_AGENT_15, bamboo version: 9.2.7
./atlassian-bamboo.log:463780:2024-03-13 22:22:07,901 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) VCS sync started
./atlassian-bamboo.log:463781:2024-03-13 22:22:07,935 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [CheckoutDirectoriesSnapshotHelper] Build working directory is /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT
./atlassian-bamboo.log:463783:2024-03-13 22:22:07,936 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [PrepareBuildTask] Executing build Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)
./atlassian-bamboo.log:463785:2024-03-13 22:22:07,937 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [CleanWorkingDirectoryTask] Cleaning working directory '/home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT'
./atlassian-bamboo.log:463789:2024-03-13 22:22:07,939 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [PrepareBuildTask] Build Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) started building on agent 'CICD_VEHICLE_AGENT_15' (Remote agent on aescmapp04 CICD_VEHICLE_AGENT_15)
./atlassian-bamboo.log:463791:2024-03-13 22:22:07,939 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ExecuteBuildTask] Starting execution: VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1, logger: 1214825463
./atlassian-bamboo.log:463792:2024-03-13 22:22:07,939 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) execution started
./atlassian-bamboo.log:463795:2024-03-13 22:22:07,977 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-5027392812213069454.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463798:2024-03-13 22:22:20,338 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-2921917006128431442.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463801:2024-03-13 22:22:21,340 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-9156185043247633936.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463804:2024-03-13 22:22:22,129 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-2718954282654229122.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463808:2024-03-13 22:22:22,465 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-5391568561020502893.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463811:2024-03-13 22:22:26,792 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-1871788283120142199.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463815:2024-03-13 22:23:25,430 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build 'Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1)'\n ... running command line: \n/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-646330145406559475.sh\n ... in: /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT\n
./atlassian-bamboo.log:463819:2024-03-13 22:23:57,819 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [TaskResultBuilder] Failing task since return code of [/bin/sh /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1-ScriptBuildTask-646330145406559475.sh] was 1 while expected 0
./atlassian-bamboo.log:463841:Caused by: java.lang.IllegalArgumentException: The working directory /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT must exist before executing the process
./atlassian-bamboo.log:463869:Caused by: java.lang.IllegalArgumentException: The working directory /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT must exist before executing the process
./atlassian-bamboo.log:463897:Caused by: java.lang.IllegalArgumentException: The working directory /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT must exist before executing the process
./atlassian-bamboo.log:463914:2024-03-13 22:24:04,717 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [BuildArtifactPostProcessor] Copying the build artifacts for build: VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1
./atlassian-bamboo.log:463915:2024-03-13 22:24:04,717 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) execution finished
./atlassian-bamboo.log:463916:2024-03-13 22:24:04,749 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [AbstractArtifactManager] Publishing [LogsFromBambooAgent] for VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1: 1 file(s) matching [plan-172955907-RJT-1.log] in directory /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15/temp/log_spool, excluding []
./atlassian-bamboo.log:463921:2024-03-13 22:24:04,827 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [RemoteResultProcessor] Build Vehicle Electronics SW - SCM-MCU_SG2_EV-MCU_SG2_EV-PR-62-RV - REQUIREMENT_JOB #1 (VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1) completed on Bamboo agent. Sending results to server.
./atlassian-bamboo.log:463924:2024-03-13 22:24:04,907 INFO [0-BAM::CICD_VEHICLE_AGENT_15::Agent:pool-5-thread-1] [DefaultBuildAgent] Changing context: VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2SKY-RJT-1 -> null on CICD_VEHICLE_AGENT_15/6f962245

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2024

Hello leegyu86,

Can you provide the build working directory of your agent ? this information can be seen in bamboo-agent.cfg.xml file under <buildWorkingDirectory</buildWorkingDirectory> properties. 

Also in your script task what values you have in your Working subdirectory values, can you recheck if that's correct ?

Regards,

Shashank Kumar

leegyu86 March 16, 2024

I'm sorry for checking back so late. I will definitely check the alarm.


Below is the result of outputting the configuration file using the cat command.

 

working subdirectory is blank

 

[root@aescmapp04 /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15]# cat bamboo-agent.cfg.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration>
<buildWorkingDirectory>/home/cicd_vehicle/bamboo_agent_home/WORKSPACE</buildWorkingDirectory>
<agentUuid>2f43e4a5-50e8-4e70-8976-5b685f92e9fe</agentUuid>
<agentDefinition>
<id>156139573</id>
<name>CICD_VEHICLE_AGENT_15</name>
<description>Remote agent on aescmapp04 CICD_VEHICLE_AGENT_15</description>
</agentDefinition>
</configuration>


[root@aescmapp04 /home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15]# cat conf/wrapper.conf | grep -E -i '^[^#]'
wrapper.java.command=/usr/bin/java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/bamboo-agent-bootstrap.jar
wrapper.java.library.path.1=../lib
wrapper.java.additional.1=-Dbamboo.home=/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent15
wrapper.java.additional.2=-Dbamboo.agent.ignoreServerCertName=false
wrapper.java.additional.3=-Dbamboo.allow.empty.artifacts=false
wrapper.java.additional.5=-Dsun.jnu.encoding=utf-8
wrapper.java.additional.4=-Dfile.encoding=utf-8
wrapper.app.parameter.1=com.atlassian.bamboo.agent.bootstrap.AgentBootstrap
wrapper.app.parameter.2=https://bamboo.autoever.com/agentServer/
wrapper.app.parameter.3=
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.default=RESTART
wrapper.java.initmemory=256
wrapper.java.maxmemory=1024
wrapper.working.dir=.
wrapper.console.format=LPTM
wrapper.console.loglevel=INFO
wrapper.console.flush=true
wrapper.logfile=../atlassian-bamboo-agent.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=10m
wrapper.logfile.maxfiles=10
wrapper.syslog.loglevel=INFO
wrapper.successful_invocation_time=3
wrapper.max_failed_invocations=1440
wrapper.console.title=Bamboo Remote Agent
wrapper.java.version.min=8
wrapper.java.version.max=11
wrapper.java.version.fallback=8
wrapper.name=bamboo-remote-agent
wrapper.displayname=Bamboo Remote Agent
wrapper.description=A remote agent for building Bamboo build plans.
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=FALSE

 

 

leegyu86 March 17, 2024

The following events were confirmed with auditd.

 

time->Mon Mar 18 14:21:25 2024
type=PROCTITLE msg=audit(1710739285.943:7626410): proctitle=2F7573722F6C69622F6A766D2F6A6176612D312E382E302D6F70656E6A646B2D312E382E302E3337322E6230372D312E656C385F372E7838365F36342F6A72652F62696E2F6A617661002D4462616D626F6F2E686F6D653D2F686F6D652F636963645F76656869636C652F62616D626F6F5F6167656E745F686F6D652F636963
type=PATH msg=audit(1710739285.943:7626410): item=1 name="/home/cicd_vehicle/bamboo_agent_home/WORKSPACE/repositoryData/VES-AIVIDEP2FKAZF6TKDKVPU2SKHKJAVISKPJZPTETSEH5SGK5TFNRXXAP2UIMZTQN27JVBVKP2CKVEUYRA-MJT.xml" inode=36044903 dev=08:00 mode=0100644 ouid=1003 ogid=1004 rdev=00:00 nametype=DELETE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1710739285.943:7626410): item=0 name="/home/cicd_vehicle/bamboo_agent_home/WORKSPACE/repositoryData/" inode=36044801 dev=08:00 mode=040755 ouid=1003 ogid=1004 rdev=00:00 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(1710739285.943:7626410): cwd="/home/cicd_vehicle/bamboo_agent_home/cicd_vehicle_agent06/bin"
type=SYSCALL msg=audit(1710739285.943:7626410): arch=c000003e syscall=87 success=yes exit=0 a0=7f14c81ee0b0 a1=7f14c8000cd8 a2=0 a3=6 items=2 ppid=2389 pid=3620998 auid=4294967295 uid=1003 gid=1004 euid=1003 suid=1003 fsuid=1003 egid=1004 sgid=1004 fsgid=1004 tty=(none) ses=4294967295 comm="0-BAM::CICD_VEH" exe="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.372.b07-1.el8_7.x86_64/jre/bin/java" key="scm_event"

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2024

Hello ,

Your Build directory is /home/cicd_vehicle/bamboo_agent_home/WORKSPACE

initial build directory which you highlighted /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT/PLAN_SCRIPT/script/process/checkout_subRepos.py

Here VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT will be your Job key.

Ideally even if the build fails as per your setting /home/cicd_vehicle/bamboo_agent_home/WORKSPACE/VES-AKNBU2P2NINKV6U2HGJPUKVR7MRSXMZLMN5YD6TKDKVPVGRZSL5CVMP2CKVEUYRA-BJT directory should not be deleted.

At this point I am not clear what is the issue, even the audit logs which you have pasted is not for this folder.

You can try few thing like try to disable all the task and enable them one by one and run the build and try to identify in which task the build fails and the directory gets deleted, this will give you some idea to fix it.

At this stage I think it will be better if you can raise a ticket with Bamboo support team where this can be checked better.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events