我有一台使用ubuntu 14.04并运行tomcat8的服务器。添加几个站点后,谁的war文件没有自动部署,我决定重新启动tomcat来部署它们。结果我得到了这个错误:
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
我一直在阅读有关permgen的内容,并将以下内容添加到我的setenv.sh文件中:
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"
这没有帮助。我如何清除permgen并找到问题的根源。尝试重新启动tomcat并立即catalina.out显示permgen错误,因此完全卡住了。