Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Could not create file: C:\Program Files\Bamboo1\temp\bamboo-ssh.41538fd5.bat)

Miracle Atlassian Central Account
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2016

Hi, I am trying to setting up Bamboo 5.10 on a windows 8.  I have installed Git on the remote agent, and I have created sample application where I'm trying to pull the repo from Git/Bitbucket and build using Ant, here I'm getting  this error " Could not create file: C:\Program Files\Bamboo1\temp\bamboo-ssh.41538fd5.bat)" while I'm trying to run this my application

Here is the full output message :

com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: java.io.IOException: Could not create file: C:\Program Files\Bamboo1\temp\bamboo-ssh.41538fd5.bat
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.checkGitExistenceInSystem(GitCommandProcessor.java:216)
	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.<init>(NativeGitOperationHelper.java:92)
	at com.atlassian.bamboo.plugins.git.GitOperationHelperFactory.createGitOperationHelper(GitOperationHelperFactory.java:25)
	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:247)
	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:237)
	at com.atlassian.bamboo.plugins.bitbucket.BitbucketRepository.collectChangesSinceLastBuild(BitbucketRepository.java:317)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:553)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.lambda$createBuildRepositoryChanges$96(DefaultChangeDetectionManager.java:424)
	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:359)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:307)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:199)
	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:156)
	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:172)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:248)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:301)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:237)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy154.delayedStart(Unknown Source)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.lambda$call$82(PlanExecutionManagerImpl.java:426)
	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:134)
	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:130)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:163)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:129)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:194)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:425)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1$1.call(PlanExecutionManagerImpl.java:416)
	at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:796)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$400(PlanExecutionManagerImpl.java:128)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$2$1.run(PlanExecutionManagerImpl.java:410)
	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.IOException: Could not create file: C:\Program Files\Bamboo1\temp\bamboo-ssh.41538fd5.bat
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getSshScriptToRun(GitCommandProcessor.java:127)
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.createCommandBuilder(GitCommandProcessor.java:512)
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor$1.load(GitCommandProcessor.java:177)
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor$1.load(GitCommandProcessor.java:171)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.checkGitExistenceInSystem(GitCommandProcessor.java:206)
	... 45 more
Caused by: java.io.IOException: Could not create file: C:\Program Files\Bamboo1\temp\bamboo-ssh.41538fd5.bat
	at com.atlassian.bamboo.util.SecureTemporaryFiles.createSecureTempFile(SecureTemporaryFiles.java:274)
	at com.atlassian.bamboo.util.SecureTemporaryFiles.create(SecureTemporaryFiles.java:213)
	at com.atlassian.bamboo.util.SharedTemporaryFiles.createTempFile(SharedTemporaryFiles.java:162)
	at com.atlassian.bamboo.util.SharedTemporaryFiles.access$200(SharedTemporaryFiles.java:19)
	at com.atlassian.bamboo.util.SharedTemporaryFiles$1.load(SharedTemporaryFiles.java:156)
	at com.atlassian.bamboo.util.SharedTemporaryFiles$1.load(SharedTemporaryFiles.java:152)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
	at com.atlassian.bamboo.util.SharedTemporaryFiles.create(SharedTemporaryFiles.java:216)
	at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getSshScriptToRun(GitCommandProcessor.java:122)
	... 56 more
Caused by: java.io.IOException: Access is denied
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(Unknown Source)
	at com.atlassian.bamboo.util.SecureTemporaryFiles.createSecureTempFile(SecureTemporaryFiles.java:270)
	... 70 more

 

2 answers

1 vote
tumbonea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2017

SOLVED!

Bamboo Build Server installed on a Windows 8 personal computer.

I managed to solve this by trying the second step suggested on this solution: https://community.atlassian.com/t5/Bamboo-questions/Re-Bamboo-Build-Fails/qaq-p/378776/comment-id/11883#M11883

1) Open "Start-Menu > Bamboo", right click on "Start in Console" then click "More > Open File Location"

2) Inside the directory, right click "Start in Console" then click "Run as Administrator"

Your bamboo server will then run with the required permissions to read/write inside the folder causing this issue.

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2016

Check if Bamboo Agent process has permissions to C:\Program Files\Bamboo1\temp folder

Deleted user May 23, 2016

How do you do that ?

Deleted user May 24, 2016

Its OK I worked it out.  Right click on directory -> properties -> security -> select ALL APPLICATION PACKAGES -> edit -> and allow read write access. Solved the issue for me.

0195santhiyam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2017
com.atlassian.bamboo.repository.RepositoryException : java.lang.RuntimeException: java.io.IOException: Could not create file: C:\Program Files\Bamboo\temp\bamboo-ssh.41538fd5.bat):-
                                By following the above steps I couldn't able to solve this issue.Can you plz elaborate

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events