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,360,831
Community Members
 
Community Events
168
Community Groups

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

Edited

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

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 yogesh_devi likes this

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 

0 votes

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
Community showcase
Published in Bamboo

Bamboo 9.0 is now available

Hey there, Data Center community! I'm Martyna Wojtas and I am the Product Manager for Bamboo Data Center. I’m excited to share that Bamboo 9.0 is now available. We purpose-built this platform to help...

310 views 0 7
Read article

Atlassian Community Events