Plugin not starting at remote agent

Issue #6 resolved
Peter Gorn created an issue

Hello. I have issue at remote agent

INFO   | jvm 1    | 2019/01/23 20:15:29 | 2019-01-23 20:15:29,553 ERROR [ThreadPoolAsyncTaskExecutor::Thread 5] [OsgiPlugin] Unable to start the plugin container for plugin 'com.valens.bamboo.ansible.bamboo-ansible-task'
INFO   | jvm 1    | 2019/01/23 20:15:29 | java.lang.NoClassDefFoundError: com/atlassian/upm/api/license/PluginLicenseManager
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.lang.Class.getDeclaredConstructors0(Native Method)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.lang.Class.getDeclaredConstructors(Class.java:2020)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.lang.Thread.run(Thread.java:748)
INFO   | jvm 1    | 2019/01/23 20:15:29 | Caused by: java.lang.ClassNotFoundException: com.atlassian.upm.api.license.PluginLicenseManager not found by com.valens.bamboo.ansible.bamboo-ansible-task [38]
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
INFO   | jvm 1    | 2019/01/23 20:15:29 |   ... 22 more

But at local agent all fine.

Comments (12)

  1. Hutuleac Iulius repo owner

    Hi Peter,

    can you tell me your Bamboo version so I can try to replicate the issue ?

    Best regards, Julius Hutuleac

  2. Hutuleac Iulius repo owner

    Please try on version 2.5.4. issue should be sorted, I removed dependency from that area of code.

  3. Hutuleac Iulius repo owner

    Hi Peter,

    thank you for your patience.

    Will try another approach in next few hours.

    Julius

  4. Hutuleac Iulius repo owner

    Tested on a few versions, unfortunately the new build system provided by Atlassian is not behaving as expected on remote agents. I reverted plugin to slightly older architecture which should be compatible with remote agents.

  5. Hutuleac Iulius repo owner

    Very strange Peter, I cannot reproduce it anymore it seems. Can you try to update once more or disable/enable plugin. Manager injection must happen within 60 seconds according to Atlassian otherwise it will fail, is the agent struggling on resources ?

    Julius

  6. Peter Gorn reporter

    Tried disable/enable, reinstall plugin, reinstall remote agent, situation the same.

    Remote agent on Debian 9.6, Java(TM) SE Runtime Environment (build 1.8.0_201-b09)

  7. Hutuleac Iulius repo owner

    I will continue investigations, can you provide me a few extra lines of log maybe to understand the context.

    Julius

  8. Hutuleac Iulius repo owner

    That made some light and hopefully fixed the issue in 2.5.9.

    Thanks for your patience !

    Julius

  9. Log in to comment