Plugin is not enabled while running on remote-agent because of unsatisfied dependencies

Hi,

My plugin runs fine when I run it through SDK framework on local host.
But when I run it on remote agent, I get the below unsatisfied dependencies errors.

I had to added the dependencies because of the existing issue in bamboo
Link: Problem with decorator in xWork, the page is displayed without tabs and lot of exceptions in the log
JIRA: https://jira.atlassian.com/browse/BAM-19884

In the log file atlassian-bamboo-agent.log is see the below logs…

[DependencyServiceManager] NonValidatingOsgiBundleXmlApplicationContext(bundle=isode.robotplugin, config=osgibundle:/META-INF/spring/*.xml) **is waiting for unsatisfied dependencies** [[**&triggerManager, &applicationProperties, &jiraApplinksService, &planManager, &bambooPermissionManager, &bambooAuthenticationContext, &vcsRepositoryConfigurationService, &planExecutionManager, &webInterfaceManager**]]INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,930 ERROR [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&triggerManager' with filter '(&(objectClass=com.atlassian.bamboo.plan.trigger.TriggerManager)(objectClass=com.atlassian.bamboo.plan.trigger.**TriggerManager**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&applicationProperties' with filter '(&(objectClass=com.atlassian.sal.api.ApplicationProperties)(objectClass=com.atlassian.sal.api.ApplicationProperties))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&jiraApplinksService' with filter '(&(objectClass=com.atlassian.bamboo.applinks.JiraApplinksService)(objectClass=com.atlassian.bamboo.applinks.**JiraApplinksService**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&planManager' with filter '(&(objectClass=com.atlassian.bamboo.plan.PlanManager)(objectClass=com.atlassian.bamboo.plan.**PlanManager**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&bambooPermissionManager' with filter '(&(objectClass=com.atlassian.bamboo.security.BambooPermissionManager)(objectClass=com.atlassian.bamboo.security.**BambooPermissionManager**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&bambooAuthenticationContext' with filter '(&(objectClass=com.atlassian.bamboo.user.BambooAuthenticationContext)(objectClass=com.atlassian.bamboo.user.**BambooAuthenticationContext**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,931 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&vcsRepositoryConfigurationService' with filter '(&(objectClass=com.atlassian.bamboo.vcs.configuration.service.VcsRepositoryConfigurationService)(objectClass=com.atlassian.bamboo.vcs.configuration.service.**VcsRepositoryConfigurationService**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,932 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&planExecutionManager' with filter '(&(objectClass=com.atlassian.bamboo.plan.PlanExecutionManager)(objectClass=com.atlassian.bamboo.plan.**PlanExecutionManager**))'INFO   | jvm 1    | 2018/05/21 12:10:18 | 2018-05-21 12:10:18,932 
**ERROR** [AgentRunnerThread] [OsgiPlugin] Plugin 'isode.robotplugin' never resolved service '&webInterfaceManager' with filter '(&(objectClass=com.atlassian.plugin.web.WebInterfaceManager)(objectClass=com.atlassian.plugin.web.**WebInterfaceManager**))'

   **Unable to start the following plugins due to timeout while waiting for plugin to enable: isode.robotplugin**

Is there a work-around for this ?

@achystoprudov and @acalantog would you be able to assist ?

Thanks in advance.

@markusschulte did you face the same while running on the remote agent ?

Hi @kshi.korde,

Hmm. Is your jira version in the pom same as the server version you’re deploying to? Have you tried running it in a stand alone (atlas-standalone --product jira --version <version_number>) server or a real server?

Cheers,
Anne Calantog

1 Like

As I understand your plugin should work at Bamboo Server as it provides some UI to build result. So you should not care about remote agent

You try to import services on an agent which are not exported. Agent’s context does not contain every service which Bamboo Server does. You must distinguish components which should be imported on server and the ones which should be imported on both server and agent.

Indicate components which should be created only on server with @BambooComponent and use @BambooImport to indicate a service should be imported only on server.

3 Likes

@kshi.korde

I tried my addon with remote agents, too, works fine. For having a common test-basis, did you have a look at bitbucketorg/MarkusSchulte/devhelp1230/branch/fix ¹? This branch should work on remote agents, give it a try. Does it work on remote-agents at yours?

¹ wtf. Cannot post valid link to bitbucket

@achystoprudov yes that is correct but in addition to that my plugin should also run robots tests on remote agent(s), it then publishes the artifacts , parses the robot test results and displays some additional information about the test result(s) on the bamboo server.
The work-around that you suggested earlier caters to the additional display that I am doing on the server side.

@glewandowski I will try to make use of @BambooComponent and @BambooImport as you suggested. Will let you know if it works.

@markusschulte :slight_smile: Will take a look at your branch too. (https://bitbucket.org/MarkusSchulte/devhelp1230/branches/compare/fix…#diff)

@acalantog I will try your suggestion too. Will let you know.

@glewandowski thanks it worked.
Then I ran into another issue that @markusschulte faced in Nov 2016 :open_mouth: (looks like I have dipped only my finger in the ocean) which I managed to fix.

Thank you all for your suggestions and feedbacks.

1 Like