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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,425
Community Members
 
Community Events
184
Community Groups

I'm getting a uname: command not found error from Bamboo

Bamboo task failed with error "/usr/local/git/libexec/git-core/git-sh-setup: line 235: uname: command not found". The command is present on the server, i can also ran every command from Bamboo task on the server without any problem or errors. Bamboo uses the same user credentials but trows the error above and exits with "Result: exit code = 255" 

How can i solve this problem.

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
Jan 21, 2016

If it is the same user, try running the commands from the same working directory.

I did but still same problem.

The Bamboo task looks like this.

cd /var/www/html/my-site
git checkout Acceptance
git fetch --all --recurse-submodules=on-demand -v
git reset --hard Acceptance
git pull
git submodule sync
git submodule update --init --recursive --force

All the commands can be executed in same order (1 by 1 ) on the server without any problem. 

Jobin Kuruvilla [Adaptavist]
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.
Jan 21, 2016
  1. Are you sure you are running as the same user?
  2. Is it running on the same agent?

 

  1. Yes, i'm sure Bamboo uses the user
  2. How do you mean the same agent?
Jobin Kuruvilla [Adaptavist]
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.
Jan 22, 2016

Bamboo can have several remote agents and the actual script will be running in an agent (default, local or remote). You can find the agent from the build logs.

These were the info i could find about the instance in the log:
simple	21-Jan-2016 14:15:26	Build GGD Zuid Limburg - ggdzl.acceptance.netcreators.nl - Default Job #17 (GGDZLB-GGDZLAC-JOB1-17) started building on agent Elastic Agent on i-0f7ca4365351a4ce6
simple	21-Jan-2016 14:15:26	Elastic agent on instance i-0f7ca4365351a4ce6

If i'm not mistaken it's a remote instance. Bamboo will start a instance when ever there's a task to be executed.

Jobin Kuruvilla [Adaptavist]
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.
Jan 25, 2016

Looks like you have to fix the permissions on that instance!

How can i fix the permission because Bamboo will create a new instance when needed.
So i could fix it on a instance but when this instance is no longer required (has gone into idle state for a  long period) Bamboo will terminate it. And when there is a new task to be executed Bamboo will create a new instance.

Jobin Kuruvilla [Adaptavist]
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.
Jan 26, 2016

How is Bamboo creating the new instance? If it is an elastic agent, fix it on the image itself!

I've checked the elastic user permission (on the elastic server self) and they seems to be alright. Can you tell me which permission i need to fix?

Jobin Kuruvilla [Adaptavist]
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.
Jan 28, 2016
It is complining about "uname not found". Either it is not installed or not available to the user running the build!

 

I've tried both.

On the actual server where the repo files are stored. I can execute uname in any directory including the ones from Bamboo task job.
Also on the elastic server i could execute the uname command without any problem.

On other servers i don't get this uname error, the task commands are the same (only the ip-address and username are different).  

Jobin, do you have any idea how i can solve this problem?

Jobin Kuruvilla [Adaptavist]
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.
Feb 04, 2016

No idea to be frank. You need some server admins to dive in with you on this issue. Builds only get executed on the elastic agents and so you need to debug on them.

This is because PATH variable does not contain path for /bin from where all sh commands can be run. Correct the PATH variable and everything should be fine. If you want to see what is there current PATH, you can write echo $PATH >> testfile in bamboo.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events