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
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check wrapper.conf file there are some variables to set min-max java version, commenting them out works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.