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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 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

 

 

 

1 answer

1 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 

Suggest an answer

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

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

481 views 5 7
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