Open amm123 opened 7 months ago
I can report the same issue after installing the JFrog for Bamboo plugin on my Atlassian Bamboo DC environment 3 days ago. The directory has the correct permissions for the user "agent".
It is happening on all the OSs used by our build/testing plans:
java.nio.file.AccessDeniedException: /home/agent/bamboo-agent-home/temp
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:313)
at java.base/java.nio.file.Files.createDirectories(Files.java:762)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpDir(BambooUtils.java:45)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpSubdir(BambooUtils.java:58)
at org.jfrog.bamboo.PostBuildAction.call(PostBuildAction.java:36)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:71)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.access$000(PostBuildCompletedEventListener.java:17)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.lambda$run$1(PostBuildCompletedEventListener.java:55)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.run(PostBuildCompletedEventListener.java:55)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:107)
at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:31)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:49)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:38)
at jdk.internal.reflect.GeneratedMethodAccessor2237.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.bamboo.event.spi.BambooEventDispatcher.dispatch(BambooEventDispatcher.java:34)
at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:114)
at com.atlassian.bamboo.event.TxAwareEventPublisher.publish(TxAwareEventPublisher.java:20)
at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:143)
at com.atlassian.bamboo.v2.build.agent.LocalResultProcessorImpl.processResult(LocalResultProcessorImpl.java:30)
at com.atlassian.bamboo.v2.build.agent.messages.ProcessResult.deliver(ProcessResult.java:20)
at com.atlassian.bamboo.v2.build.agent.messages.BatchRemoteBambooMessage.deliver(BatchRemoteBambooMessage.java:39)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageDeliverer.deliverObject(BambooAgentMessageDeliverer.java:11)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener$1.run(BambooAgentMessageListener.java:49)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.onMessage(BambooAgentMessageListener.java:40)
at com.atlassian.bamboo.v2.build.agent.ParallelizingMessageListener.lambda$onMessage$0(ParallelizingMessageListener.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
at java.base/java.lang.Thread.run(Thread.java:829)
java.nio.file.AccessDeniedException: /C:\Users\agent\bamboo-agent-home\temp
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
at java.base/java.nio.file.Files.createDirectory(Files.java:690)
at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797)
at java.base/java.nio.file.Files.createDirectories(Files.java:783)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpDir(BambooUtils.java:45)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpSubdir(BambooUtils.java:58)
at org.jfrog.bamboo.PostBuildAction.call(PostBuildAction.java:36)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:71)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.access$000(PostBuildCompletedEventListener.java:17)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.lambda$run$1(PostBuildCompletedEventListener.java:55)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.run(PostBuildCompletedEventListener.java:55)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:107)
at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:31)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:49)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:38)
at jdk.internal.reflect.GeneratedMethodAccessor2237.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.bamboo.event.spi.BambooEventDispatcher.dispatch(BambooEventDispatcher.java:34)
at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:114)
at com.atlassian.bamboo.event.TxAwareEventPublisher.publish(TxAwareEventPublisher.java:20)
at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:143)
at com.atlassian.bamboo.v2.build.agent.LocalResultProcessorImpl.processResult(LocalResultProcessorImpl.java:30)
at com.atlassian.bamboo.v2.build.agent.messages.ProcessResult.deliver(ProcessResult.java:20)
at com.atlassian.bamboo.v2.build.agent.messages.BatchRemoteBambooMessage.deliver(BatchRemoteBambooMessage.java:39)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageDeliverer.deliverObject(BambooAgentMessageDeliverer.java:11)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener$1.run(BambooAgentMessageListener.java:49)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.onMessage(BambooAgentMessageListener.java:40)
at com.atlassian.bamboo.v2.build.agent.ParallelizingMessageListener.lambda$onMessage$0(ParallelizingMessageListener.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
at java.base/java.lang.Thread.run(Thread.java:829)
java.nio.file.AccessDeniedException: /Users
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
at java.base/java.nio.file.Files.createDirectory(Files.java:690)
at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797)
at java.base/java.nio.file.Files.createDirectories(Files.java:783)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpDir(BambooUtils.java:45)
at org.jfrog.bamboo.utils.BambooUtils.getJfrogTmpSubdir(BambooUtils.java:58)
at org.jfrog.bamboo.PostBuildAction.call(PostBuildAction.java:36)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:71)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.access$000(PostBuildCompletedEventListener.java:17)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.lambda$run$1(PostBuildCompletedEventListener.java:55)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener$1.run(PostBuildCompletedEventListener.java:55)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:107)
at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:31)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performAction(PostBuildCompletedEventListener.java:49)
at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:38)
at jdk.internal.reflect.GeneratedMethodAccessor2237.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.bamboo.event.spi.BambooEventDispatcher.dispatch(BambooEventDispatcher.java:34)
at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:114)
at com.atlassian.bamboo.event.TxAwareEventPublisher.publish(TxAwareEventPublisher.java:20)
at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:143)
at com.atlassian.bamboo.v2.build.agent.LocalResultProcessorImpl.processResult(LocalResultProcessorImpl.java:30)
at com.atlassian.bamboo.v2.build.agent.messages.ProcessResult.deliver(ProcessResult.java:20)
at com.atlassian.bamboo.v2.build.agent.messages.BatchRemoteBambooMessage.deliver(BatchRemoteBambooMessage.java:39)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageDeliverer.deliverObject(BambooAgentMessageDeliverer.java:11)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener$1.run(BambooAgentMessageListener.java:49)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.onMessage(BambooAgentMessageListener.java:40)
at com.atlassian.bamboo.v2.build.agent.ParallelizingMessageListener.lambda$onMessage$0(ParallelizingMessageListener.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
at java.base/java.lang.Thread.run(Thread.java:829)
Hello @amm123 & @eresende-nuodb,
Thank you for utilizing the JFrog Bamboo Plugin!
I'm currently working on addressing the reported issue and would greatly appreciate your assistance in providing some additional details:
I attempted to replicate this issue using:
And the issue did not manifest.
Your cooperation is greatly appreciated.
I am running the remote agents in a docker container as well on it own hosts, I think having the two server one for bamboo and another for the agents is key to reprduce this issue since the server is trying to reach the agent directory on its hosts and clean it up.
this error is on bamboo server ui and I cannot find any mention of this error in the agent logs.
let me know if this help, or if you need more info?
Hello @amm123,
I appreciate the information you've provided. Unfortunately, despite setting up both the server and agent in isolated Docker containers, I still couldn't replicate the issue. Please contact JFrog Support and share the link to this Github issue, in order to allow us to better investigate the issue and solve it.
Hi @amm123
Sorry for the late reply and I appreciate your help on this issue. I'm in contact with JFrog support trying to troubleshoot this issue. I was successful in replicating the error on a docker based set up. This error only happens if a task runs on a remote agent. Local agents work fine. I trimmed down the culprit to the PostBuildAction module. When this specific module disabled in bamboo, the error goes away.
Link to the jFrog support ticket: https://support.jfrog.com/s/tickets/500Tc000004YIoG/jfrog-for-bamboo-plugin-error-null-custom-build-post-complete-action-failed-to-run
Hope this helps. Thanks.
Hi @eresende-nuodb, thanks a lot for the help.
Hey @amm123,
We just released version 1.0.4, which should fix this issue. Please let us know if it works for you!
Thank you for your contribution.
Describe the bug after installing the plugin we get a "null custom build post complete action failed to run" regardless it use the jfrog task or not.
maybe it is only does happen on remote agents since we are not use any local agent since they are going away. To Reproduce run any plan in bamboo after installing the plugin (as said before we are using remote agents) and you will see:
Expected behavior no errors.
Screenshots
Versions