PermGen causing tomcat startup failure

178 views Asked by At

I have a server using ubuntu 14.04 and running tomcat8. After adding a few sites, who's war files did not automatically deploy, i decided to restart tomcat to get them deployed. I have as a result got this error:

26-Jun-2015 12:28:43.482 SEVERE [Catalina-startStop-1] org.apache.catalina.startup.HostConfig.deployWARs Error waiting for multi-thread deployment of WAR files to complete
 java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:732)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1499)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:287)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:934)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: PermGen space

26-Jun-2015 12:28:47.528 SEVERE [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
 java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: java.lang.OutOfMemoryError: PermGen space

26-Jun-2015 12:28:47.529 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
 org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 11 more

26-Jun-2015 12:28:47.529 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
26-Jun-2015 12:28:47.530 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8443"]
26-Jun-2015 12:28:47.530 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
26-Jun-2015 12:28:47.530 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
/var/lib/tomcat8/shercock/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:37:43.606+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:37:43.668+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:37:43.668+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:37:43.669+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:37:43.670+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/westport/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:37:57.066+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:37:57.123+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:37:57.124+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:37:57.124+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:37:57.125+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/boyle/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:38:10.343+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:38:10.430+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:38:10.430+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:38:10.431+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:38:10.432+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/fairshare/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:38:25.044+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:38:25.095+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:38:25.096+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:38:25.096+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:38:25.097+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/police/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:38:38.180+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:38:38.238+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:38:38.238+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:38:38.239+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:38:38.239+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/slane/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:38:51.620+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:38:51.674+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:38:51.675+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:38:51.675+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:38:51.676+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/ibdemo/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:39:05.371+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:39:05.424+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:39:05.425+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:39:05.425+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:39:05.425+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/coop/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
2015-06-26T12:39:19.940+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=JITCompiler
2015-06-26T12:39:19.996+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Config
2015-06-26T12:39:19.997+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ParserStats
2015-06-26T12:39:19.997+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=ClassCache
2015-06-26T12:39:19.998+01:00: BeanManagerImpl: mbean already registered: org.jruby:type=Runtime,name=0,service=Runtime
/var/lib/tomcat8/bannvale/ROOT/WEB-INF/gems/gems/dbi-0.4.5/lib/dbi/handles.rb:12 warning: optional boolean argument is obsoleted
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space

I've been reading about permgen and have added the following to my setenv.sh file:

export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"

This has not helped. How do i go about clearing permgen and locating the source of the problem. Have tried restarting tomcat again and immediately catalina.out shows a permgen error so totally stuck.

0

There are 0 answers