java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '2', plan 'SVN-SUB-JOB1': svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked.

Atlassian JIRA | Bruno Rosa | 4 months ago
  1. 0

    h3. Summary If we start a build but then choose to stop the build while it's in the middle of the _Source Code Checkout_, Bamboo leaves the SVN working copy in a locked state and therefore the next time we start the build, it will fail with the {{"svn: E155004"}} error stating the directory is locked. It would be nice if Bamboo could clean up the working copy after stopping a build or if the build was interrupted to avoid this problem. h3. Steps to Reproduce # Run a build configured to checkout code from a [Subversion|https://confluence.atlassian.com/display/BAMBOO/Subversion] repository. # Stop build while Bamboo is executing the _Source Code Checkout_ task. # Start a new build. h3. Expected Results The new build should run without any problems. h3. Actual Results The new build fails with the following exception: {noformat} error 01-Aug-2016 17:46:39 Error occurred while running Task 'Checkout Default Repository(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout. error 01-Aug-2016 17:46:39 java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '2', plan 'SVN-SUB-JOB1': svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked error 01-Aug-2016 17:46:39 svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked. error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:145) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$125(TaskExecutorImpl.java:273) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) error 01-Aug-2016 17:46:39 at java.lang.Thread.run(Thread.java:745) error 01-Aug-2016 17:46:39 Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '2', plan 'SVN-SUB-JOB1': svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked error 01-Aug-2016 17:46:39 svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked. error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:627) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:280) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$000(VcsCheckoutTask.java:57) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:150) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:146) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) error 01-Aug-2016 17:46:39 ... 20 more error 01-Aug-2016 17:46:39 Caused by: org.tmatesoft.svn.core.SVNException: svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked error 01-Aug-2016 17:46:39 svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked. error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb$WCLockObtain.transaction(SVNWCDb.java:5722) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.db.SVNSqlJetDb.runTransaction(SVNSqlJetDb.java:256) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.db.SVNSqlJetDb.runTransaction(SVNSqlJetDb.java:250) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.obtainWCLock(SVNWCDb.java:5655) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc17.SVNWCContext.acquireWriteLock(SVNWCContext.java:1632) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:106) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:38) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291) error 01-Aug-2016 17:46:39 at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.repository.svn.SvnRepository.update(SvnRepository.java:1315) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithException(SvnRepository.java:735) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithCleanup(SvnRepository.java:661) error 01-Aug-2016 17:46:39 at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:604) error 01-Aug-2016 17:46:39 ... 25 more {noformat} h3.Workaround It is necessary to manually clear the SVN working copy for the failing plan at *$BAMBOO_HOME/xml-data/build-dir/PROJ-PLAN-JOB1* to be able to start new builds. Update and [clean|http://www.tigris.org/nonav/scdocs/ddUsingSVN_command-line.html.en#svnclean] your working copy: {noformat} svn update svn cleanup {noformat}

    Atlassian JIRA | 4 months ago | Bruno Rosa
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '2', plan 'SVN-SUB-JOB1': svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked.
  2. 0

    Jenkin SVN plugin failed when removing files (Checksum mistmatch)

    Stack Overflow | 4 years ago | Hoàng Long
    org.tmatesoft.svn.core.SVNException: svn: E155017: Checksum mismatch while updating '/var/lib/jenkins/jobs/aaa/workspace/src/main/address/.svn/text-base/StudioSignUpController.java.svn-base'; expected: '39fc987bbeb8cd332e6b94abfb934720', actual: 'e9fa300ee28a2b1e15b2273f4b14ae18'
  3. 0

    Update to 1.386 breaks Subversion https access

    Google Groups | 6 years ago | Ansgar Berhorn
    org.tmatesoft.svn.core.SVNException: svn: Negotiate authentication failed: 'No valid credentials provided'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JENKINS-25239] Subversion SCM plugin fails to do an svn update - Jenkins JIRA

    jenkins-ci.org | 8 months ago
    org.tmatesoft.svn.core.SVNException: svn: E175002: OPTIONS /amplify_tfe/branches/HF failed
  6. 0

    Due to new svnkit in Hudson, we've stucked with update failures on some node (debian). It looks like this: ====================== started Building remotely on deb4 APS catalog Updating svn://ofsvn.plesk.ru:3693/apscatalog/trunk ERROR: Failed to update svn://ofsvn.plesk.ru:3693/apscatalog/trunk org.tmatesoft.svn.core.SVNException: svn: Network connection closed unexpectedly at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40) at org.tmatesoft.svn.core.internal.io.svn.SVNReader.readChar(SVNReader.java:559) at org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:293) at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.handshake(SVNConnection.java:103) at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:62) at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:974) at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getDatedRevision(SVNRepositoryImpl.java:159) at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:346) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:159) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:382) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:354) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1093) at hudson.remoting.UserRequest.perform(UserRequest.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:23) at hudson.remoting.Request$2.run(Request.java:200) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) ====================== however, executing the same 'svn up' command with shell on the node works well. I have no idea about the reasons for now, cos other nodes does not fail (with same SVN version there). I had to downgrade Hudson to 1.201 - everything goes fine. More info: SVN version: =========== >svn --version svn, version 1.4.2 (r22196) compiled Nov 10 2006, 17:39:50 =========== Hudson version: 1.204

    Jenkins JIRA | 9 years ago | jazzjack
    org.tmatesoft.svn.core.SVNException: svn: Network connection closed unexpectedly

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.tmatesoft.svn.core.SVNException

      svn: E155004: Working copy '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' locked svn: E155004: '/Users/bamboo/Documents/Atlassian/bamboo/bamboo-5.10.3/home/xml-data/build-dir/163841/SVN-SUB-JOB1' is already locked.

      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error()
    2. SVNKit Library
      SVNUpdateClient.doUpdate
      1. org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
      2. org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
      3. org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb$WCLockObtain.transaction(SVNWCDb.java:5722)
      4. org.tmatesoft.svn.core.internal.db.SVNSqlJetDb.runTransaction(SVNSqlJetDb.java:256)
      5. org.tmatesoft.svn.core.internal.db.SVNSqlJetDb.runTransaction(SVNSqlJetDb.java:250)
      6. org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.obtainWCLock(SVNWCDb.java:5655)
      7. org.tmatesoft.svn.core.internal.wc17.SVNWCContext.acquireWriteLock(SVNWCContext.java:1632)
      8. org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:106)
      9. org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:38)
      10. org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
      11. org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
      12. org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
      13. org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
      14. org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      15. org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
      16. org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
      17. org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
      17 frames
    3. com.atlassian.bamboo
      ImpersonationHelper$1.run
      1. com.atlassian.bamboo.repository.svn.SvnRepository.update(SvnRepository.java:1315)
      2. com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithException(SvnRepository.java:735)
      3. com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCodeWithCleanup(SvnRepository.java:661)
      4. com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:604)
      5. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:280)
      6. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$000(VcsCheckoutTask.java:57)
      7. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:150)
      8. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:146)
      9. com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
      10. com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
      11. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203)
      12. com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188)
      13. com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:145)
      14. com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$125(TaskExecutorImpl.java:273)
      15. com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202)
      16. com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273)
      17. com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:83)
      18. com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74)
      19. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215)
      20. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
      21. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
      22. com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
      23. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
      24. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137)
      25. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      26. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      27. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      28. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      28 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame