Bamboo Linux Agent Issue with XCode Plugin

Kyle Varga June 22, 2014

We have 2 types of agents - 1 for iOS builds and 1 for Android. The android build machines use Linux and I believe we are getting a capability error with using the Bamboo XCode Plugin:

When starting up our agent is throwing a stacktrace while trying to detect capabilities. The agent still starts, but it uses defaults for some of the capabilities. For example, in the log below you see that ant is detected at /usr/share/apache-ant, however, Bamboo shows just /usr and it causes our builds to break.

I created a blank bamboo-init.properties in /usr/local/bamboo , but the issue still persists.

2014-06-23 10:19:22,604 INFO [Thread-1] [RemoteAgent] Starting Bamboo Remote Agent...
2014-06-23 10:19:22,604 INFO [Thread-1] [RemoteAgent] Starting application context...
2014-06-23 10:19:23,544 WARN [Thread-1] [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
2014-06-23 10:19:23,571 INFO [Thread-1] [RemoteAgentHomeLocatorForBootstrap] Agent home located at '/usr/local/bamboo'
2014-06-23 10:19:23,571 INFO [Thread-1] [RemoteAgentHomeDirectoryLayout] Plugin directory: /usr/local/bamboo/plugins
2014-06-23 10:19:23,571 INFO [Thread-1] [RemoteAgentHomeDirectoryLayout] Plugin cache directory: /usr/local/bamboo/caches/plugins
2014-06-23 10:19:23,628 INFO [Thread-1] [BambooActiveMQConnectionFactory] Setting broker URL to 'failover:(tcp://mutualmobile02.managed.contegix.com:54663?wireFormat.maxInactivityDuration=300000)?initialReconnectDelay=15000&maxReconnectAttempts=10'
2014-06-23 10:19:23,704 INFO [Thread-1] [BambooActiveMQConnectionFactory] Broker URI: tcp://mutualmobile02.managed.contegix.com:54663?wireFormat.maxInactivityDuration=300000 is valid.
2014-06-23 10:19:25,613 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Default agent capabilities loaded from bamboo-capabilities.properties
2014-06-23 10:19:26,297 WARN [Felix:Startup] [DefaultComponentRegistrar] Host component buildDefinitionConverter of instance com.atlassian.bamboo.fieldvalue.BuildDefinitionConverter@ac1b453 has no interfaces
2014-06-23 10:19:27,172 INFO [Thread-1] [ClasspathBuilder] Syncing [/usr/local/bamboo/plugins/system-provided] with https://bamboo.r.mutualmobile.com/agentServer/bundled-plugins.zip?fingerprint=-5446528307976941256
2014-06-23 10:19:27,175 INFO [Thread-1] [ClasspathBuilder] 10 file(s) currently in [/usr/local/bamboo/plugins/system-provided]
2014-06-23 10:19:28,907 INFO [Thread-1] [ClasspathBuilder] Syncing [/usr/local/bamboo/plugins/user-installed] with https://bamboo.r.mutualmobile.com/agentServer/plugins.zip?fingerprint=-5446528307976941256
2014-06-23 10:19:28,907 INFO [Thread-1] [ClasspathBuilder] 2 file(s) currently in [/usr/local/bamboo/plugins/user-installed]
2014-06-23 10:19:30,185 INFO [Thread-1] [SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2014-06-23 10:19:30,186 INFO [Thread-1] [QuartzScheduler] Quartz Scheduler v.1.6.5 created.
2014-06-23 10:19:30,187 INFO [Thread-1] [RAMJobStore] RAMJobStore initialized.
2014-06-23 10:19:30,187 INFO [Thread-1] [StdSchedulerFactory] Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
2014-06-23 10:19:30,187 INFO [Thread-1] [StdSchedulerFactory] Quartz scheduler version: 1.6.5
2014-06-23 10:19:30,187 INFO [Thread-1] [QuartzScheduler] JobFactory set to: com.atlassian.bamboo.quartz.AutowiringJobFactory@5ff59ae3
2014-06-23 10:19:30,187 INFO [Thread-1] [QuartzScheduler] Scheduler QuartzScheduler_$_NON_CLUSTERED started.
2014-06-23 10:19:30,267 WARN [Thread-1] [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
2014-06-23 10:19:30,285 INFO [Thread-1] [AgentRegistrationBean] Current agent remote definition: com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl@67f06e49[142573576,legacy-bamboo-agents-arch-onpremises-15052fb704c67e8a (2)]
2014-06-23 10:19:30,288 INFO [Thread-1] [PerforceManager] Attempting to extract Perforce Executable
2014-06-23 10:19:30,288 INFO [Thread-1] [PerforceManager] Could not find system variable. If you wish to use perforce please set the location as a capability.
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:ADK value: 22.6.2
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.ant.Ant value: /usr/share/apache-ant
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.Python 2 value: /usr/bin/python2
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.Virtualenv 2 value: /usr/bin/virtualenv2
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.Python 3 value: /usr/bin/python
2014-06-23 10:19:30,289 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.Virtualenv 3 value: /usr/bin/virtualenv
2014-06-23 10:19:30,290 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.Node value: /usr/bin/node
2014-06-23 10:19:30,290 INFO [Thread-1] [DefaultAgentCapabilityManagerImpl] Adding default capability key:system.builder.command.NodePackageManager value: /usr/bin/npm
2014-06-23 10:19:30,403 ERROR [Thread-1] [BambooPluginUtils] Module com.atlassian.bamboo.plugins.xcode.build.XCodeSDKCapabilityTypeModule error while detecting default capabilities: 
java.lang.NullPointerException
	at java.io.File.<init>(File.java:277)
	at com.atlassian.bamboo.plugins.xcode.build.XCodeSDKCapabilityTypeModule.addDefaultCapabilities(XCodeSDKCapabilityTypeModule.java:73)
	at com.atlassian.bamboo.v2.build.agent.capability.CapabilityDefaultsHelperImpl$1.run(CapabilityDefaultsHelperImpl.java:54)
	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:147)
	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:137)
	at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:87)
	at com.atlassian.bamboo.v2.build.agent.capability.CapabilityDefaultsHelperImpl.addDefaultCapabilities(CapabilityDefaultsHelperImpl.java:43)
	at com.atlassian.bamboo.v2.build.agent.remote.AgentRegistrationBean.registerAgent(AgentRegistrationBean.java:36)
	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:1237)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:88)
	at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:176)
	at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:53)
	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)

Any ideas?

1 answer

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2014

2014-06-2310:19:30,403ERROR [Thread-1] [BambooPluginUtils] Module com.atlassian.bamboo.plugins.xcode.build.XCodeSDKCapabilityTypeModule error whiledetecting defaultcapabilities

YOu can turn off a plugin's ability to detect default capabilities, and make sure you add them yourself in the agent config.

https://docs.atlassian.com/bamboo/5.1/com/atlassian/bamboo/utils/SystemProperty.html#DISABLE_AGENT_AUTO_CAPABILITY_DETECTION

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events