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,555,354
Community Members
 
Community Events
184
Community Groups

Bamboo remote agent start fails with message -version of Java specified by wrapper.java.command ...

Edited
yogesh_devi
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.
Dec 16, 2020

I am running a Bamboo remote agent on a Ubuntu server. Startup of the remote agent fails with a message  The version of Java specified by wrapper.java.command (14) is greater than the maximum allowed (8)."

I have JDK 1.8 installed  and in the bash shell the Java Path ponts to 1.8 

if I type java -version on command line I see  java version "1.8.0_60"

Basically  the systemctl command "systemctl start bamboo-agent" fails 

and after the failure if I run "journalctl -xe "

I see following message in output 

 

Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent.sh[3523]: Starting Bamboo Agent...
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]: --> Wrapper Started as Daemon
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]: Java Service Wrapper Standard Edition 64-bit 3.5.41
Copyright (C) 1999-2019 Tanuki Software, Ltd. All Rights >
http://wrapper.tanukisoftware.com
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]: Licensed to Atlassian Pty Ltd for Bamboo Remote Agent
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]:
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]: The version of Java specified by wrapper.java.command (14)
is greater than the maximum allowed (8).
Dec 16 09:52:10 unbuntu-agent-1 bamboo-agent[3612]: <-- Wrapper Stopped
Dec 16 09:52:25 unbuntu-agent-1 bamboo-agent.sh[3523]: Waiting for Bamboo Agent..................
Dec 16 09:52:25 unbuntu-agent-1 bamboo-agent.sh[3523]: WARNING: Bamboo Agent may have failed to start.
Dec 16 09:52:25 unbuntu-agent-1 systemd[1]: bamboo-agent.service: Control process exited, code=exited, status=1>
-- Subject: Unit process exited

 

 

 

2 answers

1 accepted

1 vote
Answer accepted
yogesh_devi
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.
Dec 16, 2020 • edited Jan 05, 2021

This is a workaround ( thats works !) 

So it seems like the when bamboo-agent.sh is invoking "systemctl" the desired JDK path isn't set so  It uses default java pointed to by /usr/bin/java which is a version later than needed 1.8  - and causes the error 

I am using a WORKAROUND to ensure the desired java version is used. You might use that as well 

First I set JAVA_HOME and PATH to point right JDK in my .bashrc so I have desired java in my shell environment 

    # Add following to your .bashrc or .profile  

    JAVA_HOME=< your JDK 1.8 path > 
    export JAVA_HOME

    PATH=$JAVA_HOME/bin:$PATH
    export PATH

Now I  can run the script bamboo-agent-home/bin/bamboo-agent.sh  from my shell where JDK is set appropriately by  invoking it with an extra argument "sysd" This extra argument  prevents the bamboo-agent.sh script from using systemctl and it directly runs from your shell 

That way I can get it to start !

so this is how my workaround works 

     #bamboo-agent-home/bin/bamboo-agent.sh start  sysd 

Nice solution :)

Like # people like this
yogesh_devi
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.
Dec 16, 2020

another way I figured is 

to change the effective JDK  is by changing the /usr/bin/java link to point to JDK 1,8 

 

ln -s /usr/java/<your JDK 1.8>/bin/java /usr/bin/java 

Like Paul Kelly likes this

Check wrapper.conf file there are some variables to set min-max java version, commenting them out works.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events