Thanks. Answers below

On Tuesday, 2 February 2016, Christopher Schultz <
ch...@christopherschultz.net
<javascript:_e(%7B%7D,'cvml','ch...@christopherschultz.net');>> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 2/2/16 9:28 AM, Yuval Schwartz wrote:
> > On Tue, Feb 2, 2016 at 4:15 PM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Yuval,
> >
> > On 2/2/16 6:21 AM, Yuval Schwartz wrote:
> >>>> Hello again Christoph,
> >>>>
> >>>> I think there is a problem with the way that I installed the
> >>>> APR library. If you recall, I installed a compiled version
> >>>> from the distros with the commands yum install apr-devel
> >>>> openssl-devel tomcat-native
> >>>>
> >>>> I get the desired "Loaded APR based library" in my logs.
> >>>> However, every time I shut down tomcat I get a warning:
> >>>>
> >>>> WARNING [main]
> >>>> org.apache.tomcat.util.net.AbstractEndpoint.shutdownExecutor
> >>>> The executor associated with thread pool [http-apr-8080] has
> >>>> not fully shutdown. Some application threads may still be
> >>>> running
> >>>>
> >>>> If I remove the packages that I installed (yum remove
> >>>> apr-devel openssl-devel tomcat-native) then this warning goes
> >>>> away.
> >>>>
> >>>> Is there something that I forgot to configure when installing
> >>>> the APR library?
> >
> > What makes you think that something is wrong with the library?
> > Perhaps you are getting that WARNING because you have
> > still-running request-processing threads?
> >
> >
> >> Thanks, any ideas on how I can look into this then? I've tried
> >> looking at thread dumps and at the threads that are created and
> >> destroyed in my ServletContextListener's contextInitialize and
> >> contextDestroyed methods.
>
> So, just to confirm, when you attempt to shut-down Tomcat, you get
> that WARNING and if you take a thread dump after that warning, you
> have threads still running contextInitialized and contextDestroyed?


When I shut down I get that message (I am able to shut down successfully, I
just get that message right before).
I can't take a thread dump after I get the message because tomcat is no
longer running (i.e. There are no Java processes taking place for me to
perform a thread dump on).
I mentioned contextInitialized and contextDestroyed simply because I used
those methods to print information about threads that were running in order
to try to get a better idea of what's going on (i.e. Using
Thread.getAllStackTraces()).



>
> The thread the WARNING is talking about will be one of the HTTP
> request processor threads (it even tells you which thread pool is
> still in use: http-apr-8080). If you have some long-running requests,
> you may get that WARNING during shutdown, but shutdown can still
> succeed after those threads complete.
>
>
When I take a thread dump while the application is running I see threads
called http-apr-8080-exec-1, http-apr-8080-exec-2, etc. do these threads
belong to the pool that the warning is referring to?

Are you saying I don't need to pay attention to this warning?
As a side question: why should it concern me that a thread might stay open
when tomcat is shutting down? If tomcat is shutting down then won't all
threads be destroyed anyway?


> > If the library loads, I think you installed it properly ;)
> >
> >
> >> Yes, I just reinstalled by compiling the source code and I still
> >> get the same error...so it's not the library.
>
> If you are okay with the library version available from your Linux
> distro, you should stick with that.


I mentioned this point because, interestingly, when I don't use the apr
library (i.e. I use the standard nio) then I don't see the warning that
we're discussing.


>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlaxDPgACgkQ9CaO5/Lv0PAgbACeN/Pw1NF+f8Ak9HXeS27vlUKp
> 8QAAnirgkqU04C9kTVixWDuDz0jZeBE5
> =hEat
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to