Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can't start Bamboo-Remote-Agent without wrapper on ARM

Christian Otto September 8, 2015

Hi, we can't start the Bamboo-Agent (bamboo-agent-5.8.1.jar) on a Raspberry Pi2, there is always an Exception thrown (see below), where we've found already different related solutions for. But non of them really helped so far.

We starting the Agent on the remote machine like this: (its an ARM processor, so we don't use the wrapper)

java -Dbamboo.Home=/home/ubuntu/bamboo-agent-home -jar bamboo-agent-5.8.1.jar http://bamboo.ourdomain.net:8085/agentServer/

It's loading a lot of packages and plugins, until the Exception is thrown. Related to the Exception, we found the following topics which didn't help so far:

  • 2013-02-15: "This issue was due to incompatible JDK on the Bamboo server and/or the remote server. This was handled in support." Our client has 1.7 and the server 1.8, is this still an issue?
    Source: https://answers.atlassian.com/questions/136409
  • 2012-11-21: "Another possibility could be that you are using an unsupported version of Tomcat. Note that tomcat 7 is still not supported yet." Our Bamboo Server runs on Tomcat 7. Because this hint is so old, we guess this should not the issue!
    Source: https://confluence.atlassian.com/x/0BKaEQ

What can be the problem?
Thank you very much!

Exception thrown by the bamboo-agent-5.8.1.jar:

2015-09-08 17:36:34,693 INFO [Thread-0] [QuartzScheduler] Scheduler scheduler_$_NON_CLUSTERED started.
2015-09-08 17:36:35,592 WARN [Thread-0] [PropertyPlaceholderConfigurer] Could not load properties from class path resource [bamboo-init.properties]: class path resource [bamboo-init.properties] cannot be opened because it does not exist
2015-09-08 17:36:45,890 INFO [Thread-0] [AgentRegistrationBean] Current agent remote definition: com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl@1ffad66[-1,0.0.0.1]
2015-09-08 17:36:45,940 INFO [Thread-0] [PerforceManager] Attempting to extract Perforce Executable
2015-09-08 17:36:45,941 INFO [Thread-0] [PerforceManager] Could not find system variable. If you wish to use perforce please set the location as a capability.
Exiting due to fatal exception.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:28)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean' defined in class path resource [applicationContextRemoteAgentStartup.xml]: Invocation of init method failed; nested exception is org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.JMSException: Timer already cancelled.
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:105)
        at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:238)
        at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:68)
        ... 6 more
Caused by: org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.JMSException: Timer already cancelled.
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.convertJmsInvokerAccessException(JmsInvokerClientInterceptor.java:433)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:206)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy67.registerAgent(Unknown Source)
        at com.atlassian.bamboo.v2.build.agent.remote.AgentRegistrationBean.registerAgent(AgentRegistrationBean.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1681)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1620)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
        ... 19 more
Caused by: javax.jms.JMSException: Timer already cancelled.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1405)
        at org.apache.activemq.ActiveMQConnection.createTempDestination(ActiveMQConnection.java:2078)
        at org.apache.activemq.ActiveMQSession.createTemporaryQueue(ActiveMQSession.java:1380)
        at org.apache.activemq.jms.pool.PooledSession.createTemporaryQueue(PooledSession.java:204)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.doExecuteRequest(JmsInvokerClientInterceptor.java:350)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.executeRequest(JmsInvokerClientInterceptor.java:253)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:203)
        ... 30 more
Caused by: java.lang.IllegalStateException: Timer already cancelled.
        at java.util.Timer.sched(Timer.java:397)
        at java.util.Timer.schedule(Timer.java:248)
        at org.apache.activemq.thread.Scheduler.schedualPeriodically(Scheduler.java:50)
        at org.apache.activemq.broker.region.Queue.start(Queue.java:959)
        at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:140)
        at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:322)
        at org.apache.activemq.broker.region.RegionBroker.addDestinationInfo(RegionBroker.java:344)
        at org.apache.activemq.advisory.AdvisoryBroker.addDestinationInfo(AdvisoryBroker.java:200)
        at org.apache.activemq.broker.BrokerFilter.addDestinationInfo(BrokerFilter.java:257)
        at org.apache.activemq.broker.BrokerFilter.addDestinationInfo(BrokerFilter.java:257)
        at org.apache.activemq.broker.MutableBrokerFilter.addDestinationInfo(MutableBrokerFilter.java:262)
        at org.apache.activemq.broker.TransportConnection.processAddDestination(TransportConnection.java:495)
        at org.apache.activemq.command.DestinationInfo.visit(DestinationInfo.java:122)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:149)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
        ... 1 more
2015-09-08 17:36:58,234 FATAL [Thread-0] [AgentBootstrap] Exiting due to fatal exception.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:28)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean' defined in class path resource [applicationContextRemoteAgentStartup.xml]: Invocation of init method failed; nested exception is org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.JMSException: Timer already cancelled.
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:105)
        at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:238)
        at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:68)
        ... 6 more
Caused by: org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.JMSException: Timer already cancelled.
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.convertJmsInvokerAccessException(JmsInvokerClientInterceptor.java:433)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:206)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy67.registerAgent(Unknown Source)
        at com.atlassian.bamboo.v2.build.agent.remote.AgentRegistrationBean.registerAgent(AgentRegistrationBean.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1681)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1620)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
        ... 19 more
Caused by: javax.jms.JMSException: Timer already cancelled.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1405)
        at org.apache.activemq.ActiveMQConnection.createTempDestination(ActiveMQConnection.java:2078)
        at org.apache.activemq.ActiveMQSession.createTemporaryQueue(ActiveMQSession.java:1380)
        at org.apache.activemq.jms.pool.PooledSession.createTemporaryQueue(PooledSession.java:204)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.doExecuteRequest(JmsInvokerClientInterceptor.java:350)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.executeRequest(JmsInvokerClientInterceptor.java:253)
        at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:203)
        ... 30 more
Caused by: java.lang.IllegalStateException: Timer already cancelled.
        at java.util.Timer.sched(Timer.java:397)
        at java.util.Timer.schedule(Timer.java:248)
        at org.apache.activemq.thread.Scheduler.schedualPeriodically(Scheduler.java:50)
        at org.apache.activemq.broker.region.Queue.start(Queue.java:959)
        at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:140)
        at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:322)
        at org.apache.activemq.broker.region.RegionBroker.addDestinationInfo(RegionBroker.java:344)
        at org.apache.activemq.advisory.AdvisoryBroker.addDestinationInfo(AdvisoryBroker.java:200)
        at org.apache.activemq.broker.BrokerFilter.addDestinationInfo(BrokerFilter.java:257)
        at org.apache.activemq.broker.BrokerFilter.addDestinationInfo(BrokerFilter.java:257)
        at org.apache.activemq.broker.MutableBrokerFilter.addDestinationInfo(MutableBrokerFilter.java:262)
        at org.apache.activemq.broker.TransportConnection.processAddDestination(TransportConnection.java:495)
        at org.apache.activemq.command.DestinationInfo.visit(DestinationInfo.java:122)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:149)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
        ... 1 more
ubuntu@1:~/bamboo-agent-home$

 

Client details:

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK Zero VM (build 24.79-b02, mixed mode)


2015-09-08 17:36:34,208 INFO [Thread-0] [lifecycle] *******************************
2015-09-08 17:36:34,209 INFO [Thread-0] [lifecycle] *      System information     *
2015-09-08 17:36:34,210 INFO [Thread-0] [lifecycle] *******************************
2015-09-08 17:36:34,339 INFO [Thread-0] [lifecycle] com.atlassian.bamboo.configuration.SystemInfo@2ecb0e[
  userName=ubuntu
  userTimezone=Etc/UTC
  userLocale=English (United States)
  systemEncoding=ANSI_X3.4-1968
  operatingSystem=Linux 3.18.0-20-rpi2
  operatingSystemArchitecture=arm
  systemDate=Tuesday, 08 Sep 2015
  systemTime=17:36:29
  tempDir=/tmp
  userHome=/home/ubuntu
  totalMemory=33
  freeMemory=14
  usedMemory=19
  availableProcessors=4
  startupTimestamp=1441733789076
  currentDirectory=/home/ubuntu/bamboo-agent-home
  applicationHome=/home/ubuntu/bamboo-agent-home
  buildWorkingDirectory=/home/ubuntu/bamboo-agent-home/xml-data/build-dir
  currentDate=Tue Sep 08 17:36:29 UTC 2015
  freeDiskSpace=4049152
  hostName=0.0.0.1
  ipAddress=0.0.0.1
]

 

Server details:

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


Bamboo Standalone Edition Version : 5.8.1
Using CATALINA_BASE:   /var/local/bamboo
Using CATALINA_HOME:   /var/local/bamboo
Using CATALINA_TMPDIR: /var/local/bamboo/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /var/local/bamboo/bin/bootstrap.jar:/var/local/bamboo/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.40
Server built:   May 5 2013 08:54:06
Server number:  7.0.40.0
OS Name:        Linux
OS Version:     3.16.0-30-generic
Architecture:   amd64
JVM Version:    1.8.0_45-b14
JVM Vendor:     Oracle Corporation

 

 

2 answers

0 votes
Christian Otto September 8, 2015

Thank you very much for the fast reply. There is not such a JAR on the server, but I found the JAR which you mentioned on the client (located in "/home/username/bamboo-agent-home/classpath/atlassian-bamboo-agent-core-5.8.1.jar", probably you meant this). I unpacked, modified the file and repack as you said, but if I start the agent, the same Exception is thrown again...

What else can cause this issue?

EDIT:

I just checked the "atlassian-bamboo-agent-core-5.8.1.jar" after trying to start the client, and it seems that the JAR was replaced/reset by the original JAR file! So the modification is lost. I made the change in the "applicationContextJMSServer.xml" again, started the client and again the JAR was reset to the original!
Is there a trick to avoid this? I could try to chown the file-permissions, but thats not very handy...

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2015

Hmm, try the follwing - in bamboo-agent-core.jar on your server, edit the file applicationContextJMSServer.xml and add 

<property name="advisorySupport" value="false"/>

under bean with id "broker".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events