Trouble getting the Bamboo plugin to work from remote agent

Hi, I have a simple bamboo plugin called myfirstplugin, which I am trying to run from my remote agent. However I am getting the following error when I try to run the task using a remote agent. I did some googling, and it seems like I am missing the plugin to run from the remote agent.

How does a plugin that is installed on Bamboo server run from a remote agent? Does the server publish the plugin to the remote agent? Is there any dependency missing in this case? If there are any missing dependencies, how to I find out those missing dependencies?

Appreciate the help in advance.

Thanks

Could not execute task no Plugin with key ā€˜myfirstplugin.myfirstplugin:myFirstTaskā€™ is installed.

2 Likes

How does a plugin that is installed on Bamboo server run from a remote agent? Does the server publish the plugin to the remote agent? Is there any dependency missing in this case?

Your assumptions are correct - Bamboo server uploads your add-on to the remote agent, which in turn tries to install and enable it. But remote agents provide only a limited subset of the dependencies available on the server, which makes missing dependencies the most likely cause for the error you encountered.

[ā€¦] how to I find out those missing dependencies?

You need to inspect the agentā€™s log file, usually called atlassian-bamboo-agent.log. Note that you can run a remote agent on the same machine as the Bamboo server, which is probably the easiest way to analyze these kind of problems during development.

See my colleagues @sopel answer to Bamboo plugin not found on agents for more details and relevant documentation links.

2 Likes

Thank you for you response. I tried inspecting the log file on both INFO and DEBUG mode, but I canā€™t seem to find any error messages of missing dependencies. What are some of the keywords I can try searching for?

Here is the extent of the error message:
INFO Running build phase: com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask
INFO Agent:pool-3-thread-1] [ExecuteBuildTask] Starting execution: TEST-TEST-RJ-86, logger: 1994330202
INFO:Agent:pool-3-thread-1] [RemoteExecutionPhaseServiceImpl] test - test - running java #86 (TEST-TEST-RJ-86) execution started
INFO [TaskExecutorImpl] Could not execute task no Plugin with key ā€˜myfirstplugin.myfirstplugin:myFirstTaskā€™ is installed.

Iā€™m also getting this error message. Any idea what this could mean?

ERROR [ThreadPoolAsyncTaskExecutor::Thread 2] [DependencyWaiterApplicationContextExecutor] Unable to create application context for [com.atlassian.bamboo.plugin.jira], unsatisfied dependencies: none

thank you

If it is indeed a missing dependency issue, you should not need to adjust the log levels. The respective errors would appear quite a bit before that error message from the actual build execution. I do not have any logs from the last time I encountered that issue, so not sure about the exact keywords, but if you search for your add-onā€™s key (<groupId>.<artifactId>), you should find them quickly in case, and they should be related to OSGi handling.

As for the com.atlassian.bamboo.plugin.jira error - I have encountered that in remote agent logs as well and have to admit that I never took the time to analyze what that is about, though I am pretty sure that it is unrelated to your own add-on issue.

1 Like

Hi,

It turned out to be similar to the issue on ā€œBamboo plugin not found on agentsā€, but now weā€™re having an issue with finding the baseurl of the bamboo server. Iā€™m calling getBaseUrl() as in BambooWebResourceIntegration, which works on the default agent, but failed when we tried to run it on the remote agent.

Any idea what could be the cause of that? Or how could I go about setting the administrationConfiguration. Thank you in advanced!

Hereā€™s the error log

error	15-Aug-2017 13:46:10	com.atlassian.spring.container.ComponentNotFoundException: Failed to find component: No bean named 'administrationConfiguration' is defined
error	15-Aug-2017 13:46:10		at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:79)
error	15-Aug-2017 13:46:10		at com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.plugin.webresource.BambooWebResourceIntegration.getAdministrationConfiguration(BambooWebResourceIntegration.java:206)
error	15-Aug-2017 13:46:10		at createagent.CreateAgentTask.getEnvVar(CreateAgentTask.java:116)
error	15-Aug-2017 13:46:10		at createagent.CreateAgentTask.execute(CreateAgentTask.java:56)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:317)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:246)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
error	15-Aug-2017 13:46:10		at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
error	15-Aug-2017 13:46:10		at java.lang.Thread.run(Thread.java:745)
error	15-Aug-2017 13:46:10	Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'administrationConfiguration' is defined
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:704)
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175)
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
error	15-Aug-2017 13:46:10		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
error	15-Aug-2017 13:46:10		at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:75)
error	15-Aug-2017 13:46:10		... 20 more