It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

MsBuildCapabilityDefaultsHelper error on Win2012 Remote Agent

lt7 Aug 16, 2016

I'm getting the below error being throw upon startup of the Remote Bamboo Agent (5.6.2) I have setup as a service on a Windows 2012 R2 standard server. 

INFO   | jvm 105  | 2016/08/17 04:30:20 | 2016-08-17 04:30:20,564 ERROR [Thread-0] [BambooPluginUtils] Module com.atlassian.bamboo.plugin.dotnet.msbuild.MsBuildCapabilityDefaultsHelper error while detecting default capabilities: 
INFO   | jvm 105  | 2016/08/17 04:30:20 | java.lang.NullPointerException
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.plugin.dotnet.msbuild.MsBuildCapabilityDefaultsHelper.processFrameworkDirFileSince12(MsBuildCapabilityDefaultsHelper.java:117)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.plugin.dotnet.msbuild.MsBuildCapabilityDefaultsHelper.addDefaultCapabilities(MsBuildCapabilityDefaultsHelper.java:92)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.v2.build.agent.capability.CapabilityDefaultsHelperImpl$1.run(CapabilityDefaultsHelperImpl.java:54)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:147)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:137)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:87)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.v2.build.agent.capability.CapabilityDefaultsHelperImpl.addDefaultCapabilities(CapabilityDefaultsHelperImpl.java:43)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.v2.build.agent.remote.AgentRegistrationBean.registerAgent(AgentRegistrationBean.java:36)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1237)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:88)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:179)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:56)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:28)
INFO   | jvm 105  | 2016/08/17 04:30:20 | 	at java.lang.Thread.run(Thread.java:745)

 

On my host I have .Net Framework installed 

C:\Windows\Microsoft.NET\Framework\v4.0.30319>msbuild /version

Microsoft (R) Build Engine version 4.6.1055.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
4.6.1055.0
C:\Windows\Microsoft.NET\Framework\v4.0.30319

 

If I check what I think is the source code for this agent

https://bitbucket.org/atlassian/bamboo-dotnet-plugin/src/b8cece6350ee2aad16f19daf65b796620b64da86/src/main/java/com/atlassian/bamboo/plugin/dotnet/msbuild/MsBuildCapabilityDefaultsHelper.java?at=default&fileviewer=file-view-default

I'm not entirely clear why this is failing, does anyone have any idea ?

 

2 answers

0 votes
Przemek Bruski Atlassian Team Aug 17, 2016

Do you have an empty MSBuild directory in your Program Files x86? I think that's what is confusing Bamboo.

Or maybe your Program Files /MSBuild directory is a junction?

lt7 Aug 21, 2016

No I don't.

C:\Program Files (x86)>dir /b
AWS SDK for .NET
AWS Tools
Common Files
Internet Explorer
McAfee
Microsoft.NET
Windows Mail
Windows NT
WindowsPowerShell
C:\Program Files (x86)>

The only junction points on the host I can see are those under c:\users and c:\ProgramData

Przemek Bruski Atlassian Team Aug 21, 2016

What about the regular Program Files directory?

lt7 Aug 22, 2016

No, nothing there either.

C:\Program Files>dir /b
Amazon
bamboo-agent-home
Common Files
DIFX
Internet Explorer
Java
McAfee
SplunkUniversalForwarder
Update Services
Windows Mail
Windows NT
WindowsPowerShell
C:\Program Files>
Przemek Bruski Atlassian Team Aug 26, 2016

Which version of plugin is it?

lt7 Aug 28, 2016

As per question "Remote Bamboo Agent (5.6.2)" 

0 votes
Andrew Langmead Oct 05, 2016

I have exactly the same problem - again 2012 R2 and there is no MSBuild directory present.

Were you able to resolve this problem?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Handling Opsgenie Alerts

Hi everyone, welcome to the kb articles for Opsgenie FAQs. I'm one of the Technical Support Engineers for Opsgenie who will be providing weekly posts on FAQs from customers.   All alerts are ...

63 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you