RE: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.
Thanks, we aren’t allowed to until you guys fully release. 😊

From: Christopher Schultz 
Sent: Thursday, November 7, 2024 4:54 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 17: 37, Mcalexander, Jon J. wrote: > Thank you. ☹ You could 
grab the just-rolled 9. 0. 97. It's already got 2 +1 votes. -chris > From: 
Christopher Schultz  > Sent: Thursday, November


Jon,



On 11/7/24 17:37, Mcalexander, Jon J. wrote:

> Thank you. ☹



You could grab the just-rolled 9.0.97.



It's already got 2 +1 votes.



-chris



> From: Christopher Schultz 
> mailto:ch...@christopherschultz.net>>

> Sent: Thursday, November 7, 2024 4:16 PM

> To: users@tomcat.apache.org<mailto:users@tomcat.apache.org>

> Subject: Re: Tomcat Service(s) on Windows, Procmon question

>

> Jon, On 11/7/24 14: 53, Mcalexander, Jon J. wrote: > Sorry to top-reply, but 
> does this regression exist in 10. 1. 31 as well, or only 9. 0. 96? It's all 
> of the October releases :/ -chris > From: Christopher Schultz  christopherschultz. net>

>

>

> Jon,

>

>

>

> On 11/7/24 14:53, Mcalexander, Jon J. wrote:

>

>> Sorry to top-reply, but does this regression exist in 10.1.31 as well, or 
>> only 9.0.96?

>

>

>

> It's all of the October releases :/

>

>

>

> -chris

>

>

>

>> From: Christopher Schultz 
>> mailto:ch...@christopherschultz.net<mailto:ch...@christopherschultz.net%3cmailto:ch...@christopherschultz.net>>>

>

>> Sent: Thursday, November 7, 2024 1:16 PM

>

>> To: 
>> users@tomcat.apache.org<mailto:users@tomcat.apache.org<mailto:users@tomcat.apache.org%3cmailto:users@tomcat.apache.org>>

>

>> Subject: Re: Tomcat Service(s) on Windows, Procmon question

>

>>

>

>> Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday 
>> everybody, > > I have a question around starting a Tomcat Service Instance 
>> on Windows servers. Is there a way to have the Tomcat Startup kick off a 
>> script before starting

>

>>

>

>>

>

>> Jon,

>

>>

>

>>

>

>>

>

>> On 11/7/24 13:08, Mcalexander, Jon J. wrote:

>

>>

>

>>> Happy Thursday everybody,

>

>>

>

>>>

>

>>

>

>>> I have a question around starting a Tomcat Service Instance on Windows 
>>> servers. Is there a way to have the Tomcat Startup kick off a script before 
>>> starting that will clear the contents of the workDir (Clear the cache so to 
>>> say)?

>

>>

>

>>>

>

>>

>

>>> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
>>> where applications start throwing some unknown method errors when starting. 
>>> The fix for this was to clear the workDir contents before startup and let 
>>> Tomcat do it's recompile steps. Note, the app didn't change, but the 
>>> binaries did.

>

>>

>

>>

>

>>

>

>> Please note that there is a regression in 9.0.96 that you need to be

>

>>

>

>> aware of that affects JSPs. It will affect you, since you are reporting

>

>>

>

>> (a) missing method errors and (b) you want to clear your work directory,

>

>>

>

>> presumably to remove .jsp -> .java -> .class files to trigger

>

>>

>

>> recompilation of all of those.

>

>>

>

>>

>

>>

>

>> I would pause and NOT deploy 9.0.96 because recompilation will stop the

>

>>

>

>> app from throwing those missing-method errors, but some tags might

>

>>

>

>> actually not behave properly.

>

>>

>

>>

>

>>

>

>>> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just 
>>> need to restart their instance after the upgrade.

>

>>

>

>>>

>

>>

>

>>> Doing this in Linux/Unix/MAC, is easier as we can do this with the 
>>> setenv.sh script or in the startup or shutdown scripts. However Windows is 
>>> more difficult as the instance runs as a service.

>

>>

>

>>>

>

>>

>

>>> Any help here would be much appreciated.

>

>>

>

>>

>

>>

>

>> As to your question about procrun running a script before it launches

>

>>

>

>> Tomcat, I think the short answer is "no" but I do have an idea for you.

>

>>

>

>>

>

>>

>

>> Create a new servi

Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Christopher Schultz

Rob,

On 11/7/24 17:54, Rob Sargent wrote:


Thanks for this information Chris. I can probably create this 
dependency, but then I wouldn’t want it to be running all the time, 
will having it as a dependency start said service? I could use 
Procrun to probably do this service, but then how do I tell it to run 
and then stop?


I honestly have no idea. I think if you have a script-as-a-service, it 
will run and then just finish.


-chris



Does it matter much that the service is "running" but doing nothing 
after having cleaned up?


Again, I have no idea. I don't admin Windows, these are just educated 
guesses given my limited experience.


-chris


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



Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Rob Sargent


Thanks for this information Chris. I can probably create this 
dependency, but then I wouldn’t want it to be running all the time, 
will having it as a dependency start said service? I could use 
Procrun to probably do this service, but then how do I tell it to run 
and then stop?


I honestly have no idea. I think if you have a script-as-a-service, it 
will run and then just finish.


-chris



Does it matter much that the service is "running" but doing nothing 
after having cleaned up?




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



Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Christopher Schultz

Jon,

On 11/7/24 17:37, Mcalexander, Jon J. wrote:

Thank you. ☹


You could grab the just-rolled 9.0.97.

It's already got 2 +1 votes.

-chris


From: Christopher Schultz 
Sent: Thursday, November 7, 2024 4:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 14: 53, Mcalexander, Jon J. wrote: > Sorry to top-reply, but does this 
regression exist in 10. 1. 31 as well, or only 9. 0. 96? It's all of the October releases 
:/ -chris > From: Christopher Schultz 


Jon,



On 11/7/24 14:53, Mcalexander, Jon J. wrote:


Sorry to top-reply, but does this regression exist in 10.1.31 as well, or only 
9.0.96?




It's all of the October releases :/



-chris




From: Christopher Schultz 
mailto:ch...@christopherschultz.net>>



Sent: Thursday, November 7, 2024 1:16 PM



To: users@tomcat.apache.org<mailto:users@tomcat.apache.org>



Subject: Re: Tomcat Service(s) on Windows, Procmon question







Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, > 
> I have a question around starting a Tomcat Service Instance on Windows servers. Is 
there a way to have the Tomcat Startup kick off a script before starting











Jon,















On 11/7/24 13:08, Mcalexander, Jon J. wrote:







Happy Thursday everybody,















I have a question around starting a Tomcat Service Instance on Windows servers. 
Is there a way to have the Tomcat Startup kick off a script before starting 
that will clear the contents of the workDir (Clear the cache so to say)?















We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
where applications start throwing some unknown method errors when starting. The 
fix for this was to clear the workDir contents before startup and let Tomcat do 
it's recompile steps. Note, the app didn't change, but the binaries did.















Please note that there is a regression in 9.0.96 that you need to be







aware of that affects JSPs. It will affect you, since you are reporting







(a) missing method errors and (b) you want to clear your work directory,







presumably to remove .jsp -> .java -> .class files to trigger







recompilation of all of those.















I would pause and NOT deploy 9.0.96 because recompilation will stop the







app from throwing those missing-method errors, but some tags might







actually not behave properly.















We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need to 
restart their instance after the upgrade.















Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
script or in the startup or shutdown scripts. However Windows is more difficult 
as the instance runs as a service.















Any help here would be much appreciated.















As to your question about procrun running a script before it launches







Tomcat, I think the short answer is "no" but I do have an idea for you.















Create a new service called Tomcat-cleanup, make it a simply BAT/PS







script that cleans-out that directory, and make it a startup dependency







of the real Tomcat service.















-chris























-







To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org%3cmailto:users-unsubscr...@tomcat.apache.org>>







For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org%3cmailto:users-h...@tomcat.apache.org>>


















-

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

For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto: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: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.
Thank you. ☹

From: Christopher Schultz 
Sent: Thursday, November 7, 2024 4:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 14: 53, Mcalexander, Jon J. wrote: > Sorry to top-reply, but 
does this regression exist in 10. 1. 31 as well, or only 9. 0. 96? It's all of 
the October releases :/ -chris > From: Christopher Schultz 


Jon,



On 11/7/24 14:53, Mcalexander, Jon J. wrote:

> Sorry to top-reply, but does this regression exist in 10.1.31 as well, or 
> only 9.0.96?



It's all of the October releases :/



-chris



> From: Christopher Schultz 
> mailto:ch...@christopherschultz.net>>

> Sent: Thursday, November 7, 2024 1:16 PM

> To: users@tomcat.apache.org<mailto:users@tomcat.apache.org>

> Subject: Re: Tomcat Service(s) on Windows, Procmon question

>

> Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday 
> everybody, > > I have a question around starting a Tomcat Service Instance on 
> Windows servers. Is there a way to have the Tomcat Startup kick off a script 
> before starting

>

>

> Jon,

>

>

>

> On 11/7/24 13:08, Mcalexander, Jon J. wrote:

>

>> Happy Thursday everybody,

>

>>

>

>> I have a question around starting a Tomcat Service Instance on Windows 
>> servers. Is there a way to have the Tomcat Startup kick off a script before 
>> starting that will clear the contents of the workDir (Clear the cache so to 
>> say)?

>

>>

>

>> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
>> where applications start throwing some unknown method errors when starting. 
>> The fix for this was to clear the workDir contents before startup and let 
>> Tomcat do it's recompile steps. Note, the app didn't change, but the 
>> binaries did.

>

>

>

> Please note that there is a regression in 9.0.96 that you need to be

>

> aware of that affects JSPs. It will affect you, since you are reporting

>

> (a) missing method errors and (b) you want to clear your work directory,

>

> presumably to remove .jsp -> .java -> .class files to trigger

>

> recompilation of all of those.

>

>

>

> I would pause and NOT deploy 9.0.96 because recompilation will stop the

>

> app from throwing those missing-method errors, but some tags might

>

> actually not behave properly.

>

>

>

>> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need 
>> to restart their instance after the upgrade.

>

>>

>

>> Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
>> script or in the startup or shutdown scripts. However Windows is more 
>> difficult as the instance runs as a service.

>

>>

>

>> Any help here would be much appreciated.

>

>

>

> As to your question about procrun running a script before it launches

>

> Tomcat, I think the short answer is "no" but I do have an idea for you.

>

>

>

> Create a new service called Tomcat-cleanup, make it a simply BAT/PS

>

> script that cleans-out that directory, and make it a startup dependency

>

> of the real Tomcat service.

>

>

>

> -chris

>

>

>

>

>

> -

>

> To unsubscribe, e-mail: 
> users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org%3cmailto:users-unsubscr...@tomcat.apache.org>>

>

> For additional commands, e-mail: 
> users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org%3cmailto:users-h...@tomcat.apache.org>>

>

>

>





-

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

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




Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Christopher Schultz

Jon,

On 11/7/24 14:29, Mcalexander, Jon J. wrote:



From: Christopher Schultz 
Sent: Thursday, November 7, 2024 1:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, > 
> I have a question around starting a Tomcat Service Instance on Windows servers. Is 
there a way to have the Tomcat Startup kick off a script before starting


Jon,



On 11/7/24 13:08, Mcalexander, Jon J. wrote:


Happy Thursday everybody,







I have a question around starting a Tomcat Service Instance on Windows servers. 
Is there a way to have the Tomcat Startup kick off a script before starting 
that will clear the contents of the workDir (Clear the cache so to say)?







We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
where applications start throwing some unknown method errors when starting. The 
fix for this was to clear the workDir contents before startup and let Tomcat do 
it's recompile steps. Note, the app didn't change, but the binaries did.




Please note that there is a regression in 9.0.96 that you need to be

aware of that affects JSPs. It will affect you, since you are reporting

(a) missing method errors and (b) you want to clear your work directory,

presumably to remove .jsp -> .java -> .class files to trigger

recompilation of all of those.



I would pause and NOT deploy 9.0.96 because recompilation will stop the

app from throwing those missing-method errors, but some tags might

actually not behave properly.




We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need to 
restart their instance after the upgrade.







Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
script or in the startup or shutdown scripts. However Windows is more difficult 
as the instance runs as a service.







Any help here would be much appreciated.




As to your question about procrun running a script before it launches

Tomcat, I think the short answer is "no" but I do have an idea for you.



Create a new service called Tomcat-cleanup, make it a simply BAT/PS

script that cleans-out that directory, and make it a startup dependency

of the real Tomcat service.



[Mcalexander, Jon J.]

Thanks for this information Chris. I can probably create this dependency, but 
then I wouldn’t want it to be running all the time, will having it as a 
dependency start said service? I could use Procrun to probably do this service, 
but then how do I tell it to run and then stop?


I honestly have no idea. I think if you have a script-as-a-service, it 
will run and then just finish.


-chris


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



Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Christopher Schultz

Jon,

On 11/7/24 14:53, Mcalexander, Jon J. wrote:

Sorry to top-reply, but does this regression exist in 10.1.31 as well, or only 
9.0.96?


It's all of the October releases :/

-chris


From: Christopher Schultz 
Sent: Thursday, November 7, 2024 1:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, > 
> I have a question around starting a Tomcat Service Instance on Windows servers. Is 
there a way to have the Tomcat Startup kick off a script before starting


Jon,



On 11/7/24 13:08, Mcalexander, Jon J. wrote:


Happy Thursday everybody,







I have a question around starting a Tomcat Service Instance on Windows servers. 
Is there a way to have the Tomcat Startup kick off a script before starting 
that will clear the contents of the workDir (Clear the cache so to say)?







We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
where applications start throwing some unknown method errors when starting. The 
fix for this was to clear the workDir contents before startup and let Tomcat do 
it's recompile steps. Note, the app didn't change, but the binaries did.




Please note that there is a regression in 9.0.96 that you need to be

aware of that affects JSPs. It will affect you, since you are reporting

(a) missing method errors and (b) you want to clear your work directory,

presumably to remove .jsp -> .java -> .class files to trigger

recompilation of all of those.



I would pause and NOT deploy 9.0.96 because recompilation will stop the

app from throwing those missing-method errors, but some tags might

actually not behave properly.




We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need to 
restart their instance after the upgrade.







Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
script or in the startup or shutdown scripts. However Windows is more difficult 
as the instance runs as a service.







Any help here would be much appreciated.




As to your question about procrun running a script before it launches

Tomcat, I think the short answer is "no" but I do have an idea for you.



Create a new service called Tomcat-cleanup, make it a simply BAT/PS

script that cleans-out that directory, and make it a startup dependency

of the real Tomcat service.



-chris





-

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

For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto: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: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.
From: david w 
Sent: Thursday, November 7, 2024 2:09 PM
To: Tomcat Users List 
Subject: Re: Tomcat Service(s) on Windows, Procmon question

 Sent: Thursday, November 7, 2024 8: 53 PM To: 
Tomcat Users List  Subject: RE: Tomcat Service(s) 
on Windows, Procmon question Sorry to top-reply, but does this regression exist 
in










Sent: Thursday, November 7, 2024 8:53 PM

To: Tomcat Users List mailto:users@tomcat.apache.org>>

Subject: RE: Tomcat Service(s) on Windows, Procmon question



Sorry to top-reply, but does this regression exist in 10.1.31 as well, or only 
9.0.96?



From: Christopher Schultz 
mailto:ch...@christopherschultz.net>>

Sent: Thursday, November 7, 2024 1:16 PM

To: users@tomcat.apache.org<mailto:users@tomcat.apache.org>

Subject: Re: Tomcat Service(s) on Windows, Procmon question



Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, 
> > I have a question around starting a Tomcat Service Instance on Windows 
servers. Is there a way to have the Tomcat Startup kick off a script before 
starting





Jon,







On 11/7/24 13:08, Mcalexander, Jon J. wrote:



> Happy Thursday everybody,



>



> I have a question around starting a Tomcat Service Instance on Windows 
> servers. Is there a way to have the Tomcat Startup kick off a script before 
> starting that will clear the contents of the workDir (Clear the cache so to 
> say)?



>



> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
> where applications start throwing some unknown method errors when starting. 
> The fix for this was to clear the workDir contents before startup and let 
> Tomcat do it's recompile steps. Note, the app didn't change, but the binaries 
> did.







Please note that there is a regression in 9.0.96 that you need to be



aware of that affects JSPs. It will affect you, since you are reporting



(a) missing method errors and (b) you want to clear your work directory,



presumably to remove .jsp -> .java -> .class files to trigger



recompilation of all of those.







I would pause and NOT deploy 9.0.96 because recompilation will stop the



app from throwing those missing-method errors, but some tags might



actually not behave properly.







> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need 
> to restart their instance after the upgrade.



>



> Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
> script or in the startup or shutdown scripts. However Windows is more 
> difficult as the instance runs as a service.



>



> Any help here would be much appreciated.







As to your question about procrun running a script before it launches



Tomcat, I think the short answer is "no" but I do have an idea for you.







Create a new service called Tomcat-cleanup, make it a simply BAT/PS



script that cleans-out that directory, and make it a startup dependency



of the real Tomcat service.







-chris











You can also create a scheduled task that starts every time a Windows service 
starts and this task could run your script for you.

this script would require possibly administrator rights in order to actually 
perform any file operations that your script would need to do, but this is your 
call and it wouldn’t compromise the tomcat service or service account so could 
be an alternative.

David



-



To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org%3cmailto:users-unsubscr...@tomcat.apache.org>>



For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org%3cmailto:users-h...@tomcat.apache.org>>





[Mcalexander, Jon J.]

Thanks David, will test that out!


Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread david w




Sent: Thursday, November 7, 2024 8:53 PM
To: Tomcat Users List 
Subject: RE: Tomcat Service(s) on Windows, Procmon question

Sorry to top-reply, but does this regression exist in 10.1.31 as well, or only 
9.0.96?

From: Christopher Schultz 
Sent: Thursday, November 7, 2024 1:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, 
> > I have a question around starting a Tomcat Service Instance on Windows 
servers. Is there a way to have the Tomcat Startup kick off a script before 
starting


Jon,



On 11/7/24 13:08, Mcalexander, Jon J. wrote:

> Happy Thursday everybody,

>

> I have a question around starting a Tomcat Service Instance on Windows 
> servers. Is there a way to have the Tomcat Startup kick off a script before 
> starting that will clear the contents of the workDir (Clear the cache so to 
> say)?

>

> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
> where applications start throwing some unknown method errors when starting. 
> The fix for this was to clear the workDir contents before startup and let 
> Tomcat do it's recompile steps. Note, the app didn't change, but the binaries 
> did.



Please note that there is a regression in 9.0.96 that you need to be

aware of that affects JSPs. It will affect you, since you are reporting

(a) missing method errors and (b) you want to clear your work directory,

presumably to remove .jsp -> .java -> .class files to trigger

recompilation of all of those.



I would pause and NOT deploy 9.0.96 because recompilation will stop the

app from throwing those missing-method errors, but some tags might

actually not behave properly.



> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need 
> to restart their instance after the upgrade.

>

> Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
> script or in the startup or shutdown scripts. However Windows is more 
> difficult as the instance runs as a service.

>

> Any help here would be much appreciated.



As to your question about procrun running a script before it launches

Tomcat, I think the short answer is "no" but I do have an idea for you.



Create a new service called Tomcat-cleanup, make it a simply BAT/PS

script that cleans-out that directory, and make it a startup dependency

of the real Tomcat service.



-chris





You can also create a scheduled task that starts every time a Windows service 
starts and this task could run your script for you.
this script would require possibly administrator rights in order to actually 
perform any file operations that your script would need to do, but this is your 
call and it wouldn’t compromise the tomcat service or service account so could 
be an alternative.
David

-

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

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




RE: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.
Sorry to top-reply, but does this regression exist in 10.1.31 as well, or only 
9.0.96?

From: Christopher Schultz 
Sent: Thursday, November 7, 2024 1:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, 
> > I have a question around starting a Tomcat Service Instance on Windows 
servers. Is there a way to have the Tomcat Startup kick off a script before 
starting


Jon,



On 11/7/24 13:08, Mcalexander, Jon J. wrote:

> Happy Thursday everybody,

>

> I have a question around starting a Tomcat Service Instance on Windows 
> servers. Is there a way to have the Tomcat Startup kick off a script before 
> starting that will clear the contents of the workDir (Clear the cache so to 
> say)?

>

> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
> where applications start throwing some unknown method errors when starting. 
> The fix for this was to clear the workDir contents before startup and let 
> Tomcat do it's recompile steps. Note, the app didn't change, but the binaries 
> did.



Please note that there is a regression in 9.0.96 that you need to be

aware of that affects JSPs. It will affect you, since you are reporting

(a) missing method errors and (b) you want to clear your work directory,

presumably to remove .jsp -> .java -> .class files to trigger

recompilation of all of those.



I would pause and NOT deploy 9.0.96 because recompilation will stop the

app from throwing those missing-method errors, but some tags might

actually not behave properly.



> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need 
> to restart their instance after the upgrade.

>

> Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
> script or in the startup or shutdown scripts. However Windows is more 
> difficult as the instance runs as a service.

>

> Any help here would be much appreciated.



As to your question about procrun running a script before it launches

Tomcat, I think the short answer is "no" but I do have an idea for you.



Create a new service called Tomcat-cleanup, make it a simply BAT/PS

script that cleans-out that directory, and make it a startup dependency

of the real Tomcat service.



-chris





-

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

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




RE: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.


From: Christopher Schultz 
Sent: Thursday, November 7, 2024 1:16 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Service(s) on Windows, Procmon question

Jon, On 11/7/24 13: 08, Mcalexander, Jon J. wrote: > Happy Thursday everybody, 
> > I have a question around starting a Tomcat Service Instance on Windows 
servers. Is there a way to have the Tomcat Startup kick off a script before 
starting


Jon,



On 11/7/24 13:08, Mcalexander, Jon J. wrote:

> Happy Thursday everybody,

>

> I have a question around starting a Tomcat Service Instance on Windows 
> servers. Is there a way to have the Tomcat Startup kick off a script before 
> starting that will clear the contents of the workDir (Clear the cache so to 
> say)?

>

> We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
> where applications start throwing some unknown method errors when starting. 
> The fix for this was to clear the workDir contents before startup and let 
> Tomcat do it's recompile steps. Note, the app didn't change, but the binaries 
> did.



Please note that there is a regression in 9.0.96 that you need to be

aware of that affects JSPs. It will affect you, since you are reporting

(a) missing method errors and (b) you want to clear your work directory,

presumably to remove .jsp -> .java -> .class files to trigger

recompilation of all of those.



I would pause and NOT deploy 9.0.96 because recompilation will stop the

app from throwing those missing-method errors, but some tags might

actually not behave properly.



> We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need 
> to restart their instance after the upgrade.

>

> Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
> script or in the startup or shutdown scripts. However Windows is more 
> difficult as the instance runs as a service.

>

> Any help here would be much appreciated.



As to your question about procrun running a script before it launches

Tomcat, I think the short answer is "no" but I do have an idea for you.



Create a new service called Tomcat-cleanup, make it a simply BAT/PS

script that cleans-out that directory, and make it a startup dependency

of the real Tomcat service.



[Mcalexander, Jon J.]

Thanks for this information Chris. I can probably create this dependency, but 
then I wouldn’t want it to be running all the time, will having it as a 
dependency start said service? I could use Procrun to probably do this service, 
but then how do I tell it to run and then stop?



Thanks,



-chris





-

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

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




Re: Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Christopher Schultz

Jon,

On 11/7/24 13:08, Mcalexander, Jon J. wrote:

Happy Thursday everybody,

I have a question around starting a Tomcat Service Instance on Windows servers. 
Is there a way to have the Tomcat Startup kick off a script before starting 
that will clear the contents of the workDir (Clear the cache so to say)?

We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
where applications start throwing some unknown method errors when starting. The 
fix for this was to clear the workDir contents before startup and let Tomcat do 
it's recompile steps. Note, the app didn't change, but the binaries did.


Please note that there is a regression in 9.0.96 that you need to be 
aware of that affects JSPs. It will affect you, since you are reporting 
(a) missing method errors and (b) you want to clear your work directory, 
presumably to remove .jsp -> .java -> .class files to trigger 
recompilation of all of those.


I would pause and NOT deploy 9.0.96 because recompilation will stop the 
app from throwing those missing-method errors, but some tags might 
actually not behave properly.



We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need to 
restart their instance after the upgrade.

Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
script or in the startup or shutdown scripts. However Windows is more difficult 
as the instance runs as a service.

Any help here would be much appreciated.


As to your question about procrun running a script before it launches 
Tomcat, I think the short answer is "no" but I do have an idea for you.


Create a new service called Tomcat-cleanup, make it a simply BAT/PS 
script that cleans-out that directory, and make it a startup dependency 
of the real Tomcat service.


-chris


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



Re: remote address is localhost after upgrading tomcat instance behind reverse proxy from tomcat8.5 to tomcat9

2024-11-07 Thread Christopher Schultz

Ivano,

On 11/7/24 05:38, Ivano Luberti wrote:

Hi Thomas,

Il 07-Nov-24 11:07, Mark Thomas ha scritto:

On 06/11/2024 21:17, Ivano Luberti wrote:
Hi, as stated in the subject, we had a correctly behaving tomcat 8.5 
behind a reverse proxy implemented with Apache.


After upgrading to Tomcat 9  every request is seen by tomcat as 
coming from localhost.


Apache and Tomcat are running on the same machine and reverse proxy 
is implemented forwarding the request to localhost.


To say it all, before the upgrade requests arrived to tomcat via ip 
v4 and after upgrade via ip v6


I have seen in the doc that there is a filter in tomcat to deal with 
this, but I would like to know why it was working with tomcat 8.5 and 
not with tomcat 9 and if there is a solution properly configuring 
Apache without touching Tomcat


If you upgraded Tomcat and are seeing changes in behaviour then 
doesn't that suggest Tomcat, rather than httpd, is where you need to 
make changes?


I was thinking more of an incomplete configuration in Apache , exposed 
by the upgrade (maybe I have bias with the people that had done that)


But after you suggestion I have looked into the old 
(working)server.xml)and discovered these few lines that I think explains 
it all


     

I will test them asap but I think this is definitely the reason.


If you are using HTTP(s) as your proxy protocol (instead of, for 
example, AJP), then this is 100% the issue you are experiencing.


It's important to configure the new Tomcat the same way the old Tomcat 
had been configured ;)


-chris


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



RE: Tomcat logging.properties AsyncFileHandler

2024-11-07 Thread Mcalexander, Jon J.
Thank you Chuck!

From: Chuck Caldarale 
Sent: Wednesday, November 6, 2024 6:22 PM
To: Tomcat Users List 
Subject: Re: Tomcat logging.properties AsyncFileHandler

> On Nov 6, 2024, at 17: 12, Mcalexander, Jon J.  com. invalid> wrote: > > Question kind people, > > Is there ANY 
> AsyncFileHandler property that can handle a MaxSize directive to specify the 
> size




> On Nov 6, 2024, at 17:12, Mcalexander, Jon J. 
> mailto:jonmcalexan...@wellsfargo.com.invalid>>
>  wrote:

>

> Question kind people,

>

> Is there ANY AsyncFileHandler property that can handle a MaxSize directive to 
> specify the size of the Catalina.out file for log rotation purposes? I see 
> that there appears to be a MaxDays, but we would like to rotate based on the 
> size of the log file.





If you’re running on a real operating system (ie, not Windows), look at the 
description for CATALINA_OUT_CMD in the catalina.sh file along with the man 
page for the Apache rotatelogs utility. (This appears to be installed by 
default on macOS and is included in the apache2-utils package on at least 
Ubuntu-based systems.) There is an optional filesize parameter for rotatelogs 
which should do what you want.



If you are on Windows, there’s always WSL...



  - Chuck





-

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

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




Tomcat Service(s) on Windows, Procmon question

2024-11-07 Thread Mcalexander, Jon J.
Happy Thursday everybody,

I have a question around starting a Tomcat Service Instance on Windows servers. 
Is there a way to have the Tomcat Startup kick off a script before starting 
that will clear the contents of the workDir (Clear the cache so to say)?

We have run into some issues after upgrading our binaries to Tomcat 9.0.96 
where applications start throwing some unknown method errors when starting. The 
fix for this was to clear the workDir contents before startup and let Tomcat do 
it's recompile steps. Note, the app didn't change, but the binaries did.

We separate our CATALINA_HOME from our CATALINA_BASE, so app teams just need to 
restart their instance after the upgrade.

Doing this in Linux/Unix/MAC, is easier as we can do this with the setenv.sh 
script or in the startup or shutdown scripts. However Windows is more difficult 
as the instance runs as a service.

Any help here would be much appreciated.

Thank you kindly!

Dream * Excel * Explore * Inspire
Jon McAlexander | Senior Infrastructure Engineer | Middleware/App Hosting | FHP 
| CTO | Wells Fargo Technology
8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010  | +1 515 988 2508 | 
jonmcalexan...@gmail.com<mailto:jonmcalexan...@gmail.com>
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.



Re: remote address is localhost after upgrading tomcat instance behind reverse proxy from tomcat8.5 to tomcat9

2024-11-07 Thread Ivano Luberti

Hi Thomas,

Il 07-Nov-24 11:07, Mark Thomas ha scritto:

On 06/11/2024 21:17, Ivano Luberti wrote:
Hi, as stated in the subject, we had a correctly behaving tomcat 8.5 
behind a reverse proxy implemented with Apache.


After upgrading to Tomcat 9  every request is seen by tomcat as 
coming from localhost.


Apache and Tomcat are running on the same machine and reverse proxy 
is implemented forwarding the request to localhost.


To say it all, before the upgrade requests arrived to tomcat via ip 
v4 and after upgrade via ip v6


I have seen in the doc that there is a filter in tomcat to deal with 
this, but I would like to know why it was working with tomcat 8.5 and 
not with tomcat 9 and if there is a solution properly configuring 
Apache without touching Tomcat


If you upgraded Tomcat and are seeing changes in behaviour then 
doesn't that suggest Tomcat, rather than httpd, is where you need to 
make changes?


I was thinking more of an incomplete configuration in Apache , exposed 
by the upgrade (maybe I have bias with the people that had done that)


But after you suggestion I have looked into the old 
(working)server.xml)and discovered these few lines that I think explains 
it all


    

I will test them asap but I think this is definitely the reason.




We'll need more information to provide useful advice including:

- which protocol are you using to reverse proxy from httpd to Tomcat

- httpd configuration for the reverse proxy

- Tomcat Connector configuration for whichever port(s) httpd is passing
  requests to

Mark


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


--

Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno 
2003 n. 196

per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa 
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>


Il contenuto di questo messaggio e dei suoi eventuali allegati è 
riservato. Nel caso in cui Lei non sia il destinatario, La preghiamo di 
contattare telefonicamente o via e-mail il mittente ai recapiti sopra 
indicati e di cancellare il messaggio e gli eventuali allegati dal Suo 
sistema senza farne copia o diffonderli. Le opinioni espresse sono 
quelle dell'autore e non rappresentano necessariamente quelle della Società.
This message and any attachment are confidential.If you are not the 
intended recipient, please telephone or email the sender and delete this 
message and any attachment from your system. If you are not the intended 
recipient you must not copy this message or attachment or disclose the 
contents to any other person. Any opinions presented are solely those of 
the author and do not necessarily represent those of the Company.


dott. Ivano Mario Luberti

Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa

tel.: +39 050/580959

web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/


Re: remote address is localhost after upgrading tomcat instance behind reverse proxy from tomcat8.5 to tomcat9

2024-11-07 Thread Mark Thomas

On 06/11/2024 21:17, Ivano Luberti wrote:
Hi, as stated in the subject, we had a correctly behaving tomcat 8.5 
behind a reverse proxy implemented with Apache.


After upgrading to Tomcat 9  every request is seen by tomcat as coming 
from localhost.


Apache and Tomcat are running on the same machine and reverse proxy is 
implemented forwarding the request to localhost.


To say it all, before the upgrade requests arrived to tomcat via ip v4 
and after upgrade via ip v6


I have seen in the doc that there is a filter in tomcat to deal with 
this, but I would like to know why it was working with tomcat 8.5 and 
not with tomcat 9 and if there is a solution properly configuring Apache 
without touching Tomcat


If you upgraded Tomcat and are seeing changes in behaviour then doesn't 
that suggest Tomcat, rather than httpd, is where you need to make changes?


We'll need more information to provide useful advice including:

- which protocol are you using to reverse proxy from httpd to Tomcat

- httpd configuration for the reverse proxy

- Tomcat Connector configuration for whichever port(s) httpd is passing
  requests to

Mark


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



Re: Tomcat logging.properties AsyncFileHandler

2024-11-06 Thread Chuck Caldarale


> On Nov 6, 2024, at 17:12, Mcalexander, Jon J. 
>  wrote:
> 
> Question kind people,
> 
> Is there ANY AsyncFileHandler property that can handle a MaxSize directive to 
> specify the size of the Catalina.out file for log rotation purposes? I see 
> that there appears to be a MaxDays, but we would like to rotate based on the 
> size of the log file.


If you’re running on a real operating system (ie, not Windows), look at the 
description for CATALINA_OUT_CMD in the catalina.sh file along with the man 
page for the Apache rotatelogs utility. (This appears to be installed by 
default on macOS and is included in the apache2-utils package on at least 
Ubuntu-based systems.) There is an optional filesize parameter for rotatelogs 
which should do what you want.

If you are on Windows, there’s always WSL...

  - Chuck


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



Tomcat logging.properties AsyncFileHandler

2024-11-06 Thread Mcalexander, Jon J.
Question kind people,

Is there ANY AsyncFileHandler property that can handle a MaxSize directive to 
specify the size of the Catalina.out file for log rotation purposes? I see that 
there appears to be a MaxDays, but we would like to rotate based on the size of 
the log file.

Thank you,

Dream * Excel * Explore * Inspire
Jon McAlexander | Senior Infrastructure Engineer | Middleware/App Hosting | FHP 
| CTO | Wells Fargo Technology
8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010  | +1 515 988 2508 | 
jonmcalexan...@gmail.com
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.



remote address is localhost after upgrading tomcat instance behind reverse proxy from tomcat8.5 to tomcat9

2024-11-06 Thread Ivano Luberti
Hi, as stated in the subject, we had a correctly behaving tomcat 8.5 
behind a reverse proxy implemented with Apache.


After upgrading to Tomcat 9  every request is seen by tomcat as coming 
from localhost.


Apache and Tomcat are running on the same machine and reverse proxy is 
implemented forwarding the request to localhost.


To say it all, before the upgrade requests arrived to tomcat via ip v4 
and after upgrade via ip v6


I have seen in the doc that there is a filter in tomcat to deal with 
this, but I would like to know why it was working with tomcat 8.5 and 
not with tomcat 9 and if there is a solution properly configuring Apache 
without touching Tomcat


TIA




--

Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno 
2003 n. 196

per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa 
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>


Il contenuto di questo messaggio e dei suoi eventuali allegati è 
riservato. Nel caso in cui Lei non sia il destinatario, La preghiamo di 
contattare telefonicamente o via e-mail il mittente ai recapiti sopra 
indicati e di cancellare il messaggio e gli eventuali allegati dal Suo 
sistema senza farne copia o diffonderli. Le opinioni espresse sono 
quelle dell'autore e non rappresentano necessariamente quelle della Società.
This message and any attachment are confidential.If you are not the 
intended recipient, please telephone or email the sender and delete this 
message and any attachment from your system. If you are not the intended 
recipient you must not copy this message or attachment or disclose the 
contents to any other person. Any opinions presented are solely those of 
the author and do not necessarily represent those of the Company.


dott. Ivano Mario Luberti

Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa

tel.: +39 050/580959

web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/


RE: [SOLVED] - Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-11-06 Thread Lucian Jurj
> Ok, so the idea is that init() has to be successful or the component will 
> never become started later on.
> Connectors are a bit special though. You can use bindOnInit to do the socket 
> bind and TLS start either in init (you don't want it to fail, and you want 
> the server to start accepting asap) or start (which allows stopping and 
> restarting later, new
> attempts after a failure, and so on).

> I don't know what the best default behavior after getting into a "failed 
> init" state should be for a component. Right now after destroy, it is not 
> possible to go back and simply call init again. I have the impression this is 
> the most reasonable behavior.

> Rémy

Rémy,

We've followed your advice and changed the code on our app side to avoid the 
error loading the connector keystore (i.e.  "java.io.FileNotFoundException: 
C:\Program Files\Neverfail\tomcat\ssl\NFKeyStore.jks (The system cannot find 
the path specified))" 
-> this SOLVED the original reported issue 😊. Now our webapp is working 
correctly, with keystore created before, thus being ready by the time tomcat 
connector "https-openssl-nio-9727" starts.

Here are catalina logs for successful load/init/start:
__
[...]
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache 
Tomcat Native library [1.3.1] using APR version [1.7.4].
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: 
IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL 
configuration: useAprConnector [false], useOpenSSL [true]
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL 
successfully initialized [OpenSSL 3.0.14 4 Jun 2024]
06-Nov-2024 11:40:29.202 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["http-nio-9728"]
06-Nov-2024 11:40:29.233 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["https-openssl-nio-9727"]
06-Nov-2024 11:40:34.405 INFO [main] 
org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
[https-openssl-nio-9727], TLS virtual host [_default_], certificate type 
[UNDEFINED] configured from keystore [../ssl/NFKeyStore.jks] using alias 
[nfhb_private_certificate] with trust store [null]
06-Nov-2024 11:40:34.405 INFO [main] org.apache.catalina.startup.Catalina.load 
Server initialization in [6698] milliseconds
06-Nov-2024 11:40:34.452 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Catalina]
06-Nov-2024 11:40:34.452 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: 
[Apache Tomcat/9.0.96]
06-Nov-2024 11:40:34.468 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]
06-Nov-2024 11:40:57.830 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war] has finished in 
[23,361] ms
[...]
__

Thank you for your guidance,
/LJ

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



Re: Regression in Apache Tomcat 9.0.96? Escape XML not working using taglib

2024-11-03 Thread Konstantin Kolinko
вс, 3 нояб. 2024 г. в 03:46, Frankowski, Adam :
>
> Hi,
>
>
>
> We have noticed an issue that occurred when we attempted to upgrade to Apache 
> Tomcat 9.0.96.  We found that the  standard taglib did not properly 
> escape XML strings anymore.  This can lead to cross-site scripting (XSS) 
> attacks if user input is not properly escaped.

There have been numerous reports about regression with lifecycle of
tags in Tomcat 9.0.96, all boiling down to

https://bz.apache.org/bugzilla/show_bug.cgi?id=69399
Bug 69399 - Tag.release() called between reuses

It is the first time I see a report about issues with . This
has not been treated as a security issue yet.

There is a workaround, see "Comment 1" in the bug report:


As a workaround, one may set enablePooling to false as described in
https://tomcat.apache.org/tomcat-9.0-doc/jasper-howto.html#Configuration.


Best regards,
Konstantin Kolinko

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



Regression in Apache Tomcat 9.0.96? Escape XML not working using taglib

2024-11-02 Thread Frankowski, Adam
Hi,

We have noticed an issue that occurred when we attempted to upgrade to Apache 
Tomcat 9.0.96.  We found that the  standard taglib did not properly 
escape XML strings anymore.  This can lead to cross-site scripting (XSS) 
attacks if user input is not properly escaped.

Has anybody else noticed this issue with 9.0.96?  Attached is a simple JSP file 
that demonstrates the problem.

Tomcat 9.0.95 produces the following output, which is expected.





   Escape bug
   
   <
   >
   "
   '
   &
       



Tomcat 9.0.96 products the following output, which I think may be incorrect.  
It escapes the first output, but not any subsequent outputs.










   Escape bug

   

   <

   >

   "

   '

   &

   





I haven't tracked down the source of the issue yet.  I haven't logged a bug in 
Bugzilla yet.  I thought I would start with a question to the users list to see 
if anyone else noticed the same behaviour.  If you have, please let me know.

Thank you for any and all replies,
Adam

<%@ page language="java" contentType="text/html" pageEncoding="UTF-8" %>

<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>

<%
String s1 = "<";
String s2 = ">";
String s3 = "\"";
String s4 = "'";
String s5 = "&";
%>





Escape bug










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

Re: Tomcat 10.1 STIGing

2024-10-29 Thread Christopher Schultz

Mark,

On 10/29/24 04:03, Mark Thomas wrote:

On 28/10/2024 21:44, Leroy Mims wrote:
My place of work prefers DISA STIGed software. I contacted DISA about 
STIGs

for Tomcat 10.1 and they said that the organization that produces the
software has to request that it be STIGed. The idea of applyingTomcat 9
STIGs to Tomcat 10.1 was rejected and DISA STIGs are preferable to CIS
Benchmarks.
Thank you.
Leroy Mims


I am not aware of any plans for the Tomcat team to request a STIG 
assessment for Tomcat 10. Should such a proposal be made, I would argue 
strongly NOT to make such a request.


-0

I kinda feel like if they want to write another guide that doesn't 
provide any security, they can go ahead. I don't know why "the vendor" 
needs to make a request. We certainly didn't make a request for Tomcat 9 
that I can recall and yet it seems to exist.


My personal recommendation is to avoid the STIG recommendations at all 
costs. The last time I reviewed the latest STIG for Tomcat it contained 
a large amount of utter nonsense. I've just looked up the latest 
recommendations (2024-05-23) for Tomcat 9 and it still contains this 
howler:


https://www.stigviewer.com/stig/ 
apache_tomcat_application_server_9/2024-05-23/finding/V-222950


That such a finding was written, reviewed and approved gives me zero 
confidence in the entire STIG process.


+1


We started a community review of the previous Tomcat 9 STIG:

https://cwiki.apache.org/confluence/display/TOMCAT/ 
Community+Review+of+DISA+STIG


I lost interest after the first half-dozen or so issues due to the sheer 
volume of problems I was finding and that no-one else seemed interested 
in either contributing or in the results.


Same here. After a while it just turned into reading "security controls" 
that didn't provide any security and/or completely misunderstood the 
settings. It seemed to miss a lot of things I would have in a decent 
runbook.


The CIS benchmarks appear to be of better quality but they still contain 
some issues such as not fully accounting for the correct secure 
connector settings when running Tomcat behind a reverse proxy.


I did reach out to the CIS benchmark folks to point out some of the 
errors I found but their response was rather disappointing. It was - 
essentially - join our review team and provide all the corrections for 
free (so we can then sell benchmark to commercial customers).


I don't mind contributing to community resources - I wouldn't be 
contributing to open source if I did - but I do object to being asked to 
provide my time at zero cost to support someone else's commercial product.


I 100% agree with this. We are happy to provide community support, but 
I'm not going to work for free for a commercial company to sell my work.


What I do recommend is start with the security how-to in the Tomcat docs 
and then ask any questions you have here.


While I agree with this, it's not going to make Leroy's employer any 
happier. They want a DISA STIG, they're gonna demand a DISA STIG.


-chris


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



Re: Tomcat 10.1 STIGing

2024-10-29 Thread Mark Thomas

On 28/10/2024 21:44, Leroy Mims wrote:

My place of work prefers DISA STIGed software. I contacted DISA about STIGs
for Tomcat 10.1 and they said that the organization that produces the
software has to request that it be STIGed. The idea of applyingTomcat 9
STIGs to Tomcat 10.1 was rejected and DISA STIGs are preferable to CIS
Benchmarks.
Thank you.
Leroy Mims


I am not aware of any plans for the Tomcat team to request a STIG 
assessment for Tomcat 10. Should such a proposal be made, I would argue 
strongly NOT to make such a request.


My personal recommendation is to avoid the STIG recommendations at all 
costs. The last time I reviewed the latest STIG for Tomcat it contained 
a large amount of utter nonsense. I've just looked up the latest 
recommendations (2024-05-23) for Tomcat 9 and it still contains this howler:


https://www.stigviewer.com/stig/apache_tomcat_application_server_9/2024-05-23/finding/V-222950

That such a finding was written, reviewed and approved gives me zero 
confidence in the entire STIG process.


We started a community review of the previous Tomcat 9 STIG:

https://cwiki.apache.org/confluence/display/TOMCAT/Community+Review+of+DISA+STIG

I lost interest after the first half-dozen or so issues due to the sheer 
volume of problems I was finding and that no-one else seemed interested 
in either contributing or in the results.


The CIS benchmarks appear to be of better quality but they still contain 
some issues such as not fully accounting for the correct secure 
connector settings when running Tomcat behind a reverse proxy.


I did reach out to the CIS benchmark folks to point out some of the 
errors I found but their response was rather disappointing. It was - 
essentially - join our review team and provide all the corrections for 
free (so we can then sell benchmark to commercial customers).


I don't mind contributing to community resources - I wouldn't be 
contributing to open source if I did - but I do object to being asked to 
provide my time at zero cost to support someone else's commercial product.


What I do recommend is start with the security how-to in the Tomcat docs 
and then ask any questions you have here.


Mark


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



Tomcat 10.1 STIGing

2024-10-28 Thread Leroy Mims
My place of work prefers DISA STIGed software. I contacted DISA about STIGs
for Tomcat 10.1 and they said that the organization that produces the
software has to request that it be STIGed. The idea of applyingTomcat 9
STIGs to Tomcat 10.1 was rejected and DISA STIGs are preferable to CIS
Benchmarks.
Thank you.
Leroy Mims


Re: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-28 Thread Rémy Maucherat
On Mon, Oct 28, 2024 at 11:41 AM Lucian Jurj  wrote:
>
>
> > Looking at "https-openssl-nio-9727" connector (ignoring "http-nio-9728") I 
> > see
>
> > 24-Oct-2024 12:27:14.109 INFO [main]
> > org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> > ["https-openssl-nio-9727"]
> > 24-Oct-2024 12:27:14.156 SEVERE [main] 
> > org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to 
> > initialize component [Connector["https-openssl-nio-9727"]]
> > org.apache.catalina.LifecycleException: Protocol handler
> > initialization failed
> ...
> > 24-Oct-2024 12:27:45.864 INFO [main]
> > org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
> > ["https-openssl-nio-9727"]
> > 24-Oct-2024 12:27:50.868 INFO [main]
> > org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
> > ["https-openssl-nio-9727"]
>
> > Thus failed init(), followed by stop() and start(). There is no attempt to 
> > re-run init().
>
> > Looking at org.apache.catalina.util.LifecycleBase, I think that init() 
> > results in LifecycleState.FAILED state, and that there is a bug in the
> > start() method.
>
> > In case of FAILED state the LifecycleState.start() method calls stop() and 
> > goes further to starting. The current issue demonstrates that this 
> > behaviour is wrong.
>
> > Maybe make separate error states, INIT_FAILED (aka not initialized), 
> > START_FAILED (not started). Starting a non-initialized component is a bad 
> > idea.
>
> > Automatically re-initializing a connector may not work as intended, as 
> > there exist configurations where init() is called with different privileges 
> > than start(). (See "Downgrading user" in 
> > https://commons.apache.org/proper/commons-daemon/jsvc.html
>
>
> Thank you, Konstantin for your analysis and feedback. This confirms what 
> we've experiencing.
>
> > The lifecycle you're using could use some double checking, and that's
> > probably the best way to resolve this. We'll examine the Tomcat
> > behavior to see if there is a way to improve the robustness, of
> > course.
>
> Re: Rémy's initial (above) recommendation:
> - our app code already performs a hbws connector bounce when hitting the 
> keystore not found at first start. Then the keystore is found after the 
> restart.
> But with the refactored tomcat behavior the "https-openssl-nio-9727" 
> connector does not re-initialize itself.
> Is there a way for our code to call the connector re-init()?
>
> Our application hbws logs:
> _
> [2024-10-24 12:27:40,005] INFO 
> 27896[main](com.neverfail.webservices.NFWebServicesServlet) - INIT> hbws 
> servlet
> [2024-10-24 12:27:40,005] INFO 
> 27896[main](com.neverfail.webservices.tools.Configurator) - KeyStore was not 
> found
> [2024-10-24 12:27:45,833] WARN 
> 33724[main](com.neverfail.webservices.NFWebServicesServlet) - About to bounce 
> servlet to apply new KeyStore. NFKeystore was just created, servlet should be 
> bounced
> [2024-10-24 12:27:45,848] INFO 
> 33739[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
> Using groupType:BINARY
> [2024-10-24 12:27:45,864] INFO 
> 33755[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
> bounceConnector() About to bounce Tomcat connector...
> [2024-10-24 12:27:45,864] INFO 
> 33755[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
> bounceConnector() Invoking stop on Catalina:type=Connector,port=9727
> [2024-10-24 12:27:50,868] INFO 
> 38759[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
> bounceConnector() Invoking start on Catalina:type=Connector,port=9727
> [2024-10-24 12:27:50,915] INFO 
> 38806[main](com.neverfail.webservices.tools.Configurator) - KeyStore was found

Ok, so the idea is that init() has to be successful or the component
will never become started later on.
Connectors are a bit special though. You can use bindOnInit to do the
socket bind and TLS start either in init (you don't want it to fail,
and you want the server to start accepting asap) or start (which
allows stopping and restarting later, new attempts after a failure,
and so on).

I don't know what the best default behavior after getting into a
"failed init" state should be for a component. Right now after
destroy, it is not possible to go back and simply call init again. I
have the impression this is the most reasonable behavior.

Rémy

> Thank you,
> /LJ

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



RE: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-28 Thread Lucian Jurj

> Looking at "https-openssl-nio-9727" connector (ignoring "http-nio-9728") I see

> 24-Oct-2024 12:27:14.109 INFO [main] 
> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler 
> ["https-openssl-nio-9727"]
> 24-Oct-2024 12:27:14.156 SEVERE [main] 
> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to 
> initialize component [Connector["https-openssl-nio-9727"]]
> org.apache.catalina.LifecycleException: Protocol handler 
> initialization failed
...
> 24-Oct-2024 12:27:45.864 INFO [main] 
> org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler 
> ["https-openssl-nio-9727"]
> 24-Oct-2024 12:27:50.868 INFO [main] 
> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler 
> ["https-openssl-nio-9727"]

> Thus failed init(), followed by stop() and start(). There is no attempt to 
> re-run init().

> Looking at org.apache.catalina.util.LifecycleBase, I think that init() 
> results in LifecycleState.FAILED state, and that there is a bug in the
> start() method.

> In case of FAILED state the LifecycleState.start() method calls stop() and 
> goes further to starting. The current issue demonstrates that this behaviour 
> is wrong.

> Maybe make separate error states, INIT_FAILED (aka not initialized), 
> START_FAILED (not started). Starting a non-initialized component is a bad 
> idea.

> Automatically re-initializing a connector may not work as intended, as there 
> exist configurations where init() is called with different privileges than 
> start(). (See "Downgrading user" in 
> https://commons.apache.org/proper/commons-daemon/jsvc.html


Thank you, Konstantin for your analysis and feedback. This confirms what we've 
experiencing.

> The lifecycle you're using could use some double checking, and that's
> probably the best way to resolve this. We'll examine the Tomcat
> behavior to see if there is a way to improve the robustness, of
> course.

Re: Rémy's initial (above) recommendation:
- our app code already performs a hbws connector bounce when hitting the 
keystore not found at first start. Then the keystore is found after the 
restart. 
But with the refactored tomcat behavior the "https-openssl-nio-9727" connector 
does not re-initialize itself.
Is there a way for our code to call the connector re-init()? 

Our application hbws logs:
_
[2024-10-24 12:27:40,005] INFO 
27896[main](com.neverfail.webservices.NFWebServicesServlet) - INIT> hbws servlet
[2024-10-24 12:27:40,005] INFO 
27896[main](com.neverfail.webservices.tools.Configurator) - KeyStore was not 
found
[2024-10-24 12:27:45,833] WARN 
33724[main](com.neverfail.webservices.NFWebServicesServlet) - About to bounce 
servlet to apply new KeyStore. NFKeystore was just created, servlet should be 
bounced
[2024-10-24 12:27:45,848] INFO 
33739[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - Using 
groupType:BINARY
[2024-10-24 12:27:45,864] INFO 
33755[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
bounceConnector() About to bounce Tomcat connector...
[2024-10-24 12:27:45,864] INFO 
33755[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
bounceConnector() Invoking stop on Catalina:type=Connector,port=9727
[2024-10-24 12:27:50,868] INFO 
38759[main](com.neverfail.webservices.hbconnection.HBConnectionFacade) - 
bounceConnector() Invoking start on Catalina:type=Connector,port=9727
[2024-10-24 12:27:50,915] INFO 
38806[main](com.neverfail.webservices.tools.Configurator) - KeyStore was found

Thank you,
/LJ


Re: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-25 Thread Konstantin Kolinko
пт, 25 окт. 2024 г. в 12:38, Lucian Jurj :
> [skip]
>
> 24-Oct-2024 12:27:14.078 INFO [main] org.apache.coyote.AbstractProtocol.init 
> Initializing ProtocolHandler ["http-nio-9728"]
> 24-Oct-2024 12:27:14.109 INFO [main] org.apache.coyote.AbstractProtocol.init 
> Initializing ProtocolHandler ["https-openssl-nio-9727"]
> 24-Oct-2024 12:27:14.156 SEVERE [main] 
> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to 
> initialize component [Connector["https-openssl-nio-9727"]]
> org.apache.catalina.LifecycleException: Protocol handler 
> initialization failed
> at 
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1027)
> at 
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:122)
> at 
> org.apache.catalina.core.StandardService.initInternal(StandardService.java:525)
> at 
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:122)
> at 
> org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:986)
> at 
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:122)
> at 
> org.apache.catalina.startup.Catalina.load(Catalina.java:686)
> at 
> org.apache.catalina.startup.Catalina.load(Catalina.java:709)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302)
> at 
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
> Caused by: java.lang.IllegalArgumentException: C:\Program 
> Files\Neverfail\tomcat\ssl\NFKeyStore.jks (The system cannot find the path 
> specified)
> at 
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:115)
> at 
> org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
> at 
> org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:228)
> at 
> org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1373)
> at 
> org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1386)
> at 
> org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:663)
> at 
> org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:77)
>     at 
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1025)
> ... 13 more
> Caused by: java.io.FileNotFoundException: C:\Program 
> Files\Neverfail\tomcat\ssl\NFKeyStore.jks (The system cannot find the path 
> specified)
> at java.io.FileInputStream.open0(Native Method)
> at java.io.FileInputStream.open(FileInputStream.java:195)
> at java.io.FileInputStream.(FileInputStream.java:138)
> at java.io.FileInputStream.(FileInputStream.java:93)
> at 
> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
> at 
> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
> at 
> org.apache.catalina.startup.CatalinaBaseConfigurationSource.getResource(CatalinaBaseConfigurationSource.java:121)
> at 
> org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:210)
> at 
> org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:254)
> at 
> org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:308)
> at 
> org.apache.tomcat.util.net.openssl.OpenSSLUtil.getKeyManagers(OpenSSLUtil.java:108)
> at 
> org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:268)
> at 
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:113)
> ... 20 more
> 24-Oct-2024 12:27:14.172 INFO [main] 
> org.apache.catalina.startup.Catalina.load Server initialization in [1772] 
> milliseconds
> 24-Oct-2024 12:27:14.203 INFO [main] 
> org.apache.catalina.core.StandardService.startInternal Starting service 
> [Catalina]
> 24-Oct-2024 12:27:14.203 INFO [main] 
> org.a

Re: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-25 Thread Rémy Maucherat
On Fri, Oct 25, 2024 at 11:37 AM Lucian Jurj  wrote:
>
> Thank you Rémy for your quick response. We still have a few questions for 
> better understanding.
>
>
> >> 24-Oct-2024 11:53:15.217 INFO [main]
> >> org.apache.catalina.startup.Catalina.load Server initialization in
> >> [1871] milliseconds
> >> 24-Oct-2024 11:53:15.280 INFO [main]
> >> org.apache.catalina.core.StandardService.startInternal Starting
> >> service [Catalina]
> >> 24-Oct-2024 11:53:15.280 INFO [main]
> >> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
> >> engine: [Apache Tomcat/9.0.96]
> >> 24-Oct-2024 11:53:15.311 INFO [main]
> >> org.apache.catalina.startup.HostConfig.deployWAR Deploying web
> >> application archive [C:\Program
> >> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]
>
> > Ok, more or less. But you're starting the server, then adding to it while 
> > it's running. That's risky.
>
>
> [LJ]: We'll try to copy first the war than to start the server. Should this 
> help on application side?
>
> >> 24-Oct-2024 11:53:37.514 INFO [main]
> >> org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
> >> ["https-openssl-nio-9727"]
> >> 24-Oct-2024 11:53:42.519 INFO [main]
> >> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
> >> ["https-openssl-nio-9727"]
>
> > That's not normal.
>
> [LJ]:  My bad here - I didn’t copy the logs from the beginning (II thought 
> they're not relevant). Here they are  from the beginning till the timestamp 
> of previous logs). Sorry about that.
> -
> 24-Oct-2024 12:27:12.641 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server version name:   
> Apache Tomcat/9.0.96
> 24-Oct-2024 12:27:12.641 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server built:  
> Oct 3 2024 19:44:30 UTC
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server version number: 
> 9.0.96.0
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log OS Name:   
> Windows Server 2019
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log OS Version:
> 10.0
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Architecture:  
> amd64
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Java Home: 
> C:\Program Files\Neverfail\R2\jre
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version:   
> 1.8.0_422-b05
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:    
> Azul Systems, Inc.
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: 
> C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: 
> C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dhbws.config.local_host_ssl_port=9727
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dhbws.config.local_host_port=9728
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dcatalina.base=C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dcatalina.home=C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -DNF_HOME=C:\Program Files\Neverfail\R2
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dhbws.configroot=nfwebsvcs/management/nfmgtwebsvc
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dhbws.config.has_management_role=true
> 24-Oct-2024 12:27:12.656 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -Dhbws.config.hb_integrated=false
> 24-

RE: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-25 Thread Lucian Jurj
Thank you Rémy for your quick response. We still have a few questions for 
better understanding.


>> 24-Oct-2024 11:53:15.217 INFO [main] 
>> org.apache.catalina.startup.Catalina.load Server initialization in 
>> [1871] milliseconds
>> 24-Oct-2024 11:53:15.280 INFO [main] 
>> org.apache.catalina.core.StandardService.startInternal Starting 
>> service [Catalina]
>> 24-Oct-2024 11:53:15.280 INFO [main] 
>> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet 
>> engine: [Apache Tomcat/9.0.96]
>> 24-Oct-2024 11:53:15.311 INFO [main] 
>> org.apache.catalina.startup.HostConfig.deployWAR Deploying web 
>> application archive [C:\Program 
>> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]

> Ok, more or less. But you're starting the server, then adding to it while 
> it's running. That's risky.


[LJ]: We'll try to copy first the war than to start the server. Should this 
help on application side?

>> 24-Oct-2024 11:53:37.514 INFO [main] 
>> org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler 
>> ["https-openssl-nio-9727"]
>> 24-Oct-2024 11:53:42.519 INFO [main] 
>> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler 
>> ["https-openssl-nio-9727"]

> That's not normal.

[LJ]:  My bad here - I didn’t copy the logs from the beginning (II thought 
they're not relevant). Here they are  from the beginning till the timestamp of 
previous logs). Sorry about that.
-
24-Oct-2024 12:27:12.641 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version name:   
Apache Tomcat/9.0.96
24-Oct-2024 12:27:12.641 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server built:  
Oct 3 2024 19:44:30 UTC
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version number: 
9.0.96.0
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Name:   
Windows Server 2019
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Version:
10.0
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Architecture:  
amd64
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Java Home: 
C:\Program Files\Neverfail\R2\jre
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Version:   
1.8.0_422-b05
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:    
Azul Systems, Inc.
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: 
C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: 
C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.config.local_host_ssl_port=9727
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.config.local_host_port=9728
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.base=C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.home=C:\Program Files\Neverfail\tomcat\apache-tomcat-9.0.96
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-DNF_HOME=C:\Program Files\Neverfail\R2
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.configroot=nfwebsvcs/management/nfmgtwebsvc
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.config.has_management_role=true
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.config.hb_integrated=false
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dhbws.config.bounce_service=false
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.library.path=C:\Program Files\Neverfail\R2\bin;C:\Program 
Files\Neverfail\tomcat\bin
24-Oct-2024 12:27:12.656 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.io.tmpdir=C:\Program Files\Neverfail\tom

Re: Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-24 Thread Rémy Maucherat
On Thu, Oct 24, 2024 at 2:36 PM Lucian Jurj  wrote:
>
> Hi,
>
> I've searched for a solution on wiki, web, apache pony mail lists. Tried 
> various experinetns to isolate the cause... but unsuccessful. I've seen this 
> 3 months ago with 9.0.93 then waited to more tomcat releases and retry 
> thinking it is maybe something temporary. It isn't. Currently, an experienced 
> webdev is investing this but we have no clue what causes this.
>
> We have a mature product called Continuity Engine which bundles tomcat 9 for 
> quite a few years. We perform quarterly tomcat 9 updates. And all were 
> successful until and including tomcat 9.0.91.
>
> Issue:
>
> - during first start of tomcat 9.0.96 while our hbws.war webapp is deployed, 
> following error is thrown.
>
> 24-Oct-2024 11:53:15.217 INFO [main] 
> org.apache.catalina.startup.Catalina.load Server initialization in [1871] 
> milliseconds
> 24-Oct-2024 11:53:15.280 INFO [main] 
> org.apache.catalina.core.StandardService.startInternal Starting service 
> [Catalina]
> 24-Oct-2024 11:53:15.280 INFO [main] 
> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet 
> engine: [Apache Tomcat/9.0.96]
> 24-Oct-2024 11:53:15.311 INFO [main] 
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
> archive [C:\Program 
> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]

Ok, more or less. But you're starting the server, then adding to it
while it's running. That's risky.

> 24-Oct-2024 11:53:37.514 INFO [main] org.apache.coyote.AbstractProtocol.stop 
> Stopping ProtocolHandler ["https-openssl-nio-9727"]
> 24-Oct-2024 11:53:42.519 INFO [main] org.apache.coyote.AbstractProtocol.start 
> Starting ProtocolHandler ["https-openssl-nio-9727"]

That's not normal.

> 24-Oct-2024 11:53:42.519 INFO [main] 
> org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
> [https-openssl-nio-9727], TLS virtual host [default], certificate type 
> [UNDEFINED] configured from keystore [../ssl/NFKeyStore.jks] using alias 
> [nfhb_private_certificate] with trust store [null]
>
> 24-Oct-2024 11:53:44.566 INFO [https-openssl-nio-9727-exec-3] 
> org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request 
> header
>  Note: further occurrences of HTTP request parsing errors will be logged at 
> DEBUG level.
> java.lang.NullPointerException
> at 
> org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:483)

That request came in on port 9727. So the HTTP parser would be null
because init was not called ?

> at 
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:256)
> at 
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
> at 
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:937)
> at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
> at 
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
> at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
> at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
> at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
> at java.lang.Thread.run(Thread.java:750)
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder  for further 
> details.
> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web 
> application archive [C:\Program 
> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war] has finished in 
> [31,916] ms

Now the webapp is deployed.

> 24-Oct-2024 11:53:47.227 INFO [main] org.apache.coyote.AbstractProtocol.start 
> Starting ProtocolHandler ["http-nio-9728"]

A second connector, this one starts without oddities.

> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.util.LifecycleBase.start The start() method was called on 
> component [Connector["https-openssl-nio-9727"]] after start() had already 
> been called. The second call will be ignored.

Another clue that the lifecycle of the connector on 9727 is wrong.

> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.startup.Catalina.start Server startup in [32008] 
> millisecondsa
> 
&g

Tomcat 9.0.96 first start throws java.lang.NullPointerException. Works in the same conditions with 9.0.91.

2024-10-24 Thread Lucian Jurj
Hi,

I've searched for a solution on wiki, web, apache pony mail lists. Tried 
various experinetns to isolate the cause... but unsuccessful. I've seen this 3 
months ago with 9.0.93 then waited to more tomcat releases and retry thinking 
it is maybe something temporary. It isn't. Currently, an experienced webdev is 
investing this but we have no clue what causes this. 

We have a mature product called Continuity Engine which bundles tomcat 9 for 
quite a few years. We perform quarterly tomcat 9 updates. And all were 
successful until and including tomcat 9.0.91.

Issue:

- during first start of tomcat 9.0.96 while our hbws.war webapp is deployed, 
following error is thrown. 

24-Oct-2024 11:53:15.217 INFO [main] org.apache.catalina.startup.Catalina.load 
Server initialization in [1871] milliseconds
24-Oct-2024 11:53:15.280 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Catalina]
24-Oct-2024 11:53:15.280 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: 
[Apache Tomcat/9.0.96]
24-Oct-2024 11:53:15.311 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]
24-Oct-2024 11:53:37.514 INFO [main] org.apache.coyote.AbstractProtocol.stop 
Stopping ProtocolHandler ["https-openssl-nio-9727"]
24-Oct-2024 11:53:42.519 INFO [main] org.apache.coyote.AbstractProtocol.start 
Starting ProtocolHandler ["https-openssl-nio-9727"]
24-Oct-2024 11:53:42.519 INFO [main] 
org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
[https-openssl-nio-9727], TLS virtual host [default], certificate type 
[UNDEFINED] configured from keystore [../ssl/NFKeyStore.jks] using alias 
[nfhb_private_certificate] with trust store [null]

24-Oct-2024 11:53:44.566 INFO [https-openssl-nio-9727-exec-3] 
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request 
header
 Note: further occurrences of HTTP request parsing errors will be logged at 
DEBUG level.
java.lang.NullPointerException
at 
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:483)
at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:256)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:937)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.lang.Thread.run(Thread.java:750)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder  for further 
details.
24-Oct-2024 11:53:47.227 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war] has finished in 
[31,916] ms
24-Oct-2024 11:53:47.227 INFO [main] org.apache.coyote.AbstractProtocol.start 
Starting ProtocolHandler ["http-nio-9728"]
24-Oct-2024 11:53:47.227 INFO [main] 
org.apache.catalina.util.LifecycleBase.start The start() method was called on 
component [Connector["https-openssl-nio-9727"]] after start() had already been 
called. The second call will be ignored.
24-Oct-2024 11:53:47.227 INFO [main] org.apache.catalina.startup.Catalina.start 
Server startup in [32008] millisecondsa


- This causes webserver not being able to process requests:

HTTP Status 400 - Bad Request
Type Exception Report
Description The server cannot or will not process the request due to something 
that is perceived to be a client error (e.g., malformed request syntax, invalid 
request message framing, or deceptive request routing).
- without changes on our code side, the Engine product works with tomcat 9.0.91 
(last version which

-

A subsequent restart fixes the situation. But or our product bundling tomcat, 
restart is an showstopper. 

---
- last version that worked at our end was 9.0.91
- since then we've seen this with 9.0.93, 9.0.96, without doing any changes to 
our side of the code. In other words, 

Something seemed to be changed in releases post 9.0.93 which causes this 
behavior at our end.

-

Would somebody provide a p

Re: [EXTERNAL] Tomcat stderr/stdout to console

2024-10-23 Thread Chuck Caldarale

> On Oct 23, 2024, at 09:42, Joey Cochran  wrote:
> 
> Can those be accessLogValve based as well, if so please share how.


Not without modifications or using your own custom valve. From the 
AccessLogValve documentation:

This Valve uses self-contained logic to write its log files, which can be 
automatically rolled over at midnight each day. (The essential requirement for 
access logging is to handle a large continuous stream of data with low 
overhead. This Valve does not use Apache Commons Logging, thus avoiding 
additional overhead and potentially complex configuration).

You should be able to use something like tail to echo the access log file to a 
terminal window.

  - Chuck


> 
> From: Chuck Caldarale 
> Sent: Tuesday, October 22, 2024 9:34 PM
> To: Tomcat Users List 
> Subject: [EXTERNAL] Re: Tomcat stderr/stdout to console
>  
> 
> > On Oct 22, 2024, at 19:19, Amit Pande  
> > wrote:
> >
> > Hello all,
> >
> > I am looking for way to print certain logs from Tomcat to actual console 
> > (stdout) instead of getting those redirected to Catalina.out (default).
> >
> > e.g. messages like below (and errors failed to deploy any application) if 
> > can be redirected to console, it would avoid looking up into Catalina log 
> > file while looking for progress of the server startup (deploying all apps).
> >
> > "INFO [Catalina-utility-2] 
> > org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
> > application directory"
> 
> 
> Have you looked at the logging documentation? (Use the page for the Tomcat 
> version you’re actually using.)
> 
> https://tomcat.apache.org/tomcat-10.1-doc/logging.html
> 
> Look at the logging.properties example near the bottom of the page to see how 
> to associate handlers with Tomcat facilities.
> 
>   - Chuck



Re: Tomcat stderr/stdout to console

2024-10-22 Thread Chuck Caldarale

> On Oct 22, 2024, at 19:19, Amit Pande  wrote:
> 
> Hello all,
> 
> I am looking for way to print certain logs from Tomcat to actual console 
> (stdout) instead of getting those redirected to Catalina.out (default).
> 
> e.g. messages like below (and errors failed to deploy any application) if can 
> be redirected to console, it would avoid looking up into Catalina log file 
> while looking for progress of the server startup (deploying all apps).
> 
> "INFO [Catalina-utility-2] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
> application directory"


Have you looked at the logging documentation? (Use the page for the Tomcat 
version you’re actually using.)

https://tomcat.apache.org/tomcat-10.1-doc/logging.html

Look at the logging.properties example near the bottom of the page to see how 
to associate handlers with Tomcat facilities.

  - Chuck



Tomcat stderr/stdout to console

2024-10-22 Thread Amit Pande
Hello all,

I am looking for way to print certain logs from Tomcat to actual console 
(stdout) instead of getting those redirected to Catalina.out (default).

e.g. messages like below (and errors failed to deploy any application) if can 
be redirected to console, it would avoid looking up into Catalina log file 
while looking for progress of the server startup (deploying all apps).

"INFO [Catalina-utility-2] 
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
application directory"

Appreciate your help.

Thanks,
Amit


Re: Help with tomcat 11 failure

2024-10-22 Thread Christopher Schultz

Chuck,

On 10/21/24 14:06, Chuck Caldarale wrote:



On Oct 21, 2024, at 12:19,  
 wrote:

Fellow user here.

I am guessing that you need to migrate your application to Java 17+ and make 
all the necessary changes to move from the javax.* to the Jakarta EE jakarta.* 
packages.  This includes all servlet stuff.



Yes, Tomcat 11 requires Java 17 or later; see:
https://tomcat.apache.org/whichversion.html


You may well need to update your servlet / JSP code for the reasons specified 
on the Tomcat 11 download page:
Users of Tomcat 11 onwards should be aware that, as a result of the move from Java EE 
to Jakarta EE as part of the transfer of Java EE to the Eclipse Foundation, the 
primary package for all implemented APIs has changed from javax.* to jakarta.*. This 
will almost certainly require code changes to enable applications to migrate from 
Tomcat 9 and earlier to Tomcat 11 and later. A migration tool 
<https://github.com/apache/tomcat-jakartaee-migration> has been developed to 
aid this process.

For migrating your code, you can use this:
https://tomcat.apache.org/download-migration.cgi


You may also want to look at this for specific migration information:
https://tomcat.apache.org/migration.html


+1

... and also you should be able to drop your WAR file into 
$CATALINA_BASE/webapps-javaee and get it automagically migrated.


-chris


Cheers, Jeff

On Oct 21, 2024 6:57 PM, Jim Anderson  wrote:
Hi,

I was working on a web application about 2 years ago and I am finally getting 
back to my work on this application. However, when I try to bring up the app as 
a web page in firefox, tomcat is failing with a stack trace which I am 
attaching to this email.

Looking at the stack trace, I see that the class:
 javax.servlet.jsp.tagext.TagLibraryValidator
was not found.

My questions is: Where is the TagLibraryValidator class to be found?

Jim Anderson







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



Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-22 Thread Christopher Schultz

Izek,

On 10/22/24 15:05, Izek Hornbeck wrote:
Right now we are only using HTTP/1.1--do you think that could make a 
difference?


Only in that is reduces the number of places in Tomcat where a 400 
response is sent.


I would say it is reproducible... as far as I can recall, I see this at 
least the first time in a day that I access each application deployed on 
tomcat, and some other times during the day after that. For example, say 
I navigate to "applicationA" first thing in the morning--most likely, 
the login page comes up but is obviously missing some images and the css 
file. (I can see in my browser dev tools and the tomcat logs that those 
resources were not obtained, with a 400 response.) If I login to the 
application without refreshing the login page, the next page typically 
is also missing images and/or css files. If I refresh before logging in, 
the login page often gets most/all of the missing resources as does the 
next page. Some days, it takes a few refreshes, or even a tomcat 
restart, to get all the resources loaded--it typically gets worse as 
more time passes since the last restart. With that, it makes me think 
that something is assumed to be cached, but it is not?


If you can reproduce it, try enabling the request dumper valve.

You should only do this in a dev/test environment. It will fill your log 
file with 99% of the HTTP conversation on both the client and server 
end. Reproduce the issue (400 in the access log) then find the 
corresponding request in the application log (where the dumper will 
dump) and look at:


1. The inbound headers
2. The HTTP response line which may have more detail than just "400"

-chris

On Tue, Oct 22, 2024 at 11:04 AM Christopher Schultz 
mailto:ch...@christopherschultz.net>> wrote:


Izek,

On 10/16/24 18:07, Izek Hornbeck wrote:
 > I have confirmed that our development team has seen these same
    loading
 > issues with Tomcat 9.0.55 and 9.0.86.

Are you using HTTP/2 or AJP at all? Or only HTTP/1.1?

Is it at all reprodicible or are you just looking at log files?

It's definitely possible for a client to provide e.g. bogus HTTP
headers
which would cause a 400 response even though the request was for a
static file.

-chris

 > On Wed, Oct 16, 2024 at 3:22 PM Izek Hornbeck
mailto:izekhornb...@gmail.com>>
 > wrote:
 >
 >> We are working on a large upgrade for this application, so we
are looking
 >> at upgrading Tomcat too (either to version 10 if we can resolve the
 >> javax/jakarta issues or just to the current 9.0.x). I'll try
some tests
 >> locally to see what impact newer versions could have.
 >>
 >> In the access logs, we occasionally get lines like this:
 >>
 >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
 >> /app_name/some_page.jsp HTTP/1.1" 200 16107
 >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
 >> /app_name/styles/some_style.css HTTP/1.1" 400 762
 >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
 >> /app_name/styles/some_other_style.css HTTP/1.1" 400 762
 >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
 >> /app_name/dwr/interface/some_script.js HTTP/1.1" 200 13339
 >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:21 -0600] "GET
 >> /app_name/javascript/dashboard.js HTTP/1.1" 200 21841
 >>
 >> Sometimes there are .jpg files that also have a 400 response. The
 >> confusing part is that those files don't always get that
response, and it's
 >> not always the same files.
 >>
 >> -Izek
 >>
 >> On Mon, Oct 14, 2024 at 9:32 AM Chuck Caldarale
mailto:n82...@gmail.com>> wrote:
 >>
 >>>
 >>>> On Oct 11, 2024, at 12:48, Izek Hornbeck
mailto:izekhornb...@gmail.com>>
 >>> wrote:
 >>>>
 >>>> My team has a Java web app (java v17.0.2) running on a Tomcat
9.0.40
 >>>> server.
 >>>
 >>>
 >>> Which is almost 4 years old. You really, really need to catch up.
 >>>
 >>>
 >>>> When we upgraded to Tomcat 9, we found that occasionally, some css
 >>>> files and images would not load, with a 400 response. They
would appear
     >>>> after a page refresh (sometimes I had to refresh twice).
 >>>>
 >>>> The closest thing I've found about issues like this is
 >>>>
 >>> https://stackoverflow.com/questions/77989064/intermittently-
getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
<htt

Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-22 Thread Izek Hornbeck
Thanks for following up, Chris!

Right now we are only using HTTP/1.1--do you think that could make a
difference?

I would say it is reproducible... as far as I can recall, I see this at
least the first time in a day that I access each application deployed on
tomcat, and some other times during the day after that. For example, say I
navigate to "applicationA" first thing in the morning--most likely, the
login page comes up but is obviously missing some images and the css file.
(I can see in my browser dev tools and the tomcat logs that those resources
were not obtained, with a 400 response.) If I login to the application
without refreshing the login page, the next page typically is also missing
images and/or css files. If I refresh before logging in, the login page
often gets most/all of the missing resources as does the next page. Some
days, it takes a few refreshes, or even a tomcat restart, to get all the
resources loaded--it typically gets worse as more time passes since the
last restart. With that, it makes me think that something is assumed to be
cached, but it is not?

On Tue, Oct 22, 2024 at 11:04 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Izek,
>
> On 10/16/24 18:07, Izek Hornbeck wrote:
> > I have confirmed that our development team has seen these same loading
> > issues with Tomcat 9.0.55 and 9.0.86.
>
> Are you using HTTP/2 or AJP at all? Or only HTTP/1.1?
>
> Is it at all reprodicible or are you just looking at log files?
>
> It's definitely possible for a client to provide e.g. bogus HTTP headers
> which would cause a 400 response even though the request was for a
> static file.
>
> -chris
>
> > On Wed, Oct 16, 2024 at 3:22 PM Izek Hornbeck 
> > wrote:
> >
> >> We are working on a large upgrade for this application, so we are
> looking
> >> at upgrading Tomcat too (either to version 10 if we can resolve the
> >> javax/jakarta issues or just to the current 9.0.x). I'll try some tests
> >> locally to see what impact newer versions could have.
> >>
> >> In the access logs, we occasionally get lines like this:
> >>
> >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> >> /app_name/some_page.jsp HTTP/1.1" 200 16107
> >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> >> /app_name/styles/some_style.css HTTP/1.1" 400 762
> >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> >> /app_name/styles/some_other_style.css HTTP/1.1" 400 762
> >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> >> /app_name/dwr/interface/some_script.js HTTP/1.1" 200 13339
> >> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:21 -0600] "GET
> >> /app_name/javascript/dashboard.js HTTP/1.1" 200 21841
> >>
> >> Sometimes there are .jpg files that also have a 400 response. The
> >> confusing part is that those files don't always get that response, and
> it's
> >> not always the same files.
> >>
> >> -Izek
> >>
> >> On Mon, Oct 14, 2024 at 9:32 AM Chuck Caldarale 
> wrote:
> >>
> >>>
> >>>> On Oct 11, 2024, at 12:48, Izek Hornbeck 
> >>> wrote:
> >>>>
> >>>> My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
> >>>> server.
> >>>
> >>>
> >>> Which is almost 4 years old. You really, really need to catch up.
> >>>
> >>>
> >>>> When we upgraded to Tomcat 9, we found that occasionally, some css
> >>>> files and images would not load, with a 400 response. They would
> appear
> >>>> after a page refresh (sometimes I had to refresh twice).
> >>>>
> >>>> The closest thing I've found about issues like this is
> >>>>
> >>>
> https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
> >>> .
> >>>>
> >>>> We have just recently tried adding "cachingAllowed=false" to the
> >>>> "tomcat/conf/context.xml" file, but it hasn't been long enough to know
> >>> if
> >>>> that really fixed the issue.
> >>>>
> >>>> Has anyone had a similar issue? What might be the root cause?
> >>>
> >>>
> >>> Without any real data (eg, access logs), there’s no way to answer that
> >>> question. Your first step should be to upgrade to the current 9.0.x
> version.
> >>>
> >>>-Chuck
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>>
> >
>
>


Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-22 Thread Christopher Schultz

Izek,

On 10/16/24 18:07, Izek Hornbeck wrote:

I have confirmed that our development team has seen these same loading
issues with Tomcat 9.0.55 and 9.0.86.


Are you using HTTP/2 or AJP at all? Or only HTTP/1.1?

Is it at all reprodicible or are you just looking at log files?

It's definitely possible for a client to provide e.g. bogus HTTP headers 
which would cause a 400 response even though the request was for a 
static file.


-chris


On Wed, Oct 16, 2024 at 3:22 PM Izek Hornbeck 
wrote:


We are working on a large upgrade for this application, so we are looking
at upgrading Tomcat too (either to version 10 if we can resolve the
javax/jakarta issues or just to the current 9.0.x). I'll try some tests
locally to see what impact newer versions could have.

In the access logs, we occasionally get lines like this:

XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/some_page.jsp HTTP/1.1" 200 16107
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/styles/some_style.css HTTP/1.1" 400 762
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/styles/some_other_style.css HTTP/1.1" 400 762
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/dwr/interface/some_script.js HTTP/1.1" 200 13339
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:21 -0600] "GET
/app_name/javascript/dashboard.js HTTP/1.1" 200 21841

Sometimes there are .jpg files that also have a 400 response. The
confusing part is that those files don't always get that response, and it's
not always the same files.

-Izek

On Mon, Oct 14, 2024 at 9:32 AM Chuck Caldarale  wrote:




On Oct 11, 2024, at 12:48, Izek Hornbeck 

wrote:


My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
server.



Which is almost 4 years old. You really, really need to catch up.



When we upgraded to Tomcat 9, we found that occasionally, some css
files and images would not load, with a 400 response. They would appear
after a page refresh (sometimes I had to refresh twice).

The closest thing I've found about issues like this is


https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
.


We have just recently tried adding "cachingAllowed=false" to the
"tomcat/conf/context.xml" file, but it hasn't been long enough to know

if

that really fixed the issue.

Has anyone had a similar issue? What might be the root cause?



Without any real data (eg, access logs), there’s no way to answer that
question. Your first step should be to upgrade to the current 9.0.x version.

   -Chuck


-
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: Help with tomcat 11 failure

2024-10-21 Thread Chuck Caldarale

> On Oct 21, 2024, at 12:19,  
>  wrote:
> 
> Fellow user here.
> 
> I am guessing that you need to migrate your application to Java 17+ and make 
> all the necessary changes to move from the javax.* to the Jakarta EE 
> jakarta.* packages.  This includes all servlet stuff.


Yes, Tomcat 11 requires Java 17 or later; see:
https://tomcat.apache.org/whichversion.html


You may well need to update your servlet / JSP code for the reasons specified 
on the Tomcat 11 download page:
Users of Tomcat 11 onwards should be aware that, as a result of the move from 
Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse 
Foundation, the primary package for all implemented APIs has changed from 
javax.* to jakarta.*. This will almost certainly require code changes to enable 
applications to migrate from Tomcat 9 and earlier to Tomcat 11 and later. A 
migration tool <https://github.com/apache/tomcat-jakartaee-migration> has been 
developed to aid this process.

For migrating your code, you can use this:
https://tomcat.apache.org/download-migration.cgi


You may also want to look at this for specific migration information:
https://tomcat.apache.org/migration.html

  - Chuck


> Cheers, Jeff
> 
> On Oct 21, 2024 6:57 PM, Jim Anderson  wrote:
> Hi,
> 
> I was working on a web application about 2 years ago and I am finally getting 
> back to my work on this application. However, when I try to bring up the app 
> as a web page in firefox, tomcat is failing with a stack trace which I am 
> attaching to this email.
> 
> Looking at the stack trace, I see that the class:
> javax.servlet.jsp.tagext.TagLibraryValidator
> was not found.
> 
> My questions is: Where is the TagLibraryValidator class to be found?
> 
> Jim Anderson
> 



Re: Help with tomcat 11 failure

2024-10-21 Thread Borsó Zsolt

Hi Jim,

There exist an org.eclipse.transformer.cli-1.1.0-distribution.jar 
migration tool you can do the migration task with.


Regards,
Zsolt

2024. 10. 21. 19:30 keltezéssel, Jim Anderson írta:

Hi Jeff,

Thanks for the advise. I will double check the java version that I used. I
recently upgrade my PC to a recent version of java, but I will double check.

Regards,
Jim

On Mon, Oct 21, 2024 at 1:24 PM  wrote:


Hi Jim,

Fellow user here.

I am guessing that you need to migrate your application to Java 17+ and
make all the necessary changes to move from the javax.* to the Jakarta EE
jakarta.* packages.  This includes all servlet stuff.

Cheers, Jeff

On Oct 21, 2024 6:57 PM, Jim Anderson  wrote:
Hi,

I was working on a web application about 2 years ago and I am finally
getting back to my work on this application. However, when I try to bring
up the app as a web page in firefox, tomcat is failing with a stack trace
which I am attaching to this email.

Looking at the stack trace, I see that the class:
  javax.servlet.jsp.tagext.TagLibraryValidator
was not found.

My questions is: Where is the TagLibraryValidator class to be found?

Jim Anderson






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



Re: Help with tomcat 11 failure

2024-10-21 Thread Jim Anderson
Hi Jeff,

Thanks for the advise. I will double check the java version that I used. I
recently upgrade my PC to a recent version of java, but I will double check.

Regards,
Jim

On Mon, Oct 21, 2024 at 1:24 PM  wrote:

> Hi Jim,
>
> Fellow user here.
>
> I am guessing that you need to migrate your application to Java 17+ and
> make all the necessary changes to move from the javax.* to the Jakarta EE
> jakarta.* packages.  This includes all servlet stuff.
>
> Cheers, Jeff
>
> On Oct 21, 2024 6:57 PM, Jim Anderson  wrote:
> Hi,
>
> I was working on a web application about 2 years ago and I am finally
> getting back to my work on this application. However, when I try to bring
> up the app as a web page in firefox, tomcat is failing with a stack trace
> which I am attaching to this email.
>
> Looking at the stack trace, I see that the class:
>  javax.servlet.jsp.tagext.TagLibraryValidator
> was not found.
>
> My questions is: Where is the TagLibraryValidator class to be found?
>
> Jim Anderson
>
>


Re: Help with tomcat 11 failure

2024-10-21 Thread Jim Anderson
Migrate in what way?

As near as I can tell, the missing class is being called by Tomcat 11
source code.

Jim A.

On Mon, Oct 21, 2024 at 1:18 PM Mcalexander, Jon J.
 wrote:

> I could be wrong, but I think you need to migrate your code as 11 uses
> Jakarta syntax, just like 10.1 does.
>
> From: Jim Anderson 
> Sent: Monday, October 21, 2024 11:55 AM
> To: users@tomcat.apache.org
> Subject: Help with tomcat 11 failure
>
> Hi, I was working on a web application about 2 years ago and I am finally
> getting back to my work on this application. However, when I try to bring
> up the app as a web page in firefox, tomcat is failing with a stack trace
> which I am attaching
>
> Hi,
>
> I was working on a web application about 2 years ago and I am finally
> getting back to my work on this application. However, when I try to bring
> up the app as a web page in firefox, tomcat is failing with a stack trace
> which I am attaching to this email.
>
> Looking at the stack trace, I see that the class:
>  javax.servlet.jsp.tagext.TagLibraryValidator
> was not found.
>
> My questions is: Where is the TagLibraryValidator class to be found?
>
> Jim Anderson
>
>


Re: Help with tomcat 11 failure

2024-10-21 Thread Jeffrey.Thomas
Hi Jim,

Fellow user here.

I am guessing that you need to migrate your application to Java 17+ and make 
all the necessary changes to move from the javax.* to the Jakarta EE jakarta.* 
packages.  This includes all servlet stuff.

Cheers, Jeff

On Oct 21, 2024 6:57 PM, Jim Anderson  wrote:
Hi,

I was working on a web application about 2 years ago and I am finally getting 
back to my work on this application. However, when I try to bring up the app as 
a web page in firefox, tomcat is failing with a stack trace which I am 
attaching to this email.

Looking at the stack trace, I see that the class:
 javax.servlet.jsp.tagext.TagLibraryValidator
was not found.

My questions is: Where is the TagLibraryValidator class to be found?

Jim Anderson



RE: Help with tomcat 11 failure

2024-10-21 Thread Mcalexander, Jon J.
I could be wrong, but I think you need to migrate your code as 11 uses Jakarta 
syntax, just like 10.1 does.

From: Jim Anderson 
Sent: Monday, October 21, 2024 11:55 AM
To: users@tomcat.apache.org
Subject: Help with tomcat 11 failure

Hi, I was working on a web application about 2 years ago and I am finally 
getting back to my work on this application. However, when I try to bring up 
the app as a web page in firefox, tomcat is failing with a stack trace which I 
am attaching

Hi,

I was working on a web application about 2 years ago and I am finally getting 
back to my work on this application. However, when I try to bring up the app as 
a web page in firefox, tomcat is failing with a stack trace which I am 
attaching to this email.

Looking at the stack trace, I see that the class:
 javax.servlet.jsp.tagext.TagLibraryValidator
was not found.

My questions is: Where is the TagLibraryValidator class to be found?

Jim Anderson



Help with tomcat 11 failure

2024-10-21 Thread Jim Anderson
Hi,

I was working on a web application about 2 years ago and I am finally
getting back to my work on this application. However, when I try to bring
up the app as a web page in firefox, tomcat is failing with a stack trace
which I am attaching to this email.

Looking at the stack trace, I see that the class:
 javax.servlet.jsp.tagext.TagLibraryValidator
was not found.

My questions is: Where is the TagLibraryValidator class to be found?

Jim Anderson
HTTP Status 500 – Internal Server Error

Type Exception Report

Message java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:307)
	jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	java.base/java.lang.Thread.run(Thread.java:1575)

Root Cause

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
	java.base/java.lang.ClassLoader.defineClass1(Native Method)
	java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1026)
	java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2112)
	org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:669)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1144)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1014)
	java.base/java.lang.ClassLoader.defineClass1(Native Method)
	java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1026)
	java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2112)
	org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:669)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1144)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1014)
	org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:367)
	org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:197)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1385)
	org.apache.jasper.compiler.Parser.parse(Parser.java:135)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:264)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:109)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:396)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:602)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:396)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:354)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:302)
	jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java

Re: Tomcat 11 & Request Attributes

2024-10-21 Thread Mark Thomas

On 20/10/2024 02:49, Dan McLaughlin wrote:

We use Shibboleth SP, which passes request attributes from Apache over AJP
to Tomcat; after upgrading from Tomcat 10.1 to Tomcat 11, the request
attributes aren't coming over.  Does anyone know of anything that changed
in Tomcat 11 that might affect request attributes being passed over AJP?


Compare the AJP Connector configuration between 10.1 and 11.0. I suspect 
allowedRequestAttributesPattern is not set correctly for 11.0.


Mark


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



Tomcat 11 & Request Attributes

2024-10-19 Thread Dan McLaughlin
We use Shibboleth SP, which passes request attributes from Apache over AJP
to Tomcat; after upgrading from Tomcat 10.1 to Tomcat 11, the request
attributes aren't coming over.  Does anyone know of anything that changed
in Tomcat 11 that might affect request attributes being passed over AJP?


--

Thanks,

Dan

-- 








*NOTICE:* This e-mail message and all attachments transmitted with 
it are for the sole use of the intended recipient(s) and may contain 
confidential and privileged information. Any unauthorized review, use, 
disclosure, ​or distribution is strictly prohibited. The contents of this 
e-mail are confidential and may be subject to work product privileges. If 
you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.





Re: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-18 Thread Christopher Schultz

Joseph,

On 10/17/24 4:13 AM, Xavier, Joseph wrote:

I wanted to understand whether Tomcat 9.0.90 and above minor
versions are supported with JDK 8? We have see compile issues when
our JDK 8 environment tried to work with Tomcat 9.0.90. If the
supportability is deprecated, is there any doc or public
announcement stating the same?
Tomcat 9 should work with Java 8. If you are having compilation issues 
please report them here.


Tomcat 9 will continue to support Java 8 for its entire lifetime. The 
Servlet Specification that Tomcat 9 tracks (4.0) requires support for 
Java 8 and that will never change. At some point (no current plans 
anywhere on the horizon), Tomcat 9 will reach end-of-life and you will 
need to use a higher version of Java on newer versions of Tomcat.


-chris


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



Re: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-18 Thread Thad Humphries
On Thu, Oct 17, 2024 at 2:27 AM Xavier, Joseph
 wrote:

> Hi,
>
> I wanted to understand whether Tomcat 9.0.90 and above minor versions are
> supported with JDK 8? We have see compile issues when our JDK 8 environment
> tried to work with Tomcat 9.0.90.
> If the supportability is deprecated, is there any doc or public
> announcement stating the same?
>
>
>
> Thank you
> Joseph X.
>

You don't say what issues you are having with JDK 8, but FWIW, we stumbled
upon this memory leak issue two years ago with OpenJDK 8: "Native memory
leak in java.util.zip caused by mis-using the API" (
https://bugs.openjdk.org/browse/JDK-8257032)

The problem did **NOT** appear in Tomcat, but in a long-running Java app
that processed images. RedHat advised "Upgrade to JDK11+, where the
finalize method is deprecated and implemented as a no-op, and memory is
released when the object becomes unreachable." (
https://access.redhat.com/solutions/6724981, subscription required)  We did
and it solved our problem. Since then we've also used OpenJDK 11 with
Tomcat 9.0.*.

-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 111-13)


Re: stack trace from tomcat when I try to start my webpage on my LAN

2024-10-18 Thread Chuck Caldarale


> On Oct 18, 2024, at 02:33, Rob Sargent  wrote:
> 
> Did you not see my reply?


Jim likely didn’t see it because e-mails sent to his purported address are 
bouncing.

  - Chuck


> In tomcat 10 and above idont think you should see reference to javax in 
> stacks.  I suspect your tags library is out of date, non compliant 
> 
> You often don't see your own posts on the email fora without specific config.
>> 
> 
> 
> -
> 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: Assistance with Apache Tomcat Integration with MS Sentinel

2024-10-18 Thread Mark Thomas

On 18/10/2024 09:55, Kele Masemola wrote:

Good day,

We are trying to integrate Tomcat Apache with Sentinel, so we just wanted to 
get some clarity on a few things. We installed Apache Tomcat data connector on 
Sentinel. It seems the Apache servers in our environment are running on Windows 
machines, so when we download and install the windows agent on the Apache 
Tomcat servers, will the logs go through our syslog server via AMA or through 
our syslog server via CEF?


That would be a question for your MS Sentinel support channel.


It seems the version of Apache Tomcat currently being run in the environment is 
Apache Tomcat/9.0.85, is it compatible with the Deprecated Apache Tomcat data 
connector on MS Sentinel, which was developed using Apache Tomcat version 
10.0.4?


Another question for your MS Sentinel support channel.

Regards,

Mark


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



Assistance with Apache Tomcat Integration with MS Sentinel

2024-10-18 Thread Kele Masemola
Good day,

We are trying to integrate Tomcat Apache with Sentinel, so we just wanted to 
get some clarity on a few things. We installed Apache Tomcat data connector on 
Sentinel. It seems the Apache servers in our environment are running on Windows 
machines, so when we download and install the windows agent on the Apache 
Tomcat servers, will the logs go through our syslog server via AMA or through 
our syslog server via CEF?

It seems the version of Apache Tomcat currently being run in the environment is 
Apache Tomcat/9.0.85, is it compatible with the Deprecated Apache Tomcat data 
connector on MS Sentinel, which was developed using Apache Tomcat version 
10.0.4?

Regards
Kele Masemola



Re: stack trace from tomcat when I try to start my webpage on my LAN

2024-10-18 Thread Rob Sargent
Did you not see my reply?
In tomcat 10 and above idont think you should see reference to javax in stacks. 
 I suspect your tags library is out of date, non compliant 

You often don't see your own posts on the email fora without specific config. 
> 


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



RE: Tomcat 11.0

2024-10-17 Thread Mcalexander, Jon J.
Thank you!

From: Chuck Caldarale 
Sent: Thursday, October 17, 2024 12:04 PM
To: Tomcat Users List 
Subject: Re: Tomcat 11.0

> On Oct 17, 2024, at 11: 45, Mcalexander, Jon J.  com. INVALID> wrote: > > Question. > > With the latest release, is Tomcat 11. 
> 0. 0 still Alpha, or is it now in Stable mode? Stable. - Chuck 
> -




> On Oct 17, 2024, at 11:45, Mcalexander, Jon J. 
> mailto:jonmcalexan...@wellsfargo.com.INVALID>>
>  wrote:

>

> Question.

>

> With the latest release, is Tomcat 11.0.0 still Alpha, or is it now in Stable 
> mode?





Stable.



  - Chuck





-

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

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




Re: Tomcat 11.0

2024-10-17 Thread Chuck Caldarale


> On Oct 17, 2024, at 11:45, Mcalexander, Jon J. 
>  wrote:
> 
> Question.
> 
> With the latest release, is Tomcat 11.0.0 still Alpha, or is it now in Stable 
> mode?


Stable.

  - Chuck


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



Re: stack trace from tomcat when I try to start my webpage on my LAN

2024-10-17 Thread Chuck Caldarale


> On Oct 17, 2024, at 11:38, Jim Anderson  wrote:
> 
> I am re-posting a post that I thought I made yesterday. It did not show up in 
> my mail from users@tomcat.apache.org, hence I am trying again. My apologies 
> if anyone receives both of my posts.


Everyone on the list has received both of your posts, and two responses have 
been sent (not counting this one). The mailing list avoids echoing a message 
back to the sender.

  - Chuck


> I am trying to start up an webpage to use as a demo. I am using tomcat 11.  I 
> have been looking at the error but have made no progress have been sent (not 
> coess figuring out the problem. Below I am including the stack trace I am 
> getting from tomcat and would appreciated any guidance on finding the source 
> of my problem and how to fix it.
> 
> The problem occurs when I am in firefox and I enter the url of application, 
> e.g. I enter the following URL:
> 
> localhost:8080/theApp
> 
> 
> The  is shown in my postscript.
> 
> Thanks for any advise!
> 
> Jim A.
> 
> 
> _
> 
> postscript
> 
> __
> 
> HTTP Status 500 – Internal Server Error
> 
> Type Exception Report
> 
> Message java.lang.NoClassDefFoundError: 
> javax/servlet/jsp/tagext/TagLibraryValidator
> 
> Description The server encountered an unexpected condition that prevented it 
> from fulfilling the request.
> 
> Exception
> 
> jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: 
> javax/servlet/jsp/tagext/TagLibraryValidator
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:307)
> jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716)
>  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
>  
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
>  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
>  
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
>  org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
>  
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
>  
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
>  
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746)
>  
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
>  
> org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)
>  
> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
>  
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
> java.base/java.lang.Thread.run(Thread.java:833)
> 
> 
> -
> 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



Tomcat 11.0

2024-10-17 Thread Mcalexander, Jon J.
Question.

With the latest release, is Tomcat 11.0.0 still Alpha, or is it now in Stable 
mode?

Thanks,

Dream * Excel * Explore * Inspire
Jon McAlexander | Senior Infrastructure Engineer | Middleware/App Hosting | FHP 
| CTO | Wells Fargo Technology
8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010  | +1 515 988 2508 | 
jonmcalexan...@gmail.com<mailto:jonmcalexan...@gmail.com>
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.



stack trace from tomcat when I try to start my webpage on my LAN

2024-10-17 Thread Jim Anderson



I am re-posting a post that I thought I made yesterday. It did not show 
up in my mail from users@tomcat.apache.org, hence I am trying again. My 
apologies if anyone receives both of my posts.


I am trying to start up an webpage to use as a demo. I am using tomcat 
11.  I have been looking at the error but have made no progress figuring 
out the problem. Below I am including the stack trace I am getting from 
tomcat and would appreciated any guidance on finding the source of my 
problem and how to fix it.


The problem occurs when I am in firefox and I enter the url of 
application, e.g. I enter the following URL:


    localhost:8080/theApp


The  is shown in my postscript.

Thanks for any advise!

Jim A.


_

postscript

__

HTTP Status 500 – Internal Server Error

Type Exception Report

Message java.lang.NoClassDefFoundError: 
javax/servlet/jsp/tagext/TagLibraryValidator


Description The server encountered an unexpected condition that 
prevented it from fulfilling the request.


Exception

jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: 
javax/servlet/jsp/tagext/TagLibraryValidator

 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:307)
    jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716)
 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746)
 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)
 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
    java.base/java.lang.Thread.run(Thread.java:833)


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



Re: stack trace from tomcat when I try to start my webpage on my LAN

2024-10-17 Thread Zdeněk Henek
Tomcat has migration tool for older applications
https://tomcat.apache.org/download-migration.cgi

Best would be to rewrite the app to import jakartaee package (JakartaEE)
instead of javax (JavaEE) and upgrade all libraries you use in the war to
be JakartaEE compatible.

Zdenek

On Wed, Oct 16, 2024 at 10:14 PM Rob Sargent  wrote:

>
> You should not see "javax" in current tomcat work. Check your tag library
> dependancy
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-17 Thread Chuck Caldarale


> On Oct 17, 2024, at 04:01, Thomas Hoffmann (Speed4Trade GmbH) 
>  wrote:
> 
> Hello Joseph,
> 
>> -Ursprüngliche Nachricht-
>> Von: Xavier, Joseph 
>> Gesendet: Donnerstag, 17. Oktober 2024 10:59
>> An: rainer.j...@kippdata.de
>> Cc: Tomcat Users List 
>> Betreff: RE: Supportability of Tomcat 9.0.90 and above with JDK 8
>> 
>> Hi Rainer,
>> 
>> Thank you for the info. We did look at this matrix but we also found a
>> conflicting article as well:
>> 
>> https://tomcat.apache.org/tomcat-9.0-doc/building.html
>> 
>> In this, the required JDK version is said to be JDK 11 or above. Can you 
>> help me
>> understand the differences between the 2 articles?
> 
> 
> The difference is building and running.
> You need a certain JDK for building which might be different from the 
> supported runtime environment.


Point of clarification: JDK 11 is required for building Tomcat itself, not for 
building applications that run under Tomcat. Those can be built with the same 
JDK on which you run Tomcat.

  - Chuck


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



AW: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-17 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Joseph,

> -Ursprüngliche Nachricht-
> Von: Xavier, Joseph 
> Gesendet: Donnerstag, 17. Oktober 2024 10:59
> An: rainer.j...@kippdata.de
> Cc: Tomcat Users List 
> Betreff: RE: Supportability of Tomcat 9.0.90 and above with JDK 8
> 
> Hi Rainer,
> 
> Thank you for the info. We did look at this matrix but we also found a
> conflicting article as well:
> 
> https://tomcat.apache.org/tomcat-9.0-doc/building.html
> 
> In this, the required JDK version is said to be JDK 11 or above. Can you help 
> me
> understand the differences between the 2 articles?
> 
> Thank you
> Joseph X.
> 


The difference is building and running.
You need a certain JDK for building which might be different from the supported 
runtime environment.


> -Original Message-
> From: Rainer Jung 
> Sent: Thursday, October 17, 2024 1:54 PM
> To: Tomcat Users List 
> Subject: Re: Supportability of Tomcat 9.0.90 and above with JDK 8
> 
> Caution: This email originated from outside of the organization. Review for
> Phishing!
> 
> 
> Am 17.10.24 um 08:27 schrieb Xavier, Joseph:
> > Hi,
> >
> > I wanted to understand whether Tomcat 9.0.90 and above minor versions
> are supported with JDK 8? We have see compile issues when our JDK 8
> environment tried to work with Tomcat 9.0.90.
> > If the supportability is deprecated, is there any doc or public announcement
> stating the same?
> 
> Hi Joseph,
> 
> yes TC 9 is supported with JDK 8 (and higher), see
> 
> https://urldefense.com/v3/__https://tomcat.apache.org/whichversion.html_
> _;!!KpaPruflFCEp!ma-
> 2pPcVOuOsTkmfs7DESyaBow4GmIAfNqWr6x_pYE0_HUDDFMxTLosQB8Y-
> rtDMk7ZVj1BvF8CMlyuVg9x7e9BwtTlq$
> 
> Independent of your JDK 8 problems, you should try to stay current, so
> instead of 9.0.90 use 9.0.96 and define a patch strategy to let your 
> installation
> not diverge too much from 9.0.current.
> 
> Concerning your specific JDK 8 problem you can do a separate post to the list
> describing your observed problem.
> 
> Best regards,
> 
> Rainer
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-17 Thread Xavier, Joseph
Hi Rainer,

Thank you for the info. We did look at this matrix but we also found a 
conflicting article as well:

https://tomcat.apache.org/tomcat-9.0-doc/building.html

In this, the required JDK version is said to be JDK 11 or above. Can you help 
me understand the differences between the 2 articles?



Thank you
Joseph X.


-Original Message-
From: Rainer Jung  
Sent: Thursday, October 17, 2024 1:54 PM
To: Tomcat Users List 
Subject: Re: Supportability of Tomcat 9.0.90 and above with JDK 8

Caution: This email originated from outside of the organization. Review for 
Phishing!


Am 17.10.24 um 08:27 schrieb Xavier, Joseph:
> Hi,
>
> I wanted to understand whether Tomcat 9.0.90 and above minor versions are 
> supported with JDK 8? We have see compile issues when our JDK 8 environment 
> tried to work with Tomcat 9.0.90.
> If the supportability is deprecated, is there any doc or public announcement 
> stating the same?

Hi Joseph,

yes TC 9 is supported with JDK 8 (and higher), see

https://urldefense.com/v3/__https://tomcat.apache.org/whichversion.html__;!!KpaPruflFCEp!ma-2pPcVOuOsTkmfs7DESyaBow4GmIAfNqWr6x_pYE0_HUDDFMxTLosQB8Y-rtDMk7ZVj1BvF8CMlyuVg9x7e9BwtTlq$

Independent of your JDK 8 problems, you should try to stay current, so instead 
of 9.0.90 use 9.0.96 and define a patch strategy to let your installation not 
diverge too much from 9.0.current.

Concerning your specific JDK 8 problem you can do a separate post to the list 
describing your observed problem.

Best regards,

Rainer


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



Re: Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-17 Thread Rainer Jung

Am 17.10.24 um 08:27 schrieb Xavier, Joseph:

Hi,

I wanted to understand whether Tomcat 9.0.90 and above minor versions are 
supported with JDK 8? We have see compile issues when our JDK 8 environment 
tried to work with Tomcat 9.0.90.
If the supportability is deprecated, is there any doc or public announcement 
stating the same?


Hi Joseph,

yes TC 9 is supported with JDK 8 (and higher), see

https://tomcat.apache.org/whichversion.html

Independent of your JDK 8 problems, you should try to stay current, so 
instead of 9.0.90 use 9.0.96 and define a patch strategy to let your 
installation not diverge too much from 9.0.current.


Concerning your specific JDK 8 problem you can do a separate post to the 
list describing your observed problem.


Best regards,

Rainer


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



Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-17 Thread Xavier, Joseph
Hi,

I wanted to understand whether Tomcat 9.0.90 and above minor versions are 
supported with JDK 8? We have see compile issues when our JDK 8 environment 
tried to work with Tomcat 9.0.90.
If the supportability is deprecated, is there any doc or public announcement 
stating the same?



Thank you
Joseph X.



Supportability of Tomcat 9.0.90 and above with JDK 8

2024-10-16 Thread Xavier, Joseph
Hi,

I wanted to understand whether Tomcat 9.0.90 and above minor versions are 
supported with JDK 8? We have see compile issues when our JDK 8 environment 
tried to work with Tomcat 9.0.90.
If the supportability is deprecated, is there any doc or public announcement 
stating the same?



Thank you
Joseph X.


Re: stack trace from tomcat when I try to start my webpage on my LAN

2024-10-16 Thread Rob Sargent


You should not see "javax" in current tomcat work. Check your tag library 
dependancy


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



Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-16 Thread Izek Hornbeck
I have confirmed that our development team has seen these same loading
issues with Tomcat 9.0.55 and 9.0.86.

On Wed, Oct 16, 2024 at 3:22 PM Izek Hornbeck 
wrote:

> We are working on a large upgrade for this application, so we are looking
> at upgrading Tomcat too (either to version 10 if we can resolve the
> javax/jakarta issues or just to the current 9.0.x). I'll try some tests
> locally to see what impact newer versions could have.
>
> In the access logs, we occasionally get lines like this:
>
> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> /app_name/some_page.jsp HTTP/1.1" 200 16107
> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> /app_name/styles/some_style.css HTTP/1.1" 400 762
> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> /app_name/styles/some_other_style.css HTTP/1.1" 400 762
> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
> /app_name/dwr/interface/some_script.js HTTP/1.1" 200 13339
> XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:21 -0600] "GET
> /app_name/javascript/dashboard.js HTTP/1.1" 200 21841
>
> Sometimes there are .jpg files that also have a 400 response. The
> confusing part is that those files don't always get that response, and it's
> not always the same files.
>
> -Izek
>
> On Mon, Oct 14, 2024 at 9:32 AM Chuck Caldarale  wrote:
>
>>
>> > On Oct 11, 2024, at 12:48, Izek Hornbeck 
>> wrote:
>> >
>> > My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
>> > server.
>>
>>
>> Which is almost 4 years old. You really, really need to catch up.
>>
>>
>> > When we upgraded to Tomcat 9, we found that occasionally, some css
>> > files and images would not load, with a 400 response. They would appear
>> > after a page refresh (sometimes I had to refresh twice).
>> >
>> > The closest thing I've found about issues like this is
>> >
>> https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
>> .
>> >
>> > We have just recently tried adding "cachingAllowed=false" to the
>> > "tomcat/conf/context.xml" file, but it hasn't been long enough to know
>> if
>> > that really fixed the issue.
>> >
>> > Has anyone had a similar issue? What might be the root cause?
>>
>>
>> Without any real data (eg, access logs), there’s no way to answer that
>> question. Your first step should be to upgrade to the current 9.0.x version.
>>
>>   -Chuck
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-16 Thread Izek Hornbeck
We are working on a large upgrade for this application, so we are looking
at upgrading Tomcat too (either to version 10 if we can resolve the
javax/jakarta issues or just to the current 9.0.x). I'll try some tests
locally to see what impact newer versions could have.

In the access logs, we occasionally get lines like this:

XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/some_page.jsp HTTP/1.1" 200 16107
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/styles/some_style.css HTTP/1.1" 400 762
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/styles/some_other_style.css HTTP/1.1" 400 762
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:20 -0600] "GET
/app_name/dwr/interface/some_script.js HTTP/1.1" 200 13339
XXX.YYY.ZZZ.AA - - [15/Oct/2024:10:08:21 -0600] "GET
/app_name/javascript/dashboard.js HTTP/1.1" 200 21841

Sometimes there are .jpg files that also have a 400 response. The confusing
part is that those files don't always get that response, and it's not
always the same files.

-Izek

On Mon, Oct 14, 2024 at 9:32 AM Chuck Caldarale  wrote:

>
> > On Oct 11, 2024, at 12:48, Izek Hornbeck  wrote:
> >
> > My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
> > server.
>
>
> Which is almost 4 years old. You really, really need to catch up.
>
>
> > When we upgraded to Tomcat 9, we found that occasionally, some css
> > files and images would not load, with a 400 response. They would appear
> > after a page refresh (sometimes I had to refresh twice).
> >
> > The closest thing I've found about issues like this is
> >
> https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
> .
> >
> > We have just recently tried adding "cachingAllowed=false" to the
> > "tomcat/conf/context.xml" file, but it hasn't been long enough to know if
> > that really fixed the issue.
> >
> > Has anyone had a similar issue? What might be the root cause?
>
>
> Without any real data (eg, access logs), there’s no way to answer that
> question. Your first step should be to upgrade to the current 9.0.x version.
>
>   -Chuck
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


stack trace from tomcat when I try to start my webpage on my LAN

2024-10-16 Thread Jim Anderson


I am trying to start up an webpage to use as a demo. I am using tomcat 
11.  I have been looking at the error but have made no progress figuring 
out the problem. Below I am including the stack trace I am getting from 
tomcat and would appreciated any guidance on finding the source of my 
problem and how to fix it.


The problem occurs when I am in firefox and I enter the url of 
application, e.g. I enter the following URL:


    localhost:8080/theApp


The attach file "appErr.txt" contains the resulting stack trace.


Thanks for any advise!


Jim A.
HTTP Status 500 – Internal Server Error

Type Exception Report

Message java.lang.NoClassDefFoundError: 
javax/servlet/jsp/tagext/TagLibraryValidator

Description The server encountered an unexpected condition that prevented it 
from fulfilling the request.

Exception

jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: 
javax/servlet/jsp/tagext/TagLibraryValidator
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:307)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:716)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)

org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)

org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)

org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1746)

org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)

org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)

org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
java.base/java.lang.Thread.run(Thread.java:833)



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

Re: tomcat 9.0.96 and ibm semeru

2024-10-16 Thread Mark Thomas

15 Oct 2024 13:59:57 Andreas Moroder :


Hello,

we have Tomcat 9.0.96  and Java 8.
We would like to get rid of Oracle java and use IBM semeru.

Can Oracle java simply be replaced by ibm semeru,


Yes.


or are changes to the java and jsp applications necessary?


No.


Do the java libraries we call from our jsp-pages have to be recompiled?


No.

The only caveats to the above are:

If your application uses any non-public Java API (usually via reflection) 
there is a small risk it will break.


Likewise for the places where Tomcat does this (from memory just the 
memory leak protection and that can be disabled if it is an issue)


There is a small risk you find a JRE bug you didn't see with Oracle.

Overall, all of those risks are very small. I'd expect it to just work.

Mark

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



Re: Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-14 Thread Chuck Caldarale


> On Oct 11, 2024, at 12:48, Izek Hornbeck  wrote:
> 
> My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
> server.


Which is almost 4 years old. You really, really need to catch up.


> When we upgraded to Tomcat 9, we found that occasionally, some css
> files and images would not load, with a 400 response. They would appear
> after a page refresh (sometimes I had to refresh twice).
> 
> The closest thing I've found about issues like this is
> https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9.
> 
> We have just recently tried adding "cachingAllowed=false" to the
> "tomcat/conf/context.xml" file, but it hasn't been long enough to know if
> that really fixed the issue.
> 
> Has anyone had a similar issue? What might be the root cause?


Without any real data (eg, access logs), there’s no way to answer that 
question. Your first step should be to upgrade to the current 9.0.x version.

  -Chuck


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



Occasional 400 errors for static resources in Tomcat 9.0.40

2024-10-11 Thread Izek Hornbeck
My team has a Java web app (java v17.0.2) running on a Tomcat 9.0.40
server. When we upgraded to Tomcat 9, we found that occasionally, some css
files and images would not load, with a 400 response. They would appear
after a page refresh (sometimes I had to refresh twice).

The closest thing I've found about issues like this is
https://stackoverflow.com/questions/77989064/intermittently-getting-status-400-for-js-css-images-after-upgrading-to-tomcat-9
.

We have just recently tried adding "cachingAllowed=false" to the
"tomcat/conf/context.xml" file, but it hasn't been long enough to know if
that really fixed the issue.

Has anyone had a similar issue? What might be the root cause?

Thanks,
Izek


Re: SSL on Tomcat 9

2024-10-09 Thread Ron Boyer
I created the certificate a windows csr.  I did find OpenSSL on our server and 
from there we were able to create the right type of .pem file for Tomcat to 
use.  Thanks for everyone's help.



Ron Boyer

IT Director

Information Technology

Summit County, Utah

Office: 435-336-3143




From: Mark Thomas 
Sent: Wednesday, October 9, 2024 10:48 AM
To: users@tomcat.apache.org 
Subject: Re: SSL on Tomcat 9

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On 09/10/2024 07:47, Ron Boyer wrote:
> hello, I am trying to renew the SSL certificate from a signing authority.  I 
> am running Tomcat 9.  I understand that I have to import PKCS #12 
> certificate.  I seem to be able to make one, but I don't think it is correct. 
>  My signing authority, GoDaddy, will let me download a crt and pem file. From 
> the server.xml file I see there is only one entry that points to the keystore 
> of a PKCS #12 key.  I don't know  whether I need to import the certificate 
> with keytool or using the certificate snap-in with Windows Management 
> Console.  Any advice?

How did you create the private key (show us the command line if you can)
and what format is the key in?

If you followed an on-line guide (e.g. from GoDaddy) can you provide a
reference to that?

Why do you think what you are doing is incorrect?

What is your TLS connector configuration (show use the XML but mask any
sensitive information like passwords)?

What do the logs show for that Connector when Tomcat starts?

Mark


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



Re: SSL on Tomcat 9

2024-10-09 Thread Mark Thomas

On 09/10/2024 07:47, Ron Boyer wrote:

hello, I am trying to renew the SSL certificate from a signing authority.  I am 
running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  I 
seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?


How did you create the private key (show us the command line if you can) 
and what format is the key in?


If you followed an on-line guide (e.g. from GoDaddy) can you provide a 
reference to that?


Why do you think what you are doing is incorrect?

What is your TLS connector configuration (show use the XML but mask any 
sensitive information like passwords)?


What do the logs show for that Connector when Tomcat starts?

Mark


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



Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-09 Thread Mark Thomas

On 09/10/2024 05:49, Sajid Hussain wrote:

Hi,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using Apache 
common daemon.


I'm also attaching the stack trace observe in memory analyzer.


You need to look at the heap usage to see where the memory is being used.

Most profilers should also be able to tell where the CPU time is being 
spent.


Did you look at DAEMON-460? Does it apply to you?

Mark





Regards,
Sajid

On 10/9/2024 4:24 PM, Mark Thomas wrote:

Please send your reply to the users list so I can reply there.

Mark


On 08/10/2024 06:23, Sajid Hussain wrote:

Hi Mark,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using 
Apache common daemon.



Sajid

On 10/8/2024 4:47 PM, Mark Thomas wrote:

On 08/10/2024 05:21, Sajid Hussain wrote:

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application 
was using 2.7.18. Now I'm migrating my application spring version 
to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the 
version in my java project and fix the hibernate error migrating 
from 5 to 6. Now my application start on tomcat 10. But after few 
request JVM consume the maximum memory (I set it 3GB max) and cup 
usage to 90-98%. I set windows service priority to low and it take 
80-90% hence my application stop responding. Here is the thread dum 
for the tomcat.Not getting any clue whats causing to tomcat high 
CPU and memory usage.


A profiler (I use YourKit because they give free licenses to OSS 
develoeprs but other profilers are avialable) will tell you more 
about what is going on than a single stack trace.


Is this a Spring Boot app? Is it packaged as a JAR or a WAR?

How are you running this as a Windows service? If you are using 
Apache Commons Daemon (the default way to run Tomcat as a Windows 
service) then this might be useful:

https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460

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: SSL on Tomcat 9

2024-10-09 Thread Ron Boyer

Hello Ahmed, I have always used keytool on the web host.  Can I run OpenSSL on 
another client and send the key to the webhost or does OpenSSL have to run on 
the webhost?



From: Ahmed Ashour 
Sent: Wednesday, October 9, 2024 8:01 AM
To: users@tomcat.apache.org 
Subject: Re: SSL on Tomcat 9

[You don't often get email from asash...@yahoo.com.invalid. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

 Hi,
On windows, one can use OpenSSL to export the private key and certificate to 
.p12, then import that to the key store.
openssl pkcs12 -export -in fullchain.pem -inkey privatekey.pem -out server.p12 
-name tomcatkeytool -importkeystore -deststorepass changeit -destkeystore 
localhost-rsa.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass 
changeit -alias tomcat

Similar posts in 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fppm.softtek.com%2Fitg%2Fpdf%2Fmanual%2FContent%2FSA%2FInstallAdmin%2Fimport_existing_SSL.htm&data=05%7C02%7Crboyer%40summitcountyutah.gov%7Ca23b98c0ea3b4e2f4d9a08dce86b052d%7C497f0086ed7845149cc43715b1894e4e%7C0%7C0%7C638640793572493089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QH2sqNJnnDXp%2FUWLKCk0qb4T5GxoxamgRXtAPc6Qwto%3D&reserved=0<https://ppm.softtek.com/itg/pdf/manual/Content/SA/InstallAdmin/import_existing_SSL.htm>
 and How to import an existing SSL certificate for use in Tomcat | Atlassian 
Support | Atlassian Documentation

|
|
|  |
How to import an existing SSL certificate for use in Tomcat | Atlassian ...


 |

 |

 |




Hope that helps,Ahmed
On Wednesday, October 9, 2024 at 03:47:49 PM GMT+2, Ron Boyer 
 wrote:


 hello, I am trying to renew the SSL certificate from a signing authority.  I 
am running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  
I seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?



Re: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Rémy Maucherat
On Wed, Oct 9, 2024 at 4:22 PM Greg Eschbacher
 wrote:
>
> Thank you very much Remy.  Your output below shows you using 9.0.96, and sure 
> enough this was a problem in 9.0.95 but is fixed in 9.0.96.

I tried 9.0.96 because I had just released it. However it has no
relevant fixes and 9.0.95 work for me as well. I would say your maven
did not use the right annotations jar, for example the annotations jar
from 9.0.93 does not include the module info (due to the packaging
bug) and it could maybe do that.

Rémy

> Thanks,
> Greg
>
> 
> From: Rémy Maucherat 
> Sent: Wednesday, October 9, 2024 8:28 AM
> To: Tomcat Users List 
> Subject: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and 
> modules
>
> On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
>  wrote:
> >
> > Hi everyone,
> >
> > Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and 
> > we are having issues building with the latest jar.
> >
> > We are getting issues related to JDK 11 and modules.  Specifically, when we 
> > build, we get the message " module not found: java.annotation "
> >
> > To demonstrate this, I have created a sample project 
> > https://urldefense.com/v3/__https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfqMPAjY$
> >   .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> > using Oracle jdk-11.0.23)
> >
> > By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> > 9.0.95, it does not.  I've tried going through the commit history, but 
> > nothing stands out.
> >
> > Note that a similar issue involving JDK 11 and modularity happened in this 
> > thread:  
> > https://urldefense.com/v3/__https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCRPRO8ni$
>
> This is a packaging issue that is fixed in 9.0.93, it is not similar.
>
> Your test project works for me, so I don't have any ideas. Maven did
> download the proper tomcat-annotations-api.
>
> remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -< com.example:simple-tomcat-project 
> >--
> [INFO] Building simple-tomcat-project 1.0-SNAPSHOT
> [INFO]   from pom.xml
> [INFO] [ jar 
> ]-
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
> (1.7 kB at 4.8 kB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
> (1.5 kB at 75 kB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
> (3.6 MB at 11 MB/s)
> Downloading from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
> Downloaded from central:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.

Re: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Greg Eschbacher
Thank you very much Remy.  Your output below shows you using 9.0.96, and sure 
enough this was a problem in 9.0.95 but is fixed in 9.0.96.

Thanks,
Greg


From: Rémy Maucherat 
Sent: Wednesday, October 9, 2024 8:28 AM
To: Tomcat Users List 
Subject: [External] : Re: Issue with using tomcat-embed-core, JDK 11 and modules

On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
 wrote:
>
> Hi everyone,
>
> Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and we 
> are having issues building with the latest jar.
>
> We are getting issues related to JDK 11 and modules.  Specifically, when we 
> build, we get the message " module not found: java.annotation "
>
> To demonstrate this, I have created a sample project 
> https://urldefense.com/v3/__https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfqMPAjY$
>   .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> using Oracle jdk-11.0.23)
>
> By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> 9.0.95, it does not.  I've tried going through the commit history, but 
> nothing stands out.
>
> Note that a similar issue involving JDK 11 and modularity happened in this 
> thread:  
> https://urldefense.com/v3/__https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCRPRO8ni$

This is a packaging issue that is fixed in 9.0.93, it is not similar.

Your test project works for me, so I don't have any ideas. Maven did
download the proper tomcat-annotations-api.

remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] -< com.example:simple-tomcat-project >--
[INFO] Building simple-tomcat-project 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] [ jar ]-
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCfuLXrv6$
(1.7 kB at 4.8 kB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCXYAjrvZ$
(1.5 kB at 75 kB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCUsKMjsy$
(3.6 MB at 11 MB/s)
Downloading from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
Downloaded from central:
https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar__;!!ACWV5N9M2RV99hQ!KRBvIgokmvBd1aVvM0vbH9TfGPKUb9V19F0iBEPQb2krEaYSlz5szIeqUzlik5UNAMaq_27PCd7Y_xAy$
(13 kB at 667 kB/s)

With 9.0.93 it fails (as expected) with "module not found:
org.apache.tomcat.embed.core".

Rémy

> Thanks in advance for any suggestions on things to try.
>
>   *
> Greg

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



Re: SSL on Tomcat 9

2024-10-09 Thread Ahmed Ashour
 Hi,
On windows, one can use OpenSSL to export the private key and certificate to 
.p12, then import that to the key store.
openssl pkcs12 -export -in fullchain.pem -inkey privatekey.pem -out server.p12 
-name tomcatkeytool -importkeystore -deststorepass changeit -destkeystore 
localhost-rsa.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass 
changeit -alias tomcat

Similar posts in 
https://ppm.softtek.com/itg/pdf/manual/Content/SA/InstallAdmin/import_existing_SSL.htm
 and How to import an existing SSL certificate for use in Tomcat | Atlassian 
Support | Atlassian Documentation

| 
| 
|  | 
How to import an existing SSL certificate for use in Tomcat | Atlassian ...


 |

 |

 |




Hope that helps,Ahmed
On Wednesday, October 9, 2024 at 03:47:49 PM GMT+2, Ron Boyer 
 wrote:
 
 
 hello, I am trying to renew the SSL certificate from a signing authority.  I 
am running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  
I seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?

  

SSL on Tomcat 9

2024-10-09 Thread Ron Boyer
hello, I am trying to renew the SSL certificate from a signing authority.  I am 
running Tomcat 9.  I understand that I have to import PKCS #12 certificate.  I 
seem to be able to make one, but I don't think it is correct.  My signing 
authority, GoDaddy, will let me download a crt and pem file. From the 
server.xml file I see there is only one entry that points to the keystore of a 
PKCS #12 key.  I don't know  whether I need to import the certificate with 
keytool or using the certificate snap-in with Windows Management Console.  Any 
advice?



Re: Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-09 Thread Rémy Maucherat
On Tue, Oct 8, 2024 at 5:23 PM Greg Eschbacher
 wrote:
>
> Hi everyone,
>
> Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and we 
> are having issues building with the latest jar.
>
> We are getting issues related to JDK 11 and modules.  Specifically, when we 
> build, we get the message " module not found: java.annotation "
>
> To demonstrate this, I have created a sample project 
> https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link
>  .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm 
> using Oracle jdk-11.0.23)
>
> By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  
> 9.0.95, it does not.  I've tried going through the commit history, but 
> nothing stands out.
>
> Note that a similar issue involving JDK 11 and modularity happened in this 
> thread:  https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html

This is a packaging issue that is fixed in 9.0.93, it is not similar.

Your test project works for me, so I don't have any ideas. Maven did
download the proper tomcat-annotations-api.

remm@feather:~/Work/tomcat/tests/simple-tomcat-project$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] -----< com.example:simple-tomcat-project >--
[INFO] Building simple-tomcat-project 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] [ jar ]-------------
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.pom
(1.7 kB at 4.8 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.pom
(1.5 kB at 75 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar
(3.6 MB at 11 MB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/9.0.96/tomcat-annotations-api-9.0.96.jar
(13 kB at 667 kB/s)

With 9.0.93 it fails (as expected) with "module not found:
org.apache.tomcat.embed.core".

Rémy

> Thanks in advance for any suggestions on things to try.
>
>   *
> Greg

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



Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-09 Thread Sajid Hussain

Hi,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using Apache 
common daemon.


I'm also attaching the stack trace observe in memory analyzer.


Regards,
Sajid

On 10/9/2024 4:24 PM, Mark Thomas wrote:

Please send your reply to the users list so I can reply there.

Mark


On 08/10/2024 06:23, Sajid Hussain wrote:

Hi Mark,

Thanks for the quick response. Yes its spring boot application and 
packaged as War file. The Tomcat running as windows service using 
Apache common daemon.



Sajid

On 10/8/2024 4:47 PM, Mark Thomas wrote:

On 08/10/2024 05:21, Sajid Hussain wrote:

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application 
was using 2.7.18. Now I'm migrating my application spring version 
to 3.3.4 with Tomcat 10.1.30 and JDK 21. I have upgraded the 
version in my java project and fix the hibernate error migrating 
from 5 to 6. Now my application start on tomcat 10. But after few 
request JVM consume the maximum memory (I set it 3GB max) and cup 
usage to 90-98%. I set windows service priority to low and it take 
80-90% hence my application stop responding. Here is the thread dum 
for the tomcat.Not getting any clue whats causing to tomcat high 
CPU and memory usage.


A profiler (I use YourKit because they give free licenses to OSS 
develoeprs but other profilers are avialable) will tell you more 
about what is going on than a single stack trace.


Is this a Spring Boot app? Is it packaged as a JAR or a WAR?

How are you running this as a Windows service? If you are using 
Apache Commons Daemon (the default way to run Tomcat as a Windows 
service) then this might be useful:

https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460

Mark

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

https-openssl-nio2-8443-exec-2
  at sun.nio.ch.SocketDispatcher.read0(Ljava/io/FileDescriptor;JI)I 
(SocketDispatcher.java(Native Method))
  at sun.nio.ch.SocketDispatcher.read(Ljava/io/FileDescriptor;JI)I 
(SocketDispatcher.java:46)
  at sun.nio.ch.NioSocketImpl.tryRead(Ljava/io/FileDescriptor;[BII)I 
(NioSocketImpl.java:256)
  at sun.nio.ch.NioSocketImpl.implRead([BII)I (NioSocketImpl.java:307)
  at sun.nio.ch.NioSocketImpl.read([BII)I (NioSocketImpl.java:346)
  at sun.nio.ch.NioSocketImpl$1.read([BII)I (NioSocketImpl.java:796)
  at java.net.Socket$SocketInputStream.read([BII)I (Socket.java:1099)
  at org.postgresql.core.VisibleBufferedInputStream.readMore(IZ)Z 
(VisibleBufferedInputStream.java:192)
  at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(IZ)Z 
(VisibleBufferedInputStream.java:159)
  at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(I)Z 
(VisibleBufferedInputStream.java:144)
  at org.postgresql.core.VisibleBufferedInputStream.read([BII)I 
(VisibleBufferedInputStream.java:255)
  at org.postgresql.core.PGStream.receive([BII)V (PGStream.java:660)
  at org.postgresql.core.PGStream.receiveTupleV3()Lorg/postgresql/core/Tuple; 
(PGStream.java:620)
  at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(Lorg/postgresql/core/ResultHandler;IZ)V
 (QueryExecutorImpl.java:2387)
  at 
org.postgresql.core.v3.QueryExecutorImpl.execute(Lorg/postgresql/core/Query;Lorg/postgresql/core/ParameterList;Lorg/postgresql/core/ResultHandler;IIIZ)V
 (QueryExecutorImpl.java:372)
  at 
org.postgresql.jdbc.PgStatement.executeInternal(Lorg/postgresql/core/CachedQuery;Lorg/postgresql/core/ParameterList;I)V
 (PgStatement.java:517)
  at 
org.postgresql.jdbc.PgStatement.execute(Lorg/postgresql/core/CachedQuery;Lorg/postgresql/core/ParameterList;I)V
 (PgStatement.java:434)
  at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(I)Z 
(PgPreparedStatement.java:194)
  at org.postgresql.jdbc.PgPreparedStatement.executeQuery()Ljava/sql/ResultSet; 
(PgPreparedStatement.java:137)
  at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery()Ljava/sql/ResultSet;
 (ProxyPreparedStatement.java:52)
  at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery()Ljava/sql/ResultSet;
 (HikariProxyPreparedStatement.java)
  at 
org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.executeQuery()V 
(DeferredResultSetAccess.java:246)
  at 
org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.getResultSet()Ljava/sql/ResultSet;
 (DeferredResultSetAccess.java:167)
  at 
org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.advanceNext()Z 
(JdbcValuesResultSetImpl.java:265)
  at 
org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.processNext(Lorg/hibernate/sql/results/jdbc/spi/RowProcessingState;)Z
 (JdbcValuesResultSetImpl.java:145)
  at 
org.hibernate.sql.results.jdbc.internal.AbstractJdbcValues.next(Lorg/hibernate/sql/results/jdbc/spi/RowProcessingState;)Z
 (AbstractJdbcValues.jav

Issue with using tomcat-embed-core, JDK 11 and modules

2024-10-08 Thread Greg Eschbacher
Hi everyone,

Our application is upgrading from tomcat-embed-core 9.0.88 to 9.0.95, and we 
are having issues building with the latest jar.

We are getting issues related to JDK 11 and modules.  Specifically, when we 
build, we get the message " module not found: java.annotation "

To demonstrate this, I have created a sample project 
https://drive.google.com/file/d/1GwFLYRNol-zRL9vgg_ubsFcL2NWi9UmG/view?usp=drive_link
 .  (Just run "mvn clean package" with your JAVA_HOME set to JDK 11.  I'm using 
Oracle jdk-11.0.23)

By modifying the pom.xml and setting Tomcat to 9.0.88, it works fine.  9.0.95, 
it does not.  I've tried going through the commit history, but nothing stands 
out.

Note that a similar issue involving JDK 11 and modularity happened in this 
thread:  https://www.mail-archive.com/users@tomcat.apache.org/msg143765.html

Thanks in advance for any suggestions on things to try.

  *
Greg


[ANN] Apache Tomcat 9.0.96 available

2024-10-08 Thread Rémy Maucherat
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 9.0.96.

Apache Tomcat 9 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language, Java
WebSocket and JASPIC technologies.

Apache Tomcat 9.0.96 is a bugfix and feature release. The notable
changes compared to 9.0.95 include:

- Multiple fixes and improvements for WebDAV.

- Improvements to the recently added request/response recycling for
   HTTP/2.

- Improve the stability of Tomcat Native during GC.

Along with lots of other bug fixes and improvements.

Please refer to the change log for the complete list of changes:
https://tomcat.apache.org/tomcat-9.0-doc/changelog.html

Downloads:
https://tomcat.apache.org/download-90.cgi

Migration guides from Apache Tomcat 7.x and 8.x:
https://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team

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



AW: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-08 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Sajid,

> -Ursprüngliche Nachricht-
> Von: Sajid Hussain 
> Gesendet: Dienstag, 8. Oktober 2024 13:21
> An: users@tomcat.apache.org
> Betreff: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows
> machine with JDK 21 LTS
> 
> Hi,
> 
> I was using tomcat 9 with JDK 17 on windows. My java application was using
> 2.7.18. Now I'm migrating my application spring version to 3.3.4 with Tomcat
> 10.1.30 and JDK 21. I have upgraded the version in my java project and fix the
> hibernate error migrating from 5 to 6. Now my application start on tomcat 10.
> But after few request JVM consume the maximum memory (I set it 3GB max)
> and cup usage to 90-98%. I set windows service priority to low and it take 80-
> 90% hence my application stop responding. Here is the thread dum for the
> tomcat.Not getting any clue whats causing to tomcat high CPU and memory
> usage.
> 
> 
> 
> Regards,
> 
> Sajid Hussain

the CPU usage is often high when the garbage collector can't free up sufficient 
memory.
The memory usage shows little spikes going up and down, like a little sawtooth 
in this case.
If this is the case, I would recommend creating a heap dump and analyze the 
dump, what is occupying the memory.
Eclipse MAT will assist you in analyzing the heap dump.

Greetings, Thomas


Re: Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-08 Thread Mark Thomas

On 08/10/2024 05:21, Sajid Hussain wrote:

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application was 
using 2.7.18. Now I'm migrating my application spring version to 3.3.4 
with Tomcat 10.1.30 and JDK 21. I have upgraded the version in my java 
project and fix the hibernate error migrating from 5 to 6. Now my 
application start on tomcat 10. But after few request JVM consume the 
maximum memory (I set it 3GB max) and cup usage to 90-98%. I set windows 
service priority to low and it take 80-90% hence my application stop 
responding. Here is the thread dum for the tomcat.Not getting any clue 
whats causing to tomcat high CPU and memory usage.


A profiler (I use YourKit because they give free licenses to OSS 
develoeprs but other profilers are avialable) will tell you more about 
what is going on than a single stack trace.


Is this a Spring Boot app? Is it packaged as a JAR or a WAR?

How are you running this as a Windows service? If you are using Apache 
Commons Daemon (the default way to run Tomcat as a Windows service) then 
this might be useful:

https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-460

Mark

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



Migrating from Tomcat 9.0.88 to Tomcat 10.1.30 on windows machine with JDK 21 LTS

2024-10-08 Thread Sajid Hussain

Hi,

I was using tomcat 9 with JDK 17 on windows. My java application was 
using 2.7.18. Now I'm migrating my application spring version to 3.3.4 
with Tomcat 10.1.30 and JDK 21. I have upgraded the version in my java 
project and fix the hibernate error migrating from 5 to 6. Now my 
application start on tomcat 10. But after few request JVM consume the 
maximum memory (I set it 3GB max) and cup usage to 90-98%. I set windows 
service priority to low and it take 80-90% hence my application stop 
responding. Here is the thread dum for the tomcat.Not getting any clue 
whats causing to tomcat high CPU and memory usage.




Regards,

Sajid Hussain

2024-10-08 16:18:31
Full thread dump OpenJDK 64-Bit Server VM (21.0.4+7-LTS mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x025908ea4a80, length=68, elements={
0x025918027d60, 0x025936946b90, 0x025936947c60, 0x025936a76260,
0x025936a770d0, 0x025936a78b40, 0x025936a7a1c0, 0x025936a7e450,
0x025936a86f00, 0x025936bcb150, 0x025936bce3c0, 0x02597c0ee270,
0x02597c781a70, 0x02597cd9e890, 0x02597cd9ef00, 0x02597cac8810,
0x02597cac8e80, 0x02597cac94f0, 0x02597cdafa10, 0x02597d099e60,
0x02597d098ab0, 0x02597d099140, 0x02597d0969e0, 0x02597d0997d0,
0x02597d097070, 0x02597d097d90, 0x02597d098420, 0x02597ca01370,
0x02597ca04160, 0x02597ca01a00, 0x02597c9fffc0, 0x02597ca06230,
0x02597ca05510, 0x02597ca00650, 0x02597ca068c0, 0x02597ca02090,
0x02597ca06f50, 0x02597ca00ce0, 0x0259029f8170, 0x0259000a0550,
0x0259000a1900, 0x0259029faf60, 0x0259029fbc80, 0x025936c4c640,
0x02590009fec0, 0x02590009ca40, 0x025936c4eda0, 0x0259029f7450,
0x0259029fea70, 0x02597d98ee70, 0x025936c4bfb0, 0x025936c49ee0,
0x02597d059ff0, 0x025936c4e080, 0x025936c4b920, 0x025936c4a570,
0x025936c4e710, 0x02597d9915d0, 0x02597d995770, 0x02597d98f500,
0x02597d990220, 0x02597cab46b0, 0x02597cab25e0, 0x02597cab4020,
0x02597caaf7f0, 0x02597caafe80, 0x02597cab4d40, 0x02597cab2c70
}

"main" #1 [10716] prio=5 os_prio=0 cpu=186312.50ms elapsed=546.21s 
tid=0x025918027d60 nid=10716 runnable  [0x0088cbbfe000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.Net.accept(java.base@21.0.4/Native Method)
at 
sun.nio.ch.NioSocketImpl.accept(java.base@21.0.4/NioSocketImpl.java:748)
at 
java.net.ServerSocket.implAccept(java.base@21.0.4/ServerSocket.java:698)
at 
java.net.ServerSocket.platformImplAccept(java.base@21.0.4/ServerSocket.java:663)
at 
java.net.ServerSocket.implAccept(java.base@21.0.4/ServerSocket.java:639)
at 
java.net.ServerSocket.implAccept(java.base@21.0.4/ServerSocket.java:585)
at java.net.ServerSocket.accept(java.base@21.0.4/ServerSocket.java:543)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:557)
at org.apache.catalina.startup.Catalina.await(Catalina.java:847)
at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
at 
java.lang.invoke.LambdaForm$DMH/0x025938108c00.invokeVirtual(java.base@21.0.4/LambdaForm$DMH)
at 
java.lang.invoke.LambdaForm$MH/0x02593810ec00.invoke(java.base@21.0.4/LambdaForm$MH)
at 
java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@21.0.4/Invokers$Holder)
at 
jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@21.0.4/DirectMethodHandleAccessor.java:153)
at 
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@21.0.4/DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(java.base@21.0.4/Method.java:580)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)

   Locked ownable synchronizers:
- <0x0007867b7810> (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync)

"Reference Handler" #9 [12400] daemon prio=10 os_prio=2 cpu=15.62ms 
elapsed=546.13s tid=0x025936946b90 nid=12400 waiting on condition  
[0x0088cc3ff000]
   java.lang.Thread.State: RUNNABLE
at 
java.lang.ref.Reference.waitForReferencePendingList(java.base@21.0.4/Native 
Method)
at 
java.lang.ref.Reference.processPendingReferences(java.base@21.0.4/Reference.java:246)
at 
java.lang.ref.Reference$ReferenceHandler.run(java.base@21.0.4/Reference.java:208)

   Locked ownable synchronizers:
- None

"Finalizer" #10 [15236] daemon prio=8 os_prio=1 cpu=0.00ms elapsed=546.13s 
tid=0x025936947c60 nid=15236 in Object.wait()  [0x0088cc4ff000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait0(java.base@21.0.4/Native Method)
- waiting on <0x000740800888> (a 
java

RE: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread John Williams
Chris,

maxThreads has been set after reviewing the workload. We used a multiple of 64.

The connections are from bots and are unlikely to be pipelined. Connections can 
be bursty - hence, a bigger acceptCount.

Will revert to 10.0 and see. 

Regards,

John

-Original Message-
From: Christopher Schultz  
Sent: Monday, September 30, 2024 5:39 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


John,

On 9/30/24 13:34, John Williams wrote:
> No - I cannot see any other thread stuck on DB/external resources. The 
> application functions as expected, just that I see these threads increasing 
> over time.
> The problem was 1st noticed in Tomcat 10.1.26/OpenJRE 17.0.5 and I've tried 
> moving to Tomcat 10.1.30/OpenJRE 17.0.12 with no change.

If you go back to 10.0 does it still behave as expected?

You have a bit of a weird setup IMHO.

>  maxThreads="1536"

This is a very strange number. Why not 1537?

 >   minSpareThreads="64"

This seems reasonable, but also kind of low given:

>   acceptCount="12000"

So you are willing to accept HUGE numbers of connections and then let them sit 
in the TCP/IP stack's accept queue waiting for a processing thread. Why?

>   connectionTimeout="6"

Ouch. So you will accept huge numbers of connections and then allow them to sit 
there not making any request? This seems like a recipe for disaster.

>   socket.rxBufSize="131072"
 >   socket.txBufSize="131072"

Tweaking the socket buffer sizes is either an indication of an insanely 
well-tuned performance setup or that you don't know what you are doing.
Given the other settings, I'm inclined toward the latter.

 >   maxKeepAliveRequests="1"

Disabling pipelining? Definitely not expecting a high performance service, or 
you are very sure that no client will ever make more than one request.

 >  maxConnections="1536"

You don't want this, especially for NIO. There is no reason to reduce this from 
the default, although your other settings make the non-blocking nature of the 
NIO connector moot (e.g. pipelining is disabled).

Why do you have this collection of odd settings?

-chris

> -Original Message-
> From: Chuck Caldarale 
> Sent: Monday, September 30, 2024 1:26 PM
> To: Tomcat Users List 
> Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads
>
> [You don't often get email from n82...@gmail.com. Learn why this is 
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe.
>
>
>> On Sep 30, 2024, at 12:15, John Williams 
>>  wrote:
>>
>> I had an executor defined before and it had the exact same behavior/problem. 
>> Moved to the below model for the connector only after that.
>
>
> The OP didn't mention the real problem in his original message; it only 
> showed up as almost an afterthought in the second posting with the unusable 
> attachments:
>
> "Once it reaches close to the maxThreads setting we see connection drops."
>
> I wonder if there's something else blocking the application, such as stuck DB 
> operations or other delayed access to an external resource.
>
>- Chuck
>
>
> -
> 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: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread Christopher Schultz

John,

On 9/30/24 13:34, John Williams wrote:

No - I cannot see any other thread stuck on DB/external resources. The 
application functions as expected, just that I see these threads increasing 
over time.
The problem was 1st noticed in Tomcat 10.1.26/OpenJRE 17.0.5 and I've tried 
moving to Tomcat 10.1.30/OpenJRE 17.0.12 with no change.


If you go back to 10.0 does it still behave as expected?

You have a bit of a weird setup IMHO.



>   maxThreads="1536"

This is a very strange number. Why not 1537?

>   minSpareThreads="64"

This seems reasonable, but also kind of low given:


  acceptCount="12000"


So you are willing to accept HUGE numbers of connections and then let 
them sit in the TCP/IP stack's accept queue waiting for a processing 
thread. Why?



  connectionTimeout="6"


Ouch. So you will accept huge numbers of connections and then allow them 
to sit there not making any request? This seems like a recipe for disaster.



  socket.rxBufSize="131072"

>   socket.txBufSize="131072"

Tweaking the socket buffer sizes is either an indication of an insanely 
well-tuned performance setup or that you don't know what you are doing. 
Given the other settings, I'm inclined toward the latter.


>   maxKeepAliveRequests="1"

Disabling pipelining? Definitely not expecting a high performance 
service, or you are very sure that no client will ever make more than 
one request.


>  maxConnections="1536"

You don't want this, especially for NIO. There is no reason to reduce 
this from the default, although your other settings make the 
non-blocking nature of the NIO connector moot (e.g. pipelining is disabled).


Why do you have this collection of odd settings?

-chris


-Original Message-
From: Chuck Caldarale 
Sent: Monday, September 30, 2024 1:26 PM
To: Tomcat Users List 
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.



On Sep 30, 2024, at 12:15, John Williams 
 wrote:

I had an executor defined before and it had the exact same behavior/problem. 
Moved to the below model for the connector only after that.



The OP didn't mention the real problem in his original message; it only showed 
up as almost an afterthought in the second posting with the unusable 
attachments:

"Once it reaches close to the maxThreads setting we see connection drops."

I wonder if there's something else blocking the application, such as stuck DB 
operations or other delayed access to an external resource.

   - Chuck


-
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: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread John Williams
Hi Chuck,

No - I cannot see any other thread stuck on DB/external resources. The 
application functions as expected, just that I see these threads increasing 
over time. 
The problem was 1st noticed in Tomcat 10.1.26/OpenJRE 17.0.5 and I've tried 
moving to Tomcat 10.1.30/OpenJRE 17.0.12 with no change.

Regards,

-Original Message-
From: Chuck Caldarale  
Sent: Monday, September 30, 2024 1:26 PM
To: Tomcat Users List 
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from n82...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


> On Sep 30, 2024, at 12:15, John Williams 
>  wrote:
>
> I had an executor defined before and it had the exact same behavior/problem. 
> Moved to the below model for the connector only after that.


The OP didn't mention the real problem in his original message; it only showed 
up as almost an afterthought in the second posting with the unusable 
attachments:

"Once it reaches close to the maxThreads setting we see connection drops."

I wonder if there's something else blocking the application, such as stuck DB 
operations or other delayed access to an external resource.

  - Chuck


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



Re: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread Chuck Caldarale

> On Sep 30, 2024, at 12:15, John Williams 
>  wrote:
> 
> I had an executor defined before and it had the exact same behavior/problem. 
> Moved to the below model for the connector only after that. 


The OP didn’t mention the real problem in his original message; it only showed 
up as almost an afterthought in the second posting with the unusable 
attachments:

"Once it reaches close to the maxThreads setting we see connection drops."

I wonder if there’s something else blocking the application, such as stuck DB 
operations or other delayed access to an external resource.

  - Chuck



RE: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread John Williams
Hi Chris,

I had an executor defined before and it had the exact same behavior/problem. 
Moved to the below model for the connector only after that. 

Regards,

John

-Original Message-
From: Christopher Schultz  
Sent: Monday, September 30, 2024 1:11 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


John,

On 9/30/24 10:53, John Williams wrote:
> Sorry - didn't realize that images would be stripped off.
>
> The number of TIMED_WAITING threads starts at 150 or so and every hour 
> increases by 10.
>
> Below is an example of where the threads are stuck (by looking at the JVM 
> stack):
>
> https-jsse-nio2-443-exec-90
> TIMED_WAITING on 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@
> 48986fd7 jdk.internal.misc.Unsafe.park(Native Method); 
> java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
> ; 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.
> awaitNanos(AbstractQueuedSynchronizer.java:1674);
> java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java
> :460); 
> app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);
> app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);
> app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadP
> oolExecutor.java:1113); 
> app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Threa
> dPoolExecutor.java:1175); 
> app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(Thre
> adPoolExecutor.java:659); 
> app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(Ta
> skThread.java:63); 
> java.base@17.0.12/java.lang.Thread.run(Thread.java:840);
>
> The connector configuration is:
>
> port="443" maxThreads="1536" minSpareThreads="64"
>   
> sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation" 
> scheme="https" secure="true" SSLEnabled="true"
>   enableLookups="false" acceptCount="12000" 
> connectionTimeout="6" socket.rxBufSize="131072" socket.txBufSize="131072" 
> maxHttpHeaderSize="131072" maxPostSize="-1"  maxKeepAliveRequests="1"  
> maxConnections="1536"  URIEncoding="UTF-8" useSendfile="false" 
> tcpNoDelay="true" compression="force" 
> compressibleMimeType="font/woff,font/woff2,text/html,text/xml,text/plain,application/x-java-applet,application/octet-stream,application/xml,text/javascript,text/css,image/png,image/bmp,image/jpeg,image/gif,application/pdf,application/x-javascript,application/javascript,application/json,application/x-shockwave-flash,application/xhtml+xml,application/xml+xhtml"
>  noCompressionUserAgents="gozilla, traviata">
>ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
>  certificateVerification="none" protocols="TLSv1.2" 
> sslProtocol="TLS"> certificateKeyAlias="..." certificateKeystorePassword="..." />
>   

You are not explicitly using an . When you configure using 
 only, Tomcat will never retire the threads from the thread-pool. 
This is mostly historic and while it could be improved, it is better to switch 
to a mode modern configuration.

If you use  and:



Then you should see the number of threads fluxuate based upon the request 
volume.

I'm not sure why you were seeing different behavior with Tomcat 10.0.
IIRC this behavior has been consistent as long as  and  
have been separate configuration elements.

-chris

> -Original Message-
> From: Christopher Schultz 
> Sent: Monday, September 30, 2024 10:38 AM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads
>
> [You don't often get email from ch...@christopherschultz.net. Learn 
> why this is important at https://aka.ms/LearnAboutSenderIdentification 
> ]
>
> CAUTION: This email originated from outside of the organization. Do 

Re: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread Christopher Schultz

John,

On 9/30/24 10:53, John Williams wrote:

Sorry - didn't realize that images would be stripped off.

The number of TIMED_WAITING threads starts at 150 or so and every hour 
increases by 10.

Below is an example of where the threads are stuck (by looking at the JVM 
stack):

https-jsse-nio2-443-exec-90
TIMED_WAITING on 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@48986fd7
jdk.internal.misc.Unsafe.park(Native Method);
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252);
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674);
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460);
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1113);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1175);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659);
app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63);
java.base@17.0.12/java.lang.Thread.run(Thread.java:840);

The connector configuration is:






You are not explicitly using an . When you configure using 
 only, Tomcat will never retire the threads from the 
thread-pool. This is mostly historic and while it could be improved, it 
is better to switch to a mode modern configuration.


If you use  and:



Then you should see the number of threads fluxuate based upon the 
request volume.


I'm not sure why you were seeing different behavior with Tomcat 10.0. 
IIRC this behavior has been consistent as long as  and 
 have been separate configuration elements.


-chris


-Original Message-
From: Christopher Schultz 
Sent: Monday, September 30, 2024 10:38 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


John,

On 9/30/24 10:30, John Williams wrote:

The issue is that the number of threads in the TIMED_WAIT state keeps
increasing over time. Starts at 150 and keeps growing by 10 every hour.
Once it reaches close to the maxThreads setting we see connection drops.

This application was working fine with Tomcat 10.0 and JDK 12. Unless
the application was seeing load, threads would not be created in
Tomcat's JVM.

You can also see the thread stacks in this image.


This list strips out image. Can you post text?

Please post your  configuration taking care to remove any secrets.

Thanks,
-chris


-Original Message-
From: Christopher Schultz 
Sent: Monday, September 30, 2024 10:20 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net
<mailto:ch...@christopherschultz.net>. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification
<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka
.ms%2F&data=05%7C02%7Csrinivas%40eginnovations.com%7C5c93ec3de0884e786
7d708dce15d7e73%7C62c210cb17214d259b6b0c95ceb472ce%7C0%7C0%7C638633038
912339442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=6q8HQHLjceSHYLqEnLN9
ue%2Fpa3zz5cougsajpZIsjDw%3D&reserved=0
LearnAboutSenderIdentification> ]

CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.

John,

On 9/28/24 05:38, John Williams wrote:

  >

  > Hi Everyone,

  >

  > I am running Apache Tomcat 10.1.30 for a web application and notice
~950 timed_waiting threads.

  >

  > The stack trace for these threads is below:

  >

  > java.base@17.0.12/
jdk.internal.misc.Unsafe.park(Native<mailto:java.bas
<mailto:java.base@17.0.12/
jdk.internal.misc.Unsafe.park(Native%3cmailto:java.bas>

  > e@17.0.12/jdk.internal.misc.Unsafe.park(Native <mailto:e@17.0.12/
jdk.internal.misc.Unsafe.park(Native>> Method);

  > java.base@17.0.12/
java.util.concurrent.locks.LockSupport.parkNanos(Loc
<mailto:java.base@17.0.12/
java.util.concurrent.locks.LockSupport.parkNanos(Loc>

  >
kSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks

  > .LockSupport.parkNanos(LockSupport.java:252)>;

  > java.base@17.0.12/
java.util.concurrent.locks.AbstractQueuedSynchronize
<mailto:java.base@17.0.12/
java.util.concurrent.locks

RE: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread John Williams
Chris,

Sorry - didn't realize that images would be stripped off. 

The number of TIMED_WAITING threads starts at 150 or so and every hour 
increases by 10.

Below is an example of where the threads are stuck (by looking at the JVM 
stack):

https-jsse-nio2-443-exec-90
TIMED_WAITING on 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@48986fd7
jdk.internal.misc.Unsafe.park(Native Method);
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252);   
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674);
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460);
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99); 
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33); 
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1113);
 
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1175);
 
app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659);
 
app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63);
 
java.base@17.0.12/java.lang.Thread.run(Thread.java:840);

The connector configuration is:





Regards,


-Original Message-
From: Christopher Schultz  
Sent: Monday, September 30, 2024 10:38 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


John,

On 9/30/24 10:30, John Williams wrote:
> The issue is that the number of threads in the TIMED_WAIT state keeps 
> increasing over time. Starts at 150 and keeps growing by 10 every hour.
> Once it reaches close to the maxThreads setting we see connection drops.
>
> This application was working fine with Tomcat 10.0 and JDK 12. Unless 
> the application was seeing load, threads would not be created in 
> Tomcat's JVM.
>
> You can also see the thread stacks in this image.

This list strips out image. Can you post text?

Please post your  configuration taking care to remove any secrets.

Thanks,
-chris

> -Original Message-
> From: Christopher Schultz 
> Sent: Monday, September 30, 2024 10:20 AM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads
>
> [You don't often get email from ch...@christopherschultz.net 
> <mailto:ch...@christopherschultz.net>. Learn why this is important at 
> https://aka.ms/LearnAboutSenderIdentification 
> <https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka
> .ms%2F&data=05%7C02%7Csrinivas%40eginnovations.com%7C5c93ec3de0884e786
> 7d708dce15d7e73%7C62c210cb17214d259b6b0c95ceb472ce%7C0%7C0%7C638633038
> 912339442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
> LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=6q8HQHLjceSHYLqEnLN9
> ue%2Fpa3zz5cougsajpZIsjDw%3D&reserved=0
> LearnAboutSenderIdentification> ]
>
> CAUTION: This email originated from outside of the organization. Do 
> not click links or open attachments unless you recognize the sender 
> and know the content is safe.
>
> John,
>
> On 9/28/24 05:38, John Williams wrote:
>
>  >
>
>  > Hi Everyone,
>
>  >
>
>  > I am running Apache Tomcat 10.1.30 for a web application and notice
> ~950 timed_waiting threads.
>
>  >
>
>  > The stack trace for these threads is below:
>
>  >
>
>  > java.base@17.0.12/
> jdk.internal.misc.Unsafe.park(Native<mailto:java.bas
> <mailto:java.base@17.0.12/
> jdk.internal.misc.Unsafe.park(Native%3cmailto:java.bas>
>
>  > e@17.0.12/jdk.internal.misc.Unsafe.park(Native <mailto:e@17.0.12/ 
> jdk.internal.misc.Unsafe.park(Native>> Method);
>
>  > java.base@17.0.12/
> java.util.concurrent.locks.LockSupport.parkNanos(Loc
> <mailto:java.base@17.0.12/
> java.util.concurrent.locks.LockSupport.parkNanos(Loc>
>
>  > 
> kSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks
>
>  > .LockSupport.parkNanos(LockSupport.java:252)>;
>
>  > java.base@17.0.12/
> java.util.concurrent.locks.AbstractQueuedSynchronize
> <mailto:java.base@17.0.12/
> java.util.concurrent.locks.AbstractQueuedSynchronize>
>
>  > 
> r$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)
>  > 
> lto:java.base@17.0.12/java.util.concurrent.locks.Ab

Re: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread Christopher Schultz

John,

On 9/30/24 10:30, John Williams wrote:
The issue is that the number of threads in the TIMED_WAIT state keeps 
increasing over time. Starts at 150 and keeps growing by 10 every hour. 
Once it reaches close to the maxThreads setting we see connection drops.


This application was working fine with Tomcat 10.0 and JDK 12. Unless 
the application was seeing load, threads would not be created in 
Tomcat’s JVM.


You can also see the thread stacks in this image.


This list strips out image. Can you post text?

Please post your  configuration taking care to remove any 
secrets.


Thanks,
-chris


-Original Message-
From: Christopher Schultz 
Sent: Monday, September 30, 2024 10:20 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads

[You don't often get email from ch...@christopherschultz.net 
<mailto:ch...@christopherschultz.net>. Learn why this is important at 
https://aka.ms/LearnAboutSenderIdentification <https://aka.ms/ 
LearnAboutSenderIdentification> ]


CAUTION: This email originated from outside of the organization. Do not 
click links or open attachments unless you recognize the sender and know 
the content is safe.


John,

On 9/28/24 05:38, John Williams wrote:

 >

 > Hi Everyone,

 >

 > I am running Apache Tomcat 10.1.30 for a web application and notice 
~950 timed_waiting threads.


 >

 > The stack trace for these threads is below:

 >

 > java.base@17.0.12/ 
jdk.internal.misc.Unsafe.park(Native<mailto:java.bas 
<mailto:java.base@17.0.12/ 
jdk.internal.misc.Unsafe.park(Native%3cmailto:java.bas>


 > e@17.0.12/jdk.internal.misc.Unsafe.park(Native <mailto:e@17.0.12/ 
jdk.internal.misc.Unsafe.park(Native>> Method);


 > java.base@17.0.12/ 
java.util.concurrent.locks.LockSupport.parkNanos(Loc 
<mailto:java.base@17.0.12/ 
java.util.concurrent.locks.LockSupport.parkNanos(Loc>


 > kSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks

 > .LockSupport.parkNanos(LockSupport.java:252)>;

 > java.base@17.0.12/ 
java.util.concurrent.locks.AbstractQueuedSynchronize 
<mailto:java.base@17.0.12/ 
java.util.concurrent.locks.AbstractQueuedSynchronize>


 > r$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674) lto:java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchro

 > nizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)

 > >;

 > java.base@17.0.12/ 
java.util.concurrent.LinkedBlockingQueue.poll(Linked 
<mailto:java.base@17.0.12/ 
java.util.concurrent.LinkedBlockingQueue.poll(Linked>


 > BlockingQueue.java:460)<mailto:java.base@17.0.12/java.util.concurrent.

 > LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)>;

 > app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);

 > app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);

 > app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadP

 > oolExecutor.java:1113);

 > app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Threa

 > dPoolExecutor.java:1175);

 > app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(Thre

 > adPoolExecutor.java:659);

 > app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(Ta

 > skThread.java:63);

 > java.base@17.0.12/ 
java.lang.Thread.run(Thread.java:840)<mailto:java.ba 
<mailto:java.base@17.0.12/ 
java.lang.Thread.run(Thread.java:840)%3cmailto:java.ba>


 > se@17.0.12/java.lang.Thread.run(Thread.java:840) <mailto:se@17.0.12/ 
java.lang.Thread.run(Thread.java:840)>>;


 >

 > I am using an executor with maxThreads set to 1500 and 
minSpareThreads set to 64.


 >

 > I have not seen this issue with Tomcat 10.0.

 >

 > What could be the issue and how to resolve it? Any help is much 
appreciated.


This looks like you have a large number of threads waiting for work.

That seems normal to me if you have a max thread pool of 1500 threads.

What's the problem?

-chris

-

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


For additional commands, e-mail: users-h...@tomcat.apache.org 
<mailto: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: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread John Williams
Chris,



Thanks for your response.



The issue is that the number of threads in the TIMED_WAIT state keeps 
increasing over time. Starts at 150 and keeps growing by 10 every hour. Once it 
reaches close to the maxThreads setting we see connection drops.

This application was working fine with Tomcat 10.0 and JDK 12. Unless the 
application was seeing load, threads would not be created in Tomcat's JVM.



[cid:image003.jpg@01DB1323.CCF9FD00]





You can also see the thread stacks in this image.

[cid:image004.png@01DB1323.CCF9FD00]



Thanks,



-Original Message-
From: Christopher Schultz 
Sent: Monday, September 30, 2024 10:20 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.30 and Many Timed Waiting threads



[You don't often get email from 
ch...@christopherschultz.net<mailto:ch...@christopherschultz.net>. Learn why 
this is important at https://aka.ms/LearnAboutSenderIdentification ]



CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.





John,



On 9/28/24 05:38, John Williams wrote:

>

> Hi Everyone,

>

> I am running Apache Tomcat 10.1.30 for a web application and notice ~950 
> timed_waiting threads.

>

> The stack trace for these threads is below:

>

> java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native<mailto:java.bas<mailto:java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native%3cmailto:java.bas>

> e@17.0.12/jdk.internal.misc.Unsafe.park(Native<mailto:e@17.0.12/jdk.internal.misc.Unsafe.park(Native>>
>  Method);

> java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(Loc<mailto:java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(Loc>

> kSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks

> .LockSupport.parkNanos(LockSupport.java:252)>;

> java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronize<mailto:java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronize>

> r$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674) lto:java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchro

> nizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)

> >;

> java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(Linked<mailto:java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(Linked>

> BlockingQueue.java:460)<mailto:java.base@17.0.12/java.util.concurrent.

> LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)>;

> app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);

> app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);

> app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadP

> oolExecutor.java:1113);

> app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(Threa

> dPoolExecutor.java:1175);

> app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(Thre

> adPoolExecutor.java:659);

> app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(Ta

> skThread.java:63);

> java.base@17.0.12/java.lang.Thread.run(Thread.java:840)<mailto:java.ba<mailto:java.base@17.0.12/java.lang.Thread.run(Thread.java:840)%3cmailto:java.ba>

> se@17.0.12/java.lang.Thread.run(Thread.java:840)<mailto:se@17.0.12/java.lang.Thread.run(Thread.java:840)>>;

>

> I am using an executor with maxThreads set to 1500 and minSpareThreads set to 
> 64.

>

> I have not seen this issue with Tomcat 10.0.

>

> What could be the issue and how to resolve it? Any help is much appreciated.



This looks like you have a large number of threads waiting for work.

That seems normal to me if you have a max thread pool of 1500 threads.



What's the problem?



-chris





-

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

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




Re: Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-30 Thread Christopher Schultz

John,

On 9/28/24 05:38, John Williams wrote:


Hi Everyone,

I am running Apache Tomcat 10.1.30 for a web application and notice ~950 
timed_waiting threads.

The stack trace for these threads is below:

java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native<mailto:java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native>
 Method);
java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)>;
java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)<mailto:java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)>;
java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)<mailto:java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)>;
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1113);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1175);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659);
app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63);
java.base@17.0.12/java.lang.Thread.run(Thread.java:840)<mailto:java.base@17.0.12/java.lang.Thread.run(Thread.java:840)>;

I am using an executor with maxThreads set to 1500 and minSpareThreads set to 
64.

I have not seen this issue with Tomcat 10.0.

What could be the issue and how to resolve it? Any help is much appreciated.


This looks like you have a large number of threads waiting for work. 
That seems normal to me if you have a max thread pool of 1500 threads.


What's the problem?

-chris


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



Tomcat 10.1.30 and Many Timed Waiting threads

2024-09-28 Thread John Williams

Hi Everyone,

I am running Apache Tomcat 10.1.30 for a web application and notice ~950 
timed_waiting threads.

The stack trace for these threads is below:

java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native<mailto:java.base@17.0.12/jdk.internal.misc.Unsafe.park(Native>
 Method);
java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)<mailto:java.base@17.0.12/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)>;
java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)<mailto:java.base@17.0.12/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1674)>;
java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)<mailto:java.base@17.0.12/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:460)>;
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99);
app//org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1113);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1175);
app//org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659);
app//org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63);
java.base@17.0.12/java.lang.Thread.run(Thread.java:840)<mailto:java.base@17.0.12/java.lang.Thread.run(Thread.java:840)>;

I am using an executor with maxThreads set to 1500 and minSpareThreads set to 
64.

I have not seen this issue with Tomcat 10.0.

What could be the issue and how to resolve it? Any help is much appreciated.

Regards,

John





  1   2   3   4   5   6   7   8   9   10   >