Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Bamboo runs a build with the wrong user

Hi,

We are experiencing a weird issue where bamboo is not using the same user to run the build in only one build plan.

We are running Bamboo as a service on a windows server 2012. In the bamboo service config it's specified to run it with the local user "bamboo".

It works fine for all our plans except one which is running the builds with "Administrator". In the end, the local .m2 used is the one from "Administrator" instead of the one from "bamboo" causing the artifact dependencies download to fail because no username/password are specified in settings.xml.

 

Here is the debug trace for the non working build : 

build 07-Nov-2017 14:17:41 Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:28+0000)
build 07-Nov-2017 14:17:41 Maven home: D:\Data\Bamboo\tools\Maven_3.0.5
build 07-Nov-2017 14:17:41 Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
build 07-Nov-2017 14:17:41 Java home: D:\Program Files\Java\jdk1.6.0_45\jre
build 07-Nov-2017 14:17:41 Default locale: en_US, platform encoding: Cp1252
build 07-Nov-2017 14:17:41 OS name: "windows server 2012", version: "6.2", arch: "amd64", family: "windows"
build 07-Nov-2017 14:17:42 [INFO] Error stacktraces are turned on.
build 07-Nov-2017 14:17:42 [DEBUG] Reading global settings from D:\Data\Bamboo\tools\Maven_3.0.5\conf\settings.xml
build 07-Nov-2017 14:17:42 [DEBUG] Reading user settings from C:\Users\Administrator\.m2\settings.xml
build 07-Nov-2017 14:17:42 [DEBUG] Using local repository at C:\Users\Administrator\.m2\repository
build 07-Nov-2017 14:17:42 [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Users\Administrator\.m2\repository
build 07-Nov-2017 14:17:42 [INFO] Scanning for projects...

 

Here is the debug trace for the working build :

build 07-Nov-2017 13:48:26 Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:28+0000)
build 07-Nov-2017 13:48:26 Maven home: D:\Data\Bamboo\tools\Maven_3.0.5
build 07-Nov-2017 13:48:26 Java version: 1.8.0_144, vendor: Oracle Corporation
build 07-Nov-2017 13:48:26 Java home: D:\Program Files\Java\jdk1.8.0_144\jre
build 07-Nov-2017 13:48:26 Default locale: en_US, platform encoding: Cp1252
build 07-Nov-2017 13:48:26 OS name: "windows server 2012 r2", version: "6.3", arch: "amd64", family: "dos"
build 07-Nov-2017 13:48:26 [INFO] Error stacktraces are turned on.
build 07-Nov-2017 13:48:26 [DEBUG] Reading global settings from D:\Data\Bamboo\tools\Maven_3.0.5\conf\settings.xml
build 07-Nov-2017 13:48:26 [DEBUG] Reading user settings from C:\Users\bamboo\.m2\settings.xml
build 07-Nov-2017 13:48:26 [DEBUG] Using local repository at C:\Users\bamboo\.m2\repository
build 07-Nov-2017 13:48:26 [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Users\bamboo\.m2\repository
build 07-Nov-2017 13:48:26 [INFO] Scanning for projects...

 

As you can see the difference is that for the non working build we use JDK 1.6 and for the working build it's 1.8.

Another weird thing is that the Windows version detected is not the same (while it's the same agent that builds both).

 

Any idea?

 

Thanks

 

 

 

1 answer

For anybody facing the same issue we could not find why it's using Administrator account for this specific build so we used the following workaround : 

In the Maven settings.xml we added <localRepository>C:\Users\bamboo\.m2\repository</localRepository>" in the <settings> part of this file.

In the build job, we specified the .m2 settings.xml to use with the maven command : --settings C:\Users\bamboo\.m2\settings.xml

It does the trick.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

219 views 4 6
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