I'm trying to use Bamboo to make a simple maven build, but I'm stuck with an error I don't understand.
The system is trying to launch the "fork()" function, but is failing, and I can't understand why. Rebooting the server, restarting the Bamboo application don't have an impact on this. Any idea?
Here's the logging output :
|16-Dec-2014 09:09:42||Starting task 'Maven clean' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'|
Beginning to execute external process for build 'my-server-project - Project Server - Default Job #5 (SSSER-SSSMS-JOB1-5)'
... running command line:
/usr/bin/mvn --batch-mode -Djava.io.tmpdir=/opt/atlassian/bamboo/current/temp/SSSER-SSSMS-JOB1 clean
... in: /data/atlassian/application-data/xml-data/build-dir/SSSER-SSSMS-JOB1
... using extra environment variables:
bamboo_planName=my-server-project - Project Server
bamboo_buildPlanName=my-server-project - Project Server - Default Job
|16-Dec-2014 09:10:14||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:15||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:17||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:21||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:29||/usr/share/java-utils/java-functions: fork: Resource temporarily unavailable|
|16-Dec-2014 09:10:29||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:30||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:32||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:36||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:44||/usr/share/java-utils/java-functions: fork: Resource temporarily unavailable|
|16-Dec-2014 09:10:44||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:45||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:47||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:51||/usr/share/java-utils/java-functions: fork: retry: No child processes|
|16-Dec-2014 09:10:59||/usr/share/java-utils/java-functions: fork: Resource temporarily unavailable|
|16-Dec-2014 09:11:00||Failing task since return code of [/usr/bin/mvn --batch-mode -Djava.io.tmpdir=/opt/atlassian/bamboo/current/temp/SSSER-SSSMS-JOB1 clean] was 254 while expected 0|
|16-Dec-2014 09:11:00||Finished task 'Maven clean' with result: Failed|
I had a similar problem. Maven build worked properly in terminal but failed when done through Bamboo. System was Centos 7 with the distribution's default Maven (3.0.5)
Manually upgraded to Maven 3.2.5, pointed m2_home and other env variables, and build now works correctly.
My mistake, I took the same configuration I used for Jira. I'm going to install JRE 7 and try again.
I have attempted to run the mvn test manually. I ran into another problem which was my maven configuration (the servers don't have an access to Internet and I'm using Sonatype Nexus as a proxy), but at least I have a more understandable output.
Edit : I installed JDK 7 (Update 60), and made sure Bamboo uses it (I used 'alternatives' and $JAVA_HOME env variable). The result is the same...
Thank you for your question.
I have noticed you are running Bamboo using Java SDK 1.8 which is not officially supported based Bamboo - Supported Platforms documentation. I would suggest you on downgrading it to SDK 1.7.
Rafael P. Sperafico
Thank you for your update.
The reason I asked you to attempt to run the same build from a Terminal is to eliminate the possibility Bamboo is causing the error you are experiencing. Due to that, I would suggest you on making sure you are able to run this build successfully from a Terminal and after that set it up in Bamboo.
Rafael P. Sperafico
Thank you for your help. I've just built the project using mvn and the bamboo user, and it worked like a charm.
I've used the very same commands shown in the log output :
cd /data/atlassian/application-data/xml-data/build-dir/SSSER-SSSMS-JOB1 /usr/bin/mvn --batch-mode -Djava.io.tmpdir=/opt/atlassian/bamboo/current/temp/SSSER-SSSMS-JOB1 clean test
I re-checked the JVM used by Bamboo in the "System information" panel, and it is the 1.7.0_60 from Oracle Corporation, which I also use for compilation.
Hello Emeric, Thank you for you update. I would kindly ask you to accept the answer so the same will be visible to others who might be facing the same issue you have inquired, please. Thank you for your understanding. — Kind regards, Rafael P. Sperafico Atlassian Support
No, I'm being misunderstood. I meant "testing the maven commands generated by Bamboo manually run perfectly, but it still fails when I run it from Bamboo". I'm going to do a fresh install of Bamboo, on another OS (I'm running CentOS 7), to see if I can reproduce my problem. Again, thank you for your help.
I just ran into the problem specified by the OP (lots of "no child process" messages). On my CentOS 7 box, where Bamboo Server is running on JDK 1.8, I have the default maven installed:
$ mvn -version Apache Maven 3.0.5 (Red Hat 3.0.5-16) Maven home: /usr/share/maven Java version: 1.7.0_99, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-22.214.171.124-126.96.36.199.el7_2.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-327.10.1.el7.x86_64", arch: "amd64", family: "unix"
I had originally set the Maven path to
/bin/mvn, but the Maven 3.x plugin adds that to the specified path and then can't run
/. didn't work. Using
/usr/share/maven as the path in the executable specification worked.
Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs