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

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

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.
December 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.
December 16, 2020

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 

hemant karole
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 16, 2020

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.
December 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
0 votes
hamza sağ
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2022

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