OOM Permgen space when running maven jetty plugin from jenkins, and not from shell

151 views
Skip to first unread message

Maxime Lem

unread,
Jun 7, 2011, 6:09:27 AM6/7/11
to Jenkins Users
Hi all,

I'm running a maven job in jenkins for some system tests. The project
is building a war that is then deployed and tested in an embedded
jetty with maven-jetty-plugin, during maven integration-test phase.

When I run mvn clean verify on my project from a shell, everything
works fine.
When I run the same goal from the jenkins' job, it fails with:

[INFO] [jetty:deploy-war {execution: start-jetty}]
...
[INFO] Starting jetty 6.1.26 ...
2011-06-07 11:54:30.007:INFO::jetty-6.1.26
2011-06-07 11:54:30.019:INFO::Extract /data/workspaces/hudson/jobs/
iprod-systests_workflow-management/workspace/trunk/iprod-workflow-
management-web/target/ode.war to /data/workspaces/hudson/jobs/iprod-
systests_workflow-management/workspace/trunk/iprod-workflow-management-
web/target/work/webapp
2011-06-07 11:54:30.796:INFO::No Transaction manager found - if your
webapp requires one, please configure one.
DEBUG [2011-06-07 11:54:31,159]: trying to load axis2.xml from
module: /WEB-INF/conf/axis2.xml
[org.apache.axis2.deployment.WarBasedAxisConfigurator] [<init>() 123]
2011-06-07 11:54:34.701:WARN::failed AxisServlet:
java.lang.OutOfMemoryError: PermGen space
2011-06-07 11:54:34.702:WARN::failed
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@1be08d65{/ode,/data/
workspaces/hudson/jobs/iprod-systests_workflow-management/workspace/
trunk/iprod-workflow-management-web/target/ode.war}:
java.lang.OutOfMemoryError: PermGen space
...
2011-06-07 11:54:34.702:WARN::Error starting handlers
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
...

I googled for this problem and it seems that OOM problems with jetty
plugin are quite frequent, but the workaround which consists in
increase jvm permgen space didn't succeed in my case.

I'm running with :
-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xms512m -Xmx1024m

What is strange is that it does work from shell.
How Jenkins could have a such impact?

Could jvm parameters be different from shell than from a jenkins'
run ?
JVM parameters has been set in MAVEN_OPTS in the bash_profile of the
user who is running jenkins.
I also added them in jenkins global configuration page ("global
MAVEN_OPTS").

Thanks for your help.
Maxime



Do you know what could be the pro
Reply all
Reply to author
Forward
0 new messages