Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo: Deployment fails with "Unable to clean working directory"

Hello all,

Since the day we have updated to version 6.5.1, several deployments fail at the "Clean working directory task". As workaround we just rerun the same deployment. It always works on the second attempt, but it is getting really annoying.

Here is the original exception:
{noformat}
3-Sep-2018 10:14:48    Starting task 'Cleanup' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask'
03-Sep-2018 10:14:48    Cleaning working directory '/opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779'
03-Sep-2018 10:14:48    Unable to clean working directory '/opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779' /opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779
03-Sep-2018 10:14:48    Error occurred while running Task 'Cleanup(6)' of type com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask.
03-Sep-2018 10:14:48    com.atlassian.bamboo.task.TaskException: Unable to clean working directory '/opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779' /opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779
03-Sep-2018 10:14:48            at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.cleanWorkingDir(CleanWorkingDirectoryTask.java:52)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.execute(CleanWorkingDirectoryTask.java:26)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:285)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:224)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:285)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
03-Sep-2018 10:14:48            at java.lang.Thread.run(Thread.java:748)
03-Sep-2018 10:14:48    Caused by: java.nio.file.NoSuchFileException: /opt/ac/acsd/bamboo-agent-home/xml-data/build-dir/5898243-5963779
03-Sep-2018 10:14:48            at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
03-Sep-2018 10:14:48            at sun.nio.fs.UnixException.asIOException(UnixException.java:111)
03-Sep-2018 10:14:48            at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.readNextEntry(UnixDirectoryStream.java:171)
03-Sep-2018 10:14:48            at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.hasNext(UnixDirectoryStream.java:201)
03-Sep-2018 10:14:48            at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:348)
03-Sep-2018 10:14:48            at java.nio.file.Files.walkFileTree(Files.java:2706)
03-Sep-2018 10:14:48            at java.nio.file.Files.walkFileTree(Files.java:2742)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:74)
03-Sep-2018 10:14:48            at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.cleanWorkingDir(CleanWorkingDirectoryTask.java:48)
03-Sep-2018 10:14:48            ... 17 more
{noformat}

Any suggestions?

Kind regards,

Dennis

1 answer

Hi @Dennis Grassmann

I get this problem if the source directory contains file/directory names consisting of non-UTF-8 characters. Please check format character and confirm.

Thanks,

Prashnat

Hi @Prashant Mali,

I used several approaches to find any invalid names and could not even find any non-ASCII file names at all.

{code}

find . | perl -ane '{ if(m/[[:^ascii:]]/) { print } }'

LC_ALL=C find . -name '*[! -~]*'

find . | tr -d '[\200-\377]'

{code}

Any other suggestions?

Kind regards,

Dennis

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you