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

bamboo + perforce: no output for {p4 command}

mdurant32 June 16, 2014

I've been using Bamboo successfully with SVN for a while now, but have recently been compelled to switch to Perforce; so I've been updating my build to accommodate it. I've hit a problem that I can't seem to resolve, though, where I can't get the build to pull the source code down from Perforce. Here's the error message I'm getting when I run the build plan:

java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve latest change number for //depot2/def/... //def/...
	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
	at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
	at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
	at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:470)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:331)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:259)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:161)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:127)
	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:173)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:206)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:259)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:195)
	at sun.reflect.GeneratedMethodAccessor1943.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy98.delayedStart(Unknown Source)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:383)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:378)
	at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:81)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:725)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$200(PlanExecutionManagerImpl.java:123)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:377)
	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55)
	at java.lang.Thread.run(Thread.java:724)
Caused by: com.atlassian.bamboo.repository.RepositoryException: Could not retrieve latest change number for //depot2/def/... //def/...
	at com.atlassian.bamboo.repository.perforce.PerforceManager.getLatestChangeNumber(PerforceManager.java:407)
	at com.atlassian.bamboo.repository.perforce.PerforceRepository.collectChangesSinceLastBuild(PerforceRepository.java:148)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:475)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:471)
	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
	... 31 more
Caused by: com.tek42.perforce.PerforceException: No output for: /home/developer/Perforce/p4 changes -m 1 -s submitted //depot2/def/... //def/... 
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:308)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:209)
	at com.tek42.perforce.parse.Changes.getChangeNumbers(Changes.java:119)
	at com.atlassian.bamboo.repository.perforce.PerforceManager.getLatestChangeNumber(PerforceManager.java:393)
	... 35 more

Part of what's confounding is that I can execute that same command (/home/developer/Perforce/p4 changes -m 1 -s submitted //depot2/def/... //def/...) as the system's "bamboo" user without a problem, and I get one line with the change number and the message of the last submit, and another line about the command assuming that that "//def/..." view is at localhost (which is true).

I'm not sure where to take this from here, so any suggestions are appreciated!

Mark

1 answer

1 accepted

0 votes
Answer accepted
mdurant32 July 9, 2014

Turns out it was a permissions problem that was corrected by changing my workspace mapping from "//depot2/def/... //def/..." to just "//depot2/def/..." and checking off the box to let Bamboo manage my workspace. All set now!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events