Error: Jenkins Maven Build 137

+1 vote
I’ve created a Maven project that builds different Maven projects on Jenkins. The problem is that every time I build the project, I get the following error:

ERROR: Maven JVM terminated unexpectedly with exit code 137
Aug 8, 2018 in Jenkins by Tyrion anex
• 8,280 points

recategorized Nov 12, 2018 by Omkar 944 views
Does it work when you run these maven projects from the console instead of Jenkins?
Yes it works fine when I build it through the console. It just doesn't build when I build it from Jenkins.

6 answers to this question.

0 votes

Try increasing the values of the memory settings - in MAVEN_OPTS on Jenkins, e.g.

MAVEN_OPTS=-Xmx1.5G -XX:MaxPermSize=0.7G 

 This might help.

answered Aug 8, 2018 by Sophie may
• 9,530 points
0 votes

This is mostly a memory issue. Try restarting your Jenkins. Worked for me. Could use this temporary solution. If anybody has an explanation and a better solution for this error, please do let me know.

answered May 5 by Kanika
0 votes
This is definitely a memory issue. Reason - Few resources are not being freed up.

Right now I am following@Kanika's solution of restarting Jenkins(worked like a charm) but I'm sure there is a better solution to this.  

Still looking for a proper solution.
answered May 5 by Nishant
0 votes
As @Nishant mentioned, it a memory issue. Increase the maven memory and try if it works.
answered May 5 by Pam
+1 vote
I disagree with @Pam's answer. The problem is not with maven memory. The problem is with Virtual Machine memory. Increase the memory allocated to your VM. This did the trick for me!
answered May 5 by Danica
0 votes

I increased the memory using Global MAVEN_OPTS:

-Xmx4096m -Xms4096m

and it worked for me

answered May 5 by Yogesh

Related Questions In Jenkins

+1 vote
1 answer

Error: Maven runs with the wrong JDK on Jenkins

Perform the following steps: 1) Navigate to Manage ...READ MORE

answered Aug 8, 2018 in Jenkins by Sophie may
• 9,530 points
430 views
0 votes
1 answer

Jenkins - maven project fails at Build stage

To fix this, you need to change ...READ MORE

answered Aug 10, 2018 in Jenkins by Sophie may
• 9,530 points
180 views
0 votes
1 answer

Error saying "localhost:3001error" When trying to run a build - Jenkins

There are two possible issues with this ...READ MORE

answered Dec 19, 2018 in Jenkins by Kalgi
• 39,270 points
96 views
0 votes
1 answer

Why is it displaying Jenkins build failure for Android app

I think you should try this. Try Uninstalling ...READ MORE

answered Apr 12, 2018 in Jenkins by shubham
• 6,890 points
220 views
0 votes
1 answer

Error while communicating with remote Oracle DB through Jenkins-CI

I was also facing the same problem. ...READ MORE

answered Apr 25, 2018 in Jenkins by shubham
• 6,890 points
69 views
+2 votes
5 answers
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
112 views
0 votes
1 answer