Hello Manuel,

On Sat, May 25, 2013 at 10:41 PM, Manuel LeNormand <
manuel.lenorm...@gmail.com> wrote:

> Hello all,
> I have a Solr instance running on a Tomcat 6 servlet, everything worked
> fine.
> While upgrading to Tomcat 7.0.34, I get exceptions I'm having a hard time
> to deal with.
> Two kind of exceptions occur on shutdown of service:
> 1. Memory leak due to threads that do not close - I understand it is not
> severe, and maybe on previous version was not monitored. Still, is there
> anything that is done on the servlet side that might resolve it, and what
> might be sides effects of this?
>

Remove following lines from server.xml:
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener
className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

They do no good unless you are hotdeploying new versions of wars in running
production servers, and no one does that ;-)

regards
Leon



> 2. Instance of MBeans that cannot be destroyed - btw,  the MBean instance
> is initiated under CATALINA_OPTS.
>
> Thanks in advance,
> Manuel
>
> Here are the LOGS:
> INFO: A valid shutdown command was received via the shutdown port. Stopping
> the Server instance.
> May 13, 2013 4:22:32 PM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-8080"]
> May 13, 2013 4:22:32 PM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
> May 13, 2013 4:22:32 PM org.apache.catalina.core.StandardService
> stopInternal
> INFO: Stopping service Catalina
> May 13, 2013 4:22:35 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/solr] appears to have started a thread named
> [localhost-startStop-1-SendThread(zookeeper2:2181)] but has failed to stop
> it. This is very likely to create a memory leak.
> May 13, 2013 4:22:35 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/solr] appears to have started a thread named
> [localhost-startStop-1-EventThread] but has failed to stop it. This is very
> likely to create a memory leak.
> May 13, 2013 4:22:35 PM org.apache.catalina.loader.WebappClassLoader
> checkThreadLocalMapForLeaks
> SEVERE: The web application [/solr] created a ThreadLocal with key of type
> [org.apache.solr.schema.DateField.ThreadLocalDateFormat] (value
> [org.apache.solr.schema.DateField$ThreadLocalDateFormat@19c212b0]) and a
> value of type [org.apache.solr.schema.DateField.ISO8601CanonicalDateFormat]
> (value
> [org.apache.solr.schema.DateField$ISO8601CanonicalDateFormat@6b2ed43a])
> but failed to remove it when the web application was stopped. Threads are
> going to be renewed over time to try and avoid a probable memory leak.
> May 13, 2013 4:22:35 PM org.apache.catalina.loader.WebappClassLoader
> checkThreadLocalMapForLeaks
> SEVERE: The web application [/solr] created a ThreadLocal with key of type
> [org.apache.solr.schema.DateField.ThreadLocalDateFormat] (value
> [org.apache.solr.schema.DateField$ThreadLocalDateFormat@19c212b0]) and a
> value of type [org.apache.solr.schema.DateField.ISO8601CanonicalDateFormat]
> (value
> [org.apache.solr.schema.DateField$ISO8601CanonicalDateFormat@6b2ed43a])
> but failed to remove it when the web application was stopped. Threads are
> going to be renewed over time to try and avoid a probable memory leak.
> May 13, 2013 4:22:35 PM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["http-bio-8080"]
> May 13, 2013 4:22:35 PM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
> May 13, 2013 4:22:35 PM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["http-bio-8080"]
> May 13, 2013 4:22:35 PM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
> May 13, 2013 4:22:35 PM org.apache.catalina.util.LifecycleMBeanBase
> unregister
> WARNING: Failed to unregister MBean with name
> [Catalina:type=Executor,name=tomcatThreadPool] during component destruction
> javax.management.InstanceNotFoundException:
> Catalina:type=Executor,name=tomcatThreadPool
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown
> Source)
>         at
>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(Unknown
> Source)
>         at
>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(Unknown
> Source)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(Unknown
> Source)
>         at
>
> org.apache.catalina.util.LifecycleMBeanBase.unregister(LifecycleMBeanBase.java:194)
>         at
>
> org.apache.catalina.util.LifecycleMBeanBase.destroyInternal(LifecycleMBeanBase.java:73)
>         at
>
> org.apache.catalina.core.StandardThreadExecutor.destroyInternal(StandardThreadExecutor.java:150)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
>         at
>
> org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
>         at
>
> org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:822)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
>         at org.apache.catalina.startup.Catalina.stop(Catalina.java:752)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:713)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
>
> May 13, 2013 4:22:35 PM org.apache.catalina.deploy.NamingResources
> destroyInternal
> WARNING: Failed to destroy MBean for naming resource [UserDatabase]
> javax.management.InstanceNotFoundException:
> Users:type=UserDatabase,database=UserDatabase
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown
> Source)
>         at
>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(Unknown
> Source)
>         at
>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(Unknown
> Source)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(Unknown
> Source)
>         at
>
> org.apache.catalina.mbeans.MBeanUtils.destroyMBeanUserDatabase(MBeanUtils.java:1621)
>         at
> org.apache.catalina.mbeans.MBeanUtils.destroyMBean(MBeanUtils.java:1207)
>         at
>
> org.apache.catalina.deploy.NamingResources.destroyInternal(NamingResources.java:1084)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
>         at
>
> org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:825)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
>         at org.apache.catalina.startup.Catalina.stop(Catalina.java:752)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:713)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
>

Reply via email to