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 Cloud -> Server FAIL : GrailsStarter

Andy Norris Jan 16, 2017

Trying to migrate from Bamboo Cloud to Bamboo Server and can't figure out why it's having trouble finding what it needs. I've checked to make sure it's running under the bamboo user. The JAVA_HOME, GRAILS_HOME, and PATH all seem to be right. The versions are right (we're using Grails 2.4.4, building with JRE 1.7 – Bamboo running on 1.8).

Not finding much by googling or searching support. Great thanks for any help!


Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter

1 answer

0 votes
Przemek Bruski Atlassian Team Jan 16, 2017

Is this coming from a local agent or elastic agent?

Andy Norris Jan 16, 2017

I knew I'd not put enough info in there... This is an AWS instance built by the Bamboo EC2 Wizard. After creating the instance, I installed Grails via sdkman, the Java JRE 1.7 (required by our platform), and set everything up in /etc/environment. I have a script running in the build task to echo the paths, versions, whoami, etc. and it looks ok from there.

build 16-Jan-2017 19:09:52 ENVIRONMENT VARIABLES:
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52 bamboo_shortPlanName=Sandbox
build 16-Jan-2017 19:09:52 bamboo_buildNumber=9
build 16-Jan-2017 19:09:52 LESSOPEN=| /usr/bin/lesspipe %s
build 16-Jan-2017 19:09:52 bamboo_capability_system_jdk_JDK=/usr/lib/jvm/java-8-openjdk-amd64/jre
build 16-Jan-2017 19:09:52 USER=bamboo
build 16-Jan-2017 19:09:52 bamboo_shortJobName=Default Job
build 16-Jan-2017 19:09:52 SHLVL=1
build 16-Jan-2017 19:09:52 bamboo_dependenciesDisabled=false
build 16-Jan-2017 19:09:52 OLDPWD=/media/atlassian-data/home/bamboo
build 16-Jan-2017 19:09:52 HOME=/media/atlassian-data/home/bamboo
build 16-Jan-2017 19:09:52 bamboo_buildResultKey=LS-SB-JOB1-9
build 16-Jan-2017 19:09:52 bamboo_buildPlanName=andbox - Default Job
build 16-Jan-2017 19:09:52 bamboo_planKey=LS-SB
build 16-Jan-2017 19:09:52 LOGNAME=bamboo
build 16-Jan-2017 19:09:52 bamboo_buildResultsUrl=https://ec2-....compute-1.amazonaws.com/browse/LS-SB-JOB1-9
build 16-Jan-2017 19:09:52 bamboo_agentWorkingDirectory=/media/atlassian-data/data/bamboo/current/xml-data/build-dir
build 16-Jan-2017 19:09:52 bamboo_planName=Sandbox
build 16-Jan-2017 19:09:52 bamboo_planRepository_revision=17695
build 16-Jan-2017 19:09:52 TERM=xterm-256color
build 16-Jan-2017 19:09:52 bamboo_capability_system_jdk_JDK_1_7_0_95=/usr/lib/jvm/java-7-openjdk-amd64/jre
build 16-Jan-2017 19:09:52 bamboo_capability_system_builder_grailsBuilder_Grails_2_4_4=/opt/sdkman/candidates/grails/current/bin
build 16-Jan-2017 19:09:52 PATH=/media/atlassian-data/home/bamboo/bin:/media/atlassian-data/home/bamboo/.local/bin:/opt/sdkman/candidates/grails/2.4.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
build 16-Jan-2017 19:09:52 bamboo_capability_system_jdk_JDK_1_8_0_111__JRE_=/usr/lib/jvm/java-8-openjdk-amd64/jre
build 16-Jan-2017 19:09:52 JAVA_OPTS=-Xms512m -Xmx1024m -Dbamboo.setup.settings=/media/atlassian-data/data/bamboo/current/bamboo_setup_settings.properties -Djdk.tls.ephemeralDHKeySize=2048
build 16-Jan-2017 19:09:52 bamboo_agentId=163841
build 16-Jan-2017 19:09:52 bamboo_capability_system_jdk_JDK_1_8=/usr/lib/jvm/java-8-openjdk-amd64/jre
build 16-Jan-2017 19:09:52 LANG=en_US.UTF-8
build 16-Jan-2017 19:09:52 bamboo_resultsUrl=https://ec2-....compute-1.amazonaws.com/browse/LS-SB-JOB1-9
build 16-Jan-2017 19:09:52 SHELL=/bin/bash
build 16-Jan-2017 19:09:52 XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
build 16-Jan-2017 19:09:52 bamboo_repository_622594_svn_branchPath=
build 16-Jan-2017 19:09:52 GRAILS_HOME=/opt/sdkman/candidates/grails/2.4.4
build 16-Jan-2017 19:09:52 bamboo_plan_storageTag=plan-425985
build 16-Jan-2017 19:09:52 bamboo_planRepository_1_branchPath=
build 16-Jan-2017 19:09:52 bamboo_shortPlanKey=SB
build 16-Jan-2017 19:09:52 bamboo_repository_previous_revision_number=17695
build 16-Jan-2017 19:09:52 LESSCLOSE=/usr/bin/lesspipe %s %s
build 16-Jan-2017 19:09:52 bamboo_buildKey=LS-SB-JOB1
build 16-Jan-2017 19:09:52 NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
build 16-Jan-2017 19:09:52 PWD=/media/atlassian-data/data/bamboo/current/xml-data/build-dir/LS-SB-JOB1
build 16-Jan-2017 19:09:52 JAVA_HOME=/opt/java/jdk1.8.0_45
build 16-Jan-2017 19:09:52 bamboo_shortJobKey=JOB1
build 16-Jan-2017 19:09:52 bamboo_build_working_directory=/media/atlassian-data/data/bamboo/current/xml-data/build-dir/LS-SB-JOB1
build 16-Jan-2017 19:09:52 bamboo_repository_622594_revision_number=17695
build 16-Jan-2017 19:09:52 bamboo_working_directory=/media/atlassian-data/data/bamboo/current/xml-data/build-dir/LS-SB-JOB1
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52 GRAILS_HOME:
build 16-Jan-2017 19:09:52 /opt/sdkman/candidates/grails/2.4.4
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52 JAVA_HOME:
build 16-Jan-2017 19:09:52 /opt/java/jdk1.8.0_45
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52 PATH:
build 16-Jan-2017 19:09:52 /media/atlassian-data/home/bamboo/bin:/media/atlassian-data/home/bamboo/.local/bin:/opt/sdkman/candidates/grails/2.4.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52
build 16-Jan-2017 19:09:52 GRAILS VERSION:
build 16-Jan-2017 19:09:58 Grails version: 2.4.4
build 16-Jan-2017 19:09:59
build 16-Jan-2017 19:09:59
build 16-Jan-2017 19:09:59 JAVA VERSION:
error 16-Jan-2017 19:09:59 java version "1.8.0_45"
error 16-Jan-2017 19:09:59 Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
error 16-Jan-2017 19:09:59 Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
build 16-Jan-2017 19:09:59
build 16-Jan-2017 19:09:59
build 16-Jan-2017 19:09:59 WHOAMI:
build 16-Jan-2017 19:09:59 bamboo

Andy Norris Jan 16, 2017

Another piece is that when I run the command in a shell, it works fine.

> cd /media/atlassian-data/data/bamboo/current/xml-data/build-dir/LS-SB-JOB1

> /opt/sdkman/candidates/grails/current/bin//grails refresh-dependencies --non-interactive

> Dependencies refreshed

Andy Norris Jan 16, 2017

/opt/sdkman/candidates/grails/current/bin//grails clean --non-interactive

Fails, too. Works on the command line. I am comparing against out cloud instance that works, but not seeing much difference.

Przemek Bruski Atlassian Team Jan 16, 2017

It looks like grails is run with Java 8, is this expected?

Andy Norris Jan 16, 2017

No, I'm wanting it to run with 1.7. I have the JVM set the same way as I have it in the cloud.

Screenshot 2017-01-16 15.31.50.pngScreenshot 2017-01-16 15.31.13.png

Przemek Bruski Atlassian Team Jan 16, 2017

Not in the same way wink Cloud did not allow the use of local agents.

You probably need to modify PATH in your Grails-running task.

Andy Norris Jan 16, 2017

Thank you. I will try that.

Andy Norris Jan 16, 2017

Hrm... I have it calling Java 1.7 now, but still the problem persists... How can I be sure which version Grails is using? Are you suggesting putting something like ${system.PATH} in the variables section for the task?

Andy Norris Jan 19, 2017

Here's a weird – and hopeful thing... if I put the commands in a script plugin and run it, it works. But the grails plugin does not.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

7,701 views 23 36
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