RE: Debugging Tomcat during shutdown

2022-06-13 Thread Jean Pierre URKENS
Ok,

Didn't test it (it is started with suspend='n').
Just didn't know what the option was exactly doing, hence the question.

J.P.

-Original Message-
From: Mark Thomas 
Sent: maandag 13 juni 2022 14:58
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown

On 10/06/2022 07:19, Jean Pierre URKENS wrote:
> Could it depend on whether 'suspend=n' or 'suspend=y' is set on the
> jdwp options?

I haven't tested that. Have you?

My expectation is that it wouldn't have an impact since that option just
suspends the VM on start until the debugger attaches. I don't see any reason
why that would impact behaviour during JVM shutdown.

Mark


>
> JP
> -Original Message-
> From: Mark Thomas 
> Sent: woensdag 8 juni 2022 14:50
> To: users@tomcat.apache.org
> Subject: Re: Debugging Tomcat during shutdown
>
> On 08/06/2022 13:39, Jean Pierre URKENS wrote:
>> Indeed the servlet#destroy() method is called.
>>
>> That is however not the issue I was troubleshooting, I just mentioned
>> it as an example of a method I can't debug since the debug session is
>> killed before hitting the servlet#destroy() method.
>
> I can't recreate that problem. I have tested with 10.1.x, 8.5.x and
> 8.5.43 and in all cases, as long as I make sure a servlet has been
> loaded, execution stops at the breakpoint I have set.
>
>> What I am actually was trying to troubleshoot is spring context
>> cleanup which seems to happen after the servlet cleanups. Here e.g.
>> the stacktrace I was tackling:
>>
>> java.lang.NullPointerException
>>
>>   at
>> java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.
>> j
>> ava:1106)
>
> 
>
>> In the meantime I know why the NPE occurs, but it bothered me that I
>> couldn’t debug through it (debug session got killed before hitting
>> any breakpoint I activated, e.g. in Serverimpl#stop()).
>
> That is odd. I'd expect the debug session to be active as long as the
> JVM was running.
>
> One thing you could try is adding an additional breakpoint to the
> finally block in StandardServer.await(). That should allow you to
> control the shutdown process.
>
> A final thought. Are you sure you have the right source code in your IDE?
> While RHEL may based Tomcat 8.5.x on 8.5.43 they will have back-ported
> security and other fixes so the 8.5.43 source code from the ASF is
> unlikely to be a prefect match to what you have running. Often you can
> get away with it, but sometimes I have had issues with breakpoints not
> activating because I was using the wrong source code.
>
> Glad you fixed the NPE anyway.
>
> Mark
>
>
>>
>>
>>
>> -Original Message-
>> From: Mark Thomas 
>> Sent: woensdag 8 juni 2022 14:23
>> To: users@tomcat.apache.org
>> Subject: Re: Debugging Tomcat during shutdown
>>
>>
>>
>> On 08/06/2022 11:54, Jean Pierre URKENS wrote:
>>
>>> Hi Mark,
>>
>>>
>>
>>> I know the version is quite old, but that is what the client
>>> currently
>>
>>> has installed.
>>
>>
>>
>> ACK.
>>
>>
>>
>>> I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL
>>
>>> 7.x server).
>>
>>
>>
>> Good. I think that is likely to be the best option in this case.
>>
>>
>>
>>> We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE
>>
>>> server instances.
>>
>>
>>
>> When you say servlet clean-up actions, what exactly do you mean? The
>>
>> Servlet.destroy() method?
>>
>>
>>
>> Generally, I'd recommend a ServletContextListener for resource clean-up.
>>
>> Partly that is personal preference - I find it cleaner if all the
>> code is in one place - and partly it is avoiding potential issues
>> around containers destroying unused servlets while the web app is
>> running.
>> Most
>>
>> (all) containers won't do this but you never know.
>>
>>
>>
>> Meanwhile, I'm planning on some local testing to see if I can
>> recreate the issue you are seeing.
>>
>>
>>
>> Mark
>>
>>
>>
>>
>>
>>>
>>
>>> J.P.
>>
>>>
>>
>>>
>>
>>>
>>
>>> -Original Message-
>>
>>> From: Mark Thomas 
>>
>>> Sent: woensdag 8 juni 2022 12:45
>>
>>> To: users@tomcat.apache.org
>>
>>> Subject: Re: Debugging Tomcat during shutdown
>>
>>

Re: Debugging Tomcat during shutdown

2022-06-13 Thread Mark Thomas

On 10/06/2022 07:19, Jean Pierre URKENS wrote:

Could it depend on whether 'suspend=n' or 'suspend=y' is set on the jdwp
options?


I haven't tested that. Have you?

My expectation is that it wouldn't have an impact since that option just 
suspends the VM on start until the debugger attaches. I don't see any 
reason why that would impact behaviour during JVM shutdown.


Mark




JP
-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 14:50
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown

On 08/06/2022 13:39, Jean Pierre URKENS wrote:

Indeed the servlet#destroy() method is called.

That is however not the issue I was troubleshooting, I just mentioned
it as an example of a method I can't debug since the debug session is
killed before hitting the servlet#destroy() method.


I can't recreate that problem. I have tested with 10.1.x, 8.5.x and
8.5.43 and in all cases, as long as I make sure a servlet has been loaded,
execution stops at the breakpoint I have set.


What I am actually was trying to troubleshoot is spring context
cleanup which seems to happen after the servlet cleanups. Here e.g.
the stacktrace I was tackling:

java.lang.NullPointerException

  at
java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.j
ava:1106)





In the meantime I know why the NPE occurs, but it bothered me that I
couldn’t debug through it (debug session got killed before hitting any
breakpoint I activated, e.g. in Serverimpl#stop()).


That is odd. I'd expect the debug session to be active as long as the JVM
was running.

One thing you could try is adding an additional breakpoint to the finally
block in StandardServer.await(). That should allow you to control the
shutdown process.

A final thought. Are you sure you have the right source code in your IDE?
While RHEL may based Tomcat 8.5.x on 8.5.43 they will have back-ported
security and other fixes so the 8.5.43 source code from the ASF is unlikely
to be a prefect match to what you have running. Often you can get away with
it, but sometimes I have had issues with breakpoints not activating because
I was using the wrong source code.

Glad you fixed the NPE anyway.

Mark






-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 14:23
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown



On 08/06/2022 11:54, Jean Pierre URKENS wrote:


Hi Mark,







I know the version is quite old, but that is what the client
currently



has installed.




ACK.




I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL



7.x server).




Good. I think that is likely to be the best option in this case.




We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE



server instances.




When you say servlet clean-up actions, what exactly do you mean? The

Servlet.destroy() method?



Generally, I'd recommend a ServletContextListener for resource clean-up.

Partly that is personal preference - I find it cleaner if all the code
is in one place - and partly it is avoiding potential issues around
containers destroying unused servlets while the web app is running.
Most

(all) containers won't do this but you never know.



Meanwhile, I'm planning on some local testing to see if I can recreate
the issue you are seeing.



Mark










J.P.















-Original Message-



From: Mark Thomas 



Sent: woensdag 8 juni 2022 12:45



To: users@tomcat.apache.org



Subject: Re: Debugging Tomcat during shutdown







On 08/06/2022 11:29, Jean Pierre URKENS wrote:



I am trying to debug the cleanup of resources during a shutdown of



Tomcat



8.5.43







That is a rather old version. I'd recommend upgrading.







and notices that my debug session gets killed prior to performing
any



servlet cleanup actions.







I am starting Tomcat in debug mode with the JVM options:







JAVA_OPTS="$JAVA_OPTS -Xdebug



-Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"







Is this normal behavior? How do I debug tomcat in this scenario.







How are you triggering shutdown?







Mark







-



To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org



For additional commands, e-mail: users-h...@tomcat.apache.org







-



To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org



For additional commands, e-mail: users-h...@tomcat.apache.org








-

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.

RE: Debugging Tomcat during shutdown

2022-06-10 Thread Jean Pierre URKENS
Could it depend on whether 'suspend=n' or 'suspend=y' is set on the jdwp
options?

JP
-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 14:50
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown

On 08/06/2022 13:39, Jean Pierre URKENS wrote:
> Indeed the servlet#destroy() method is called.
>
> That is however not the issue I was troubleshooting, I just mentioned
> it as an example of a method I can't debug since the debug session is
> killed before hitting the servlet#destroy() method.

I can't recreate that problem. I have tested with 10.1.x, 8.5.x and
8.5.43 and in all cases, as long as I make sure a servlet has been loaded,
execution stops at the breakpoint I have set.

> What I am actually was trying to troubleshoot is spring context
> cleanup which seems to happen after the servlet cleanups. Here e.g.
> the stacktrace I was tackling:
>
> java.lang.NullPointerException
>
>  at
> java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.j
> ava:1106)



> In the meantime I know why the NPE occurs, but it bothered me that I
> couldn’t debug through it (debug session got killed before hitting any
> breakpoint I activated, e.g. in Serverimpl#stop()).

That is odd. I'd expect the debug session to be active as long as the JVM
was running.

One thing you could try is adding an additional breakpoint to the finally
block in StandardServer.await(). That should allow you to control the
shutdown process.

A final thought. Are you sure you have the right source code in your IDE?
While RHEL may based Tomcat 8.5.x on 8.5.43 they will have back-ported
security and other fixes so the 8.5.43 source code from the ASF is unlikely
to be a prefect match to what you have running. Often you can get away with
it, but sometimes I have had issues with breakpoints not activating because
I was using the wrong source code.

Glad you fixed the NPE anyway.

Mark


>
>
>
> -Original Message-
> From: Mark Thomas 
> Sent: woensdag 8 juni 2022 14:23
> To: users@tomcat.apache.org
> Subject: Re: Debugging Tomcat during shutdown
>
>
>
> On 08/06/2022 11:54, Jean Pierre URKENS wrote:
>
>> Hi Mark,
>
>>
>
>> I know the version is quite old, but that is what the client
>> currently
>
>> has installed.
>
>
>
> ACK.
>
>
>
>> I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL
>
>> 7.x server).
>
>
>
> Good. I think that is likely to be the best option in this case.
>
>
>
>> We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE
>
>> server instances.
>
>
>
> When you say servlet clean-up actions, what exactly do you mean? The
>
> Servlet.destroy() method?
>
>
>
> Generally, I'd recommend a ServletContextListener for resource clean-up.
>
> Partly that is personal preference - I find it cleaner if all the code
> is in one place - and partly it is avoiding potential issues around
> containers destroying unused servlets while the web app is running.
> Most
>
> (all) containers won't do this but you never know.
>
>
>
> Meanwhile, I'm planning on some local testing to see if I can recreate
> the issue you are seeing.
>
>
>
> Mark
>
>
>
>
>
>>
>
>> J.P.
>
>>
>
>>
>
>>
>
>> -Original Message-
>
>> From: Mark Thomas 
>
>> Sent: woensdag 8 juni 2022 12:45
>
>> To: users@tomcat.apache.org
>
>> Subject: Re: Debugging Tomcat during shutdown
>
>>
>
>> On 08/06/2022 11:29, Jean Pierre URKENS wrote:
>
>>> I am trying to debug the cleanup of resources during a shutdown of
>
>>> Tomcat
>
>>> 8.5.43
>
>>
>
>> That is a rather old version. I'd recommend upgrading.
>
>>
>
>>> and notices that my debug session gets killed prior to performing
>>> any
>
>>> servlet cleanup actions.
>
>>>
>
>>> I am starting Tomcat in debug mode with the JVM options:
>
>>>
>
>>> JAVA_OPTS="$JAVA_OPTS -Xdebug
>
>>> -Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"
>
>>>
>
>>> Is this normal behavior? How do I debug tomcat in this scenario.
>
>>
>
>> How are you triggering shutdown?
>
>>
>
>> Mark
>
>>
>
>> -
>
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>>
>
>> -
>
&

Re: Debugging Tomcat during shutdown

2022-06-08 Thread Mark Thomas

On 08/06/2022 13:39, Jean Pierre URKENS wrote:

Indeed the servlet#destroy() method is called.

That is however not the issue I was troubleshooting, I just mentioned it as
an example of a method I can't debug since the debug session is killed
before hitting the servlet#destroy() method.


I can't recreate that problem. I have tested with 10.1.x, 8.5.x and 
8.5.43 and in all cases, as long as I make sure a servlet has been 
loaded, execution stops at the breakpoint I have set.



What I am actually was trying to troubleshoot is spring context cleanup
which seems to happen after the servlet cleanups. Here e.g. the stacktrace
I was tackling:

java.lang.NullPointerException

 at
java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106)





In the meantime I know why the NPE occurs, but it bothered me that I
couldn’t debug through it (debug session got killed before hitting any
breakpoint I activated, e.g. in Serverimpl#stop()).


That is odd. I'd expect the debug session to be active as long as the 
JVM was running.


One thing you could try is adding an additional breakpoint to the 
finally block in StandardServer.await(). That should allow you to 
control the shutdown process.


A final thought. Are you sure you have the right source code in your 
IDE? While RHEL may based Tomcat 8.5.x on 8.5.43 they will have 
back-ported security and other fixes so the 8.5.43 source code from the 
ASF is unlikely to be a prefect match to what you have running. Often 
you can get away with it, but sometimes I have had issues with 
breakpoints not activating because I was using the wrong source code.


Glad you fixed the NPE anyway.

Mark






-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 14:23
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown



On 08/06/2022 11:54, Jean Pierre URKENS wrote:


Hi Mark,







I know the version is quite old, but that is what the client currently



has installed.




ACK.




I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL



7.x server).




Good. I think that is likely to be the best option in this case.




We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE



server instances.




When you say servlet clean-up actions, what exactly do you mean? The

Servlet.destroy() method?



Generally, I'd recommend a ServletContextListener for resource clean-up.

Partly that is personal preference - I find it cleaner if all the code is
in one place - and partly it is avoiding potential issues around containers
destroying unused servlets while the web app is running. Most

(all) containers won't do this but you never know.



Meanwhile, I'm planning on some local testing to see if I can recreate the
issue you are seeing.



Mark










J.P.















-Original Message-



From: Mark Thomas 



Sent: woensdag 8 juni 2022 12:45



To: users@tomcat.apache.org



Subject: Re: Debugging Tomcat during shutdown







On 08/06/2022 11:29, Jean Pierre URKENS wrote:



I am trying to debug the cleanup of resources during a shutdown of



Tomcat



8.5.43







That is a rather old version. I'd recommend upgrading.







and notices that my debug session gets killed prior to performing any



servlet cleanup actions.







I am starting Tomcat in debug mode with the JVM options:







JAVA_OPTS="$JAVA_OPTS -Xdebug



-Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"







Is this normal behavior? How do I debug tomcat in this scenario.







How are you triggering shutdown?







Mark







-



To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org



For additional commands, e-mail: users-h...@tomcat.apache.org







-



To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org



For additional commands, e-mail: users-h...@tomcat.apache.org








-

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Debugging Tomcat during shutdown

2022-06-08 Thread Jean Pierre URKENS
Indeed the servlet#destroy() method is called.



That is however not the issue I was troubleshooting, I just mentioned it as
an example of a method I can't debug since the debug session is killed
before hitting the servlet#destroy() method.

What I am actually was trying to troubleshoot is spring context cleanup
which seems to happen after the servlet cleanups. Here e.g. the stacktrace
I was tackling:



java.lang.NullPointerException

at
java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106)

at
java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097)

at
org.apache.cxf.transport.http.DestinationRegistryImpl.removeDestination(DestinationRegistryImpl.java:67)

at
org.apache.cxf.transport.http.AbstractHTTPDestination.deactivate(AbstractHTTPDestination.java:942)

at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:65)

at
org.apache.cxf.endpoint.ServerImpl.stop(ServerImpl.java:187)

at
org.apache.cxf.endpoint.ServerImpl.destroy(ServerImpl.java:193)

at
org.apache.cxf.bus.managers.ServerRegistryImpl.preShutdown(ServerRegistryImpl.java:88)

at
org.apache.cxf.bus.managers.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:97)

at
org.apache.cxf.bus.extension.ExtensionManagerBus.shutdown(ExtensionManagerBus.java:289)

at
org.apache.cxf.bus.extension.ExtensionManagerBus.shutdown(ExtensionManagerBus.java:276)

at
org.apache.cxf.bus.spring.SpringBus.onApplicationEvent(SpringBus.java:108)

at
org.apache.cxf.bus.spring.SpringBus$1.onApplicationEvent(SpringBus.java:57)

at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)

at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)

at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1059)

at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1020)

at
org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)

at
org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)

at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4839)

at
org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)

at
org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)

at
org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1439)

at
org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1428)

at
java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)



In the meantime I know why the NPE occurs, but it bothered me that I
couldn’t debug through it (debug session got killed before hitting any
breakpoint I activated, e.g. in Serverimpl#stop()).



-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 14:23
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown



On 08/06/2022 11:54, Jean Pierre URKENS wrote:

> Hi Mark,

>

> I know the version is quite old, but that is what the client currently

> has installed.



ACK.



> I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL

> 7.x server).



Good. I think that is likely to be the best option in this case.



> We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE

> server instances.



When you say servlet clean-up actions, what exactly do you mean? The

Servlet.destroy() method?



Generally, I'd recommend a ServletContextListener for resource clean-up.

Partly that is personal preference - I find it cleaner if all the code is
in one place - and partly it is avoiding potential issues around containers
destroying unused servlets while the web app is running. Most

(all) containers won't do this but you never know.



Meanwhile, I'm planning on some local testing to see if I can recreate the
issue you are seeing.



Mark





>

> J.P.

>

>

>

> -Original Message-

> From: Mark Thomas 

> Sent: woensdag 8 juni 2022 12:45

> To: users@tomcat

Re: Debugging Tomcat during shutdown

2022-06-08 Thread Mark Thomas

On 08/06/2022 11:54, Jean Pierre URKENS wrote:

Hi Mark,

I know the version is quite old, but that is what the client currently has
installed.


ACK.


I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL 7.x
server).


Good. I think that is likely to be the best option in this case.


We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE server
instances.


When you say servlet clean-up actions, what exactly do you mean? The 
Servlet.destroy() method?


Generally, I'd recommend a ServletContextListener for resource clean-up. 
Partly that is personal preference - I find it cleaner if all the code 
is in one place - and partly it is avoiding potential issues around 
containers destroying unused servlets while the web app is running. Most 
(all) containers won't do this but you never know.


Meanwhile, I'm planning on some local testing to see if I can recreate 
the issue you are seeing.


Mark




J.P.



-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 12:45
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown

On 08/06/2022 11:29, Jean Pierre URKENS wrote:

I am trying to debug the cleanup of resources during a shutdown of
Tomcat
8.5.43


That is a rather old version. I'd recommend upgrading.


and notices that my debug session gets killed prior to performing any
servlet cleanup actions.

I am starting Tomcat in debug mode with the JVM options:

JAVA_OPTS="$JAVA_OPTS -Xdebug
-Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"

Is this normal behavior? How do I debug tomcat in this scenario.


How are you triggering shutdown?

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Debugging Tomcat during shutdown

2022-06-08 Thread Jean Pierre URKENS
Hi Mark,

I know the version is quite old, but that is what the client currently has
installed.
I  am shutting Tomcat down with ${TOMCAT_HOME}/bin/shutdown.sh (RHEL 7.x
server).
We've got TOMCAT_HOME under '/opt/tomcat8' and several TOMCAT_BASE server
instances.

J.P.



-Original Message-
From: Mark Thomas 
Sent: woensdag 8 juni 2022 12:45
To: users@tomcat.apache.org
Subject: Re: Debugging Tomcat during shutdown

On 08/06/2022 11:29, Jean Pierre URKENS wrote:
> I am trying to debug the cleanup of resources during a shutdown of
> Tomcat
> 8.5.43

That is a rather old version. I'd recommend upgrading.

> and notices that my debug session gets killed prior to performing any
> servlet cleanup actions.
>
> I am starting Tomcat in debug mode with the JVM options:
>
> JAVA_OPTS="$JAVA_OPTS -Xdebug
> -Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"
>
> Is this normal behavior? How do I debug tomcat in this scenario.

How are you triggering shutdown?

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Debugging Tomcat during shutdown

2022-06-08 Thread Mark Thomas

On 08/06/2022 11:29, Jean Pierre URKENS wrote:

I am trying to debug the cleanup of resources during a shutdown of Tomcat
8.5.43


That is a rather old version. I'd recommend upgrading.


and notices that my debug session gets killed prior to performing
any servlet cleanup actions.

I am starting Tomcat in debug mode with the JVM options:

JAVA_OPTS="$JAVA_OPTS -Xdebug
-Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n"

Is this normal behavior? How do I debug tomcat in this scenario.


How are you triggering shutdown?

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org