RE: Tomcat Server Using 100% CPU

2019-08-08 Thread Eric Robinson
André, Paul, and Coty, you've all provided some great next steps. I'll 
investigate further and be back in touch!

--Eric

-Original Message-
From: André Warnier (tomcat) 
Sent: Thursday, August 8, 2019 3:53 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat Server Using 100% CPU

On 08.08.2019 20:08, Eric Robinson wrote:
> Utkarsh and John, thank you for your feedback.
>
> Since everything was originally on Windows, and we built a new Linux server 
> with fresh tomcat installs, and the only thing we moved over from the old 
> Windows servers was the tomcat application folder itself, and the 100% CPU 
> problem persisted, I can't imagine what else could be causing it except the 
> tomcats, but I'm open to ideas.
>
> When it happens, all the tomcats start using high CPU at the same time. See 
> the following top output.
>
> top - 11:06:44 up 1 day,  6:59,  7 users,  load average: 36.85, 32.67, 34.89
> Tasks: 245 total,   4 running, 241 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 80.7 us, 13.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  5.7
> si,  0.0 st KiB Mem : 48132572 total, 11677420 free,  5572688 used, 30882464 
> buff/cache
> KiB Swap: 15626236 total, 15584324 free,41912 used. 41859232 avail Mem
>
>PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
> 19379 site211   20   0 3529072 447444  24632 S 120.4  0.9   3:37.19 java
> 20092 site555   20   0 2530376 375500  24496 S  72.4  0.8   2:01.44 java
> 21077 site450   20   0 2530292 298260  24292 S  69.6  0.6   1:10.92 java
> 20378 site436   20   0 3262200 347160  24096 S  68.3  0.7   2:47.26 java
> 19957 site522   20   0 2596856 373532  24364 S  52.0  0.8   2:37.13 java
> 19537 site396   20   0 2862724 386860  23820 S  51.1  0.8   2:34.25 java
> 19228 site116   20   0 3595652 490032  24640 S  50.5  1.0   5:03.28 java
> 20941 site456   20   0 2596996 338740  24488 S  49.2  0.7   1:32.89 java
> 20789 site354   20   0 2596920 327612  24480 S  42.9  0.7   1:30.47 java
> 20657 site327   20   0 3123004 346308  24540 S  41.4  0.7   1:50.97 java
> 20524 site203   20   0 2458376 340400  25416 S  39.8  0.7   1:48.01 java
> 19675 site487   20   0 2530296 390948  24408 S  35.7  0.8   2:37.95 java
> 20233 site535   20   0 2530292 324112  24360 S  32.9  0.7   1:54.31 java
> 19809 site514   20   0 2530216 400308  24340 S  25.7  0.8   2:35.97 java
> 44 root  20   0   0  0  0 R  19.1  0.0 159:46.15 
> ksoftirqd/7
>   3926 root  20   0  208512  22668   4128 S  16.9  0.0 242:45.07 iotop
>   2036 root  20   0   0  0  0 R  13.2  0.0   1:38.31 
> kworker/7:0
>
> I'll check the localhost_access logs and see if something suspicious stands 
> out.
>

Access logs is the first thing to look at of course (just in case you are 
subject to some DoS attack), but other things of interest :
1) what is "the webapp" in question ? Any reason to suspect it may have been 
been hijacked, to do something it is not supposed to do ? does the webapp allow 
for clients to upload "things" to the server (files, documents, images,..) ?
2) if you look at the tomcat logs, do you recognise all the webapps which get 
deployed when tomcat starts ? Or is there an alien there ?
3) if you run "top" again, then enter a "c" in the console, it will show more 
details about the "java" command it is running.
Similarly, doing a "ps -ef" command and comparing the result (by PID) with the 
top output, may give more details.
That would show (us) at least the startup parameters of your tomcat(s).
4) speaking as a faithful Tomcat Committer, we always like to repeat that in 
99% of the cases it turns out that the problem is with the webapp, not with 
Tomcat. The fact that in your case, you have changed about everything except 
the webapp, and the problem persists, would only tend to increase that 
suspicion..
So, can the webapp do any logging that would show what it's doing, while it is 
happily slurping all your CPU time ?
6) does the tomcat error log show anything of interest ?
7) under Linux as root, enter : netstat --tcp -pan | grep LISTEN (Shows all TCP 
ports your server is listening to, and which PID/processes control these ports).
Anything unexpected there ? worse : anything unexpected which would match the 
PID of one of your tomcats ?

André


> --Eric
>
>
> -Original Message-
> From: Utkarsh Dave 
> Sent: Thursday, August 8, 2019 12:33 PM
> To: Tomcat Users List 
> Subject: Re: Tomcat Server Using 100% CPU
>
> Did you reviewed the localhost_access log file. Which web-application is 
> using tomcat the most ?
>
> On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
> wrote:
>
>> We have a farm of VMs, each running multiple instances of tomcat (up
>> to 80 instances per server). Everything has been running fine for
>> years, but recently one server has started nailing the CPU to 100% 
>> utilization.
>>
>> We have tried:
>>
>>
>>*   Different versions of tomcat and JDK
>>*   Doubling the resources to 16 cores and 56 GB RAM
>> 

Re: Tomcat Server Using 100% CPU

2019-08-08 Thread tomcat

On 08.08.2019 20:08, Eric Robinson wrote:

Utkarsh and John, thank you for your feedback.

Since everything was originally on Windows, and we built a new Linux server 
with fresh tomcat installs, and the only thing we moved over from the old 
Windows servers was the tomcat application folder itself, and the 100% CPU 
problem persisted, I can't imagine what else could be causing it except the 
tomcats, but I'm open to ideas.

When it happens, all the tomcats start using high CPU at the same time. See the 
following top output.

top - 11:06:44 up 1 day,  6:59,  7 users,  load average: 36.85, 32.67, 34.89
Tasks: 245 total,   4 running, 241 sleeping,   0 stopped,   0 zombie
%Cpu(s): 80.7 us, 13.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  5.7 si,  0.0 st
KiB Mem : 48132572 total, 11677420 free,  5572688 used, 30882464 buff/cache
KiB Swap: 15626236 total, 15584324 free,41912 used. 41859232 avail Mem

   PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
19379 site211   20   0 3529072 447444  24632 S 120.4  0.9   3:37.19 java
20092 site555   20   0 2530376 375500  24496 S  72.4  0.8   2:01.44 java
21077 site450   20   0 2530292 298260  24292 S  69.6  0.6   1:10.92 java
20378 site436   20   0 3262200 347160  24096 S  68.3  0.7   2:47.26 java
19957 site522   20   0 2596856 373532  24364 S  52.0  0.8   2:37.13 java
19537 site396   20   0 2862724 386860  23820 S  51.1  0.8   2:34.25 java
19228 site116   20   0 3595652 490032  24640 S  50.5  1.0   5:03.28 java
20941 site456   20   0 2596996 338740  24488 S  49.2  0.7   1:32.89 java
20789 site354   20   0 2596920 327612  24480 S  42.9  0.7   1:30.47 java
20657 site327   20   0 3123004 346308  24540 S  41.4  0.7   1:50.97 java
20524 site203   20   0 2458376 340400  25416 S  39.8  0.7   1:48.01 java
19675 site487   20   0 2530296 390948  24408 S  35.7  0.8   2:37.95 java
20233 site535   20   0 2530292 324112  24360 S  32.9  0.7   1:54.31 java
19809 site514   20   0 2530216 400308  24340 S  25.7  0.8   2:35.97 java
44 root  20   0   0  0  0 R  19.1  0.0 159:46.15 ksoftirqd/7
  3926 root  20   0  208512  22668   4128 S  16.9  0.0 242:45.07 iotop
  2036 root  20   0   0  0  0 R  13.2  0.0   1:38.31 kworker/7:0

I'll check the localhost_access logs and see if something suspicious stands out.



Access logs is the first thing to look at of course (just in case you are 
subject to some
DoS attack), but other things of interest :
1) what is "the webapp" in question ? Any reason to suspect it may have been been 
hijacked, to do something it is not supposed to do ? does the webapp allow for clients to 
upload "things" to the server (files, documents, images,..) ?
2) if you look at the tomcat logs, do you recognise all the webapps which get deployed 
when tomcat starts ? Or is there an alien there ?
3) if you run "top" again, then enter a "c" in the console, it will show more details 
about the "java" command it is running.
Similarly, doing a "ps -ef" command and comparing the result (by PID) with the top output, 
may give more details.

That would show (us) at least the startup parameters of your tomcat(s).
4) speaking as a faithful Tomcat Committer, we always like to repeat that in 99% of the 
cases it turns out that the problem is with the webapp, not with Tomcat. The fact that in 
your case, you have changed about everything except the webapp, and the problem persists, 
would only tend to increase that suspicion..
So, can the webapp do any logging that would show what it's doing, while it is happily 
slurping all your CPU time ?

6) does the tomcat error log show anything of interest ?
7) under Linux as root, enter : netstat --tcp -pan | grep LISTEN
(Shows all TCP ports your server is listening to, and which PID/processes control these 
ports).
Anything unexpected there ? worse : anything unexpected which would match the PID of one 
of your tomcats ?


André



--Eric


-Original Message-
From: Utkarsh Dave 
Sent: Thursday, August 8, 2019 12:33 PM
To: Tomcat Users List 
Subject: Re: Tomcat Server Using 100% CPU

Did you reviewed the localhost_access log file. Which web-application is using 
tomcat the most ?

On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
wrote:


We have a farm of VMs, each running multiple instances of tomcat (up
to 80 instances per server). Everything has been running fine for
years, but recently one server has started nailing the CPU to 100% utilization.

We have tried:


   *   Different versions of tomcat and JDK
   *   Doubling the resources to 16 cores and 56 GB RAM
   *   Moving the VM to different physical server
   *   Rebuilding the tomcat instances on a brand new VM using Windows
Server 2019
   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
Enterprise Linux 7.5

Nothing has worked. No matter where we run the tomcats, they drive CPU
up to 100%. Meanwhile the other six servers are still running fine.
They all run the same canned tomcat applications.

We 

Re: Tomcat Server Using 100% CPU

2019-08-08 Thread Paul Carter-Brown
Please post a jstack of the pid 10 seconds apart. That will reveal all.

On Thu, 08 Aug 2019, 20:22 Coty Sutherland,  wrote:

> I'd suggest writing a small script to loop about 10 times and capture top
> and thread dumps with jstack at the same time, then wait a few seconds then
> repeat. After that you can grab the pid/tid from the top output and compare
> that with your thread dump to see exactly what the thread is doing for the
> iteration/duration you specify.
>
> Other questions that I haven't seen asked, how long does the CPU usage
> persist? Is it only at startup or does it randomly start after some uptime?
> Have your webapps or dependencies changed around the time the issue
> started? Do the working and nonworking servers run the same webapps with
> the same workload?
>
> On Thu, Aug 8, 2019 at 2:09 PM Eric Robinson 
> wrote:
>
> > Utkarsh and John, thank you for your feedback.
> >
> > Since everything was originally on Windows, and we built a new Linux
> > server with fresh tomcat installs, and the only thing we moved over from
> > the old Windows servers was the tomcat application folder itself, and the
> > 100% CPU problem persisted, I can't imagine what else could be causing it
> > except the tomcats, but I'm open to ideas.
> >
> > When it happens, all the tomcats start using high CPU at the same time.
> > See the following top output.
> >
> > top - 11:06:44 up 1 day,  6:59,  7 users,  load average: 36.85, 32.67,
> > 34.89
> > Tasks: 245 total,   4 running, 241 sleeping,   0 stopped,   0 zombie
> > %Cpu(s): 80.7 us, 13.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  5.7 si,
> > 0.0 st
> > KiB Mem : 48132572 total, 11677420 free,  5572688 used, 30882464
> buff/cache
> > KiB Swap: 15626236 total, 15584324 free,41912 used. 41859232 avail
> Mem
> >
> >   PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+
> COMMAND
> > 19379 site211   20   0 3529072 447444  24632 S 120.4  0.9   3:37.19 java
> > 20092 site555   20   0 2530376 375500  24496 S  72.4  0.8   2:01.44 java
> > 21077 site450   20   0 2530292 298260  24292 S  69.6  0.6   1:10.92 java
> > 20378 site436   20   0 3262200 347160  24096 S  68.3  0.7   2:47.26 java
> > 19957 site522   20   0 2596856 373532  24364 S  52.0  0.8   2:37.13 java
> > 19537 site396   20   0 2862724 386860  23820 S  51.1  0.8   2:34.25 java
> > 19228 site116   20   0 3595652 490032  24640 S  50.5  1.0   5:03.28 java
> > 20941 site456   20   0 2596996 338740  24488 S  49.2  0.7   1:32.89 java
> > 20789 site354   20   0 2596920 327612  24480 S  42.9  0.7   1:30.47 java
> > 20657 site327   20   0 3123004 346308  24540 S  41.4  0.7   1:50.97 java
> > 20524 site203   20   0 2458376 340400  25416 S  39.8  0.7   1:48.01 java
> > 19675 site487   20   0 2530296 390948  24408 S  35.7  0.8   2:37.95 java
> > 20233 site535   20   0 2530292 324112  24360 S  32.9  0.7   1:54.31 java
> > 19809 site514   20   0 2530216 400308  24340 S  25.7  0.8   2:35.97 java
> >44 root  20   0   0  0  0 R  19.1  0.0 159:46.15
> > ksoftirqd/7
> >  3926 root  20   0  208512  22668   4128 S  16.9  0.0 242:45.07 iotop
> >  2036 root  20   0   0  0  0 R  13.2  0.0   1:38.31
> > kworker/7:0
> >
> > I'll check the localhost_access logs and see if something suspicious
> > stands out.
> >
> > --Eric
> >
> >
> > -Original Message-
> > From: Utkarsh Dave 
> > Sent: Thursday, August 8, 2019 12:33 PM
> > To: Tomcat Users List 
> > Subject: Re: Tomcat Server Using 100% CPU
> >
> > Did you reviewed the localhost_access log file. Which web-application is
> > using tomcat the most ?
> >
> > On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
> > wrote:
> >
> > > We have a farm of VMs, each running multiple instances of tomcat (up
> > > to 80 instances per server). Everything has been running fine for
> > > years, but recently one server has started nailing the CPU to 100%
> > utilization.
> > >
> > > We have tried:
> > >
> > >
> > >   *   Different versions of tomcat and JDK
> > >   *   Doubling the resources to 16 cores and 56 GB RAM
> > >   *   Moving the VM to different physical server
> > >   *   Rebuilding the tomcat instances on a brand new VM using Windows
> > > Server 2019
> > >   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
> > > Enterprise Linux 7.5
> > >
> > > Nothing has worked. No matter where we run the tomcats, they drive CPU
> > > up to 100%. Meanwhile the other six servers are still running fine.
> > > They all run the same canned tomcat applications.
> > >
> > > We would appreciate some guidance on getting to the bottom of this
> > problem.
> > >
> > > --Eric
> > >
> > >
> > > Disclaimer : This email and any files transmitted with it are
> > > confidential and intended solely for intended recipients. If you are
> > > not the named addressee you should not disseminate, distribute, copy or
> > alter this email.
> > > Any views or opinions presented in this email are solely those of the
> > > author and might not represent 

Re: Tomcat Server Using 100% CPU

2019-08-08 Thread Coty Sutherland
I'd suggest writing a small script to loop about 10 times and capture top
and thread dumps with jstack at the same time, then wait a few seconds then
repeat. After that you can grab the pid/tid from the top output and compare
that with your thread dump to see exactly what the thread is doing for the
iteration/duration you specify.

Other questions that I haven't seen asked, how long does the CPU usage
persist? Is it only at startup or does it randomly start after some uptime?
Have your webapps or dependencies changed around the time the issue
started? Do the working and nonworking servers run the same webapps with
the same workload?

On Thu, Aug 8, 2019 at 2:09 PM Eric Robinson 
wrote:

> Utkarsh and John, thank you for your feedback.
>
> Since everything was originally on Windows, and we built a new Linux
> server with fresh tomcat installs, and the only thing we moved over from
> the old Windows servers was the tomcat application folder itself, and the
> 100% CPU problem persisted, I can't imagine what else could be causing it
> except the tomcats, but I'm open to ideas.
>
> When it happens, all the tomcats start using high CPU at the same time.
> See the following top output.
>
> top - 11:06:44 up 1 day,  6:59,  7 users,  load average: 36.85, 32.67,
> 34.89
> Tasks: 245 total,   4 running, 241 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 80.7 us, 13.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  5.7 si,
> 0.0 st
> KiB Mem : 48132572 total, 11677420 free,  5572688 used, 30882464 buff/cache
> KiB Swap: 15626236 total, 15584324 free,41912 used. 41859232 avail Mem
>
>   PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
> 19379 site211   20   0 3529072 447444  24632 S 120.4  0.9   3:37.19 java
> 20092 site555   20   0 2530376 375500  24496 S  72.4  0.8   2:01.44 java
> 21077 site450   20   0 2530292 298260  24292 S  69.6  0.6   1:10.92 java
> 20378 site436   20   0 3262200 347160  24096 S  68.3  0.7   2:47.26 java
> 19957 site522   20   0 2596856 373532  24364 S  52.0  0.8   2:37.13 java
> 19537 site396   20   0 2862724 386860  23820 S  51.1  0.8   2:34.25 java
> 19228 site116   20   0 3595652 490032  24640 S  50.5  1.0   5:03.28 java
> 20941 site456   20   0 2596996 338740  24488 S  49.2  0.7   1:32.89 java
> 20789 site354   20   0 2596920 327612  24480 S  42.9  0.7   1:30.47 java
> 20657 site327   20   0 3123004 346308  24540 S  41.4  0.7   1:50.97 java
> 20524 site203   20   0 2458376 340400  25416 S  39.8  0.7   1:48.01 java
> 19675 site487   20   0 2530296 390948  24408 S  35.7  0.8   2:37.95 java
> 20233 site535   20   0 2530292 324112  24360 S  32.9  0.7   1:54.31 java
> 19809 site514   20   0 2530216 400308  24340 S  25.7  0.8   2:35.97 java
>44 root  20   0   0  0  0 R  19.1  0.0 159:46.15
> ksoftirqd/7
>  3926 root  20   0  208512  22668   4128 S  16.9  0.0 242:45.07 iotop
>  2036 root  20   0   0  0  0 R  13.2  0.0   1:38.31
> kworker/7:0
>
> I'll check the localhost_access logs and see if something suspicious
> stands out.
>
> --Eric
>
>
> -Original Message-
> From: Utkarsh Dave 
> Sent: Thursday, August 8, 2019 12:33 PM
> To: Tomcat Users List 
> Subject: Re: Tomcat Server Using 100% CPU
>
> Did you reviewed the localhost_access log file. Which web-application is
> using tomcat the most ?
>
> On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
> wrote:
>
> > We have a farm of VMs, each running multiple instances of tomcat (up
> > to 80 instances per server). Everything has been running fine for
> > years, but recently one server has started nailing the CPU to 100%
> utilization.
> >
> > We have tried:
> >
> >
> >   *   Different versions of tomcat and JDK
> >   *   Doubling the resources to 16 cores and 56 GB RAM
> >   *   Moving the VM to different physical server
> >   *   Rebuilding the tomcat instances on a brand new VM using Windows
> > Server 2019
> >   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
> > Enterprise Linux 7.5
> >
> > Nothing has worked. No matter where we run the tomcats, they drive CPU
> > up to 100%. Meanwhile the other six servers are still running fine.
> > They all run the same canned tomcat applications.
> >
> > We would appreciate some guidance on getting to the bottom of this
> problem.
> >
> > --Eric
> >
> >
> > Disclaimer : This email and any files transmitted with it are
> > confidential and intended solely for intended recipients. If you are
> > not the named addressee you should not disseminate, distribute, copy or
> alter this email.
> > Any views or opinions presented in this email are solely those of the
> > author and might not represent those of Physician Select Management.
> > Warning: Although Physician Select Management has taken reasonable
> > precautions to ensure no viruses are present in this email, the
> > company cannot accept responsibility for any loss or damage arising
> > from the use of this email or attachments.
> >
> Disclaimer : This email and any files 

RE: Tomcat Server Using 100% CPU

2019-08-08 Thread Eric Robinson
Utkarsh and John, thank you for your feedback.

Since everything was originally on Windows, and we built a new Linux server 
with fresh tomcat installs, and the only thing we moved over from the old 
Windows servers was the tomcat application folder itself, and the 100% CPU 
problem persisted, I can't imagine what else could be causing it except the 
tomcats, but I'm open to ideas.

When it happens, all the tomcats start using high CPU at the same time. See the 
following top output.

top - 11:06:44 up 1 day,  6:59,  7 users,  load average: 36.85, 32.67, 34.89
Tasks: 245 total,   4 running, 241 sleeping,   0 stopped,   0 zombie
%Cpu(s): 80.7 us, 13.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  5.7 si,  0.0 st
KiB Mem : 48132572 total, 11677420 free,  5572688 used, 30882464 buff/cache
KiB Swap: 15626236 total, 15584324 free,41912 used. 41859232 avail Mem

  PID USER  PR  NIVIRTRESSHR S  %CPU %MEM TIME+ COMMAND
19379 site211   20   0 3529072 447444  24632 S 120.4  0.9   3:37.19 java
20092 site555   20   0 2530376 375500  24496 S  72.4  0.8   2:01.44 java
21077 site450   20   0 2530292 298260  24292 S  69.6  0.6   1:10.92 java
20378 site436   20   0 3262200 347160  24096 S  68.3  0.7   2:47.26 java
19957 site522   20   0 2596856 373532  24364 S  52.0  0.8   2:37.13 java
19537 site396   20   0 2862724 386860  23820 S  51.1  0.8   2:34.25 java
19228 site116   20   0 3595652 490032  24640 S  50.5  1.0   5:03.28 java
20941 site456   20   0 2596996 338740  24488 S  49.2  0.7   1:32.89 java
20789 site354   20   0 2596920 327612  24480 S  42.9  0.7   1:30.47 java
20657 site327   20   0 3123004 346308  24540 S  41.4  0.7   1:50.97 java
20524 site203   20   0 2458376 340400  25416 S  39.8  0.7   1:48.01 java
19675 site487   20   0 2530296 390948  24408 S  35.7  0.8   2:37.95 java
20233 site535   20   0 2530292 324112  24360 S  32.9  0.7   1:54.31 java
19809 site514   20   0 2530216 400308  24340 S  25.7  0.8   2:35.97 java
   44 root  20   0   0  0  0 R  19.1  0.0 159:46.15 ksoftirqd/7
 3926 root  20   0  208512  22668   4128 S  16.9  0.0 242:45.07 iotop
 2036 root  20   0   0  0  0 R  13.2  0.0   1:38.31 kworker/7:0

I'll check the localhost_access logs and see if something suspicious stands out.

--Eric


-Original Message-
From: Utkarsh Dave 
Sent: Thursday, August 8, 2019 12:33 PM
To: Tomcat Users List 
Subject: Re: Tomcat Server Using 100% CPU

Did you reviewed the localhost_access log file. Which web-application is using 
tomcat the most ?

On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
wrote:

> We have a farm of VMs, each running multiple instances of tomcat (up
> to 80 instances per server). Everything has been running fine for
> years, but recently one server has started nailing the CPU to 100% 
> utilization.
>
> We have tried:
>
>
>   *   Different versions of tomcat and JDK
>   *   Doubling the resources to 16 cores and 56 GB RAM
>   *   Moving the VM to different physical server
>   *   Rebuilding the tomcat instances on a brand new VM using Windows
> Server 2019
>   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
> Enterprise Linux 7.5
>
> Nothing has worked. No matter where we run the tomcats, they drive CPU
> up to 100%. Meanwhile the other six servers are still running fine.
> They all run the same canned tomcat applications.
>
> We would appreciate some guidance on getting to the bottom of this problem.
>
> --Eric
>
>
> Disclaimer : This email and any files transmitted with it are
> confidential and intended solely for intended recipients. If you are
> not the named addressee you should not disseminate, distribute, copy or alter 
> this email.
> Any views or opinions presented in this email are solely those of the
> author and might not represent those of Physician Select Management.
> Warning: Although Physician Select Management has taken reasonable
> precautions to ensure no viruses are present in this email, the
> company cannot accept responsibility for any loss or damage arising
> from the use of this email or attachments.
>
Disclaimer : This email and any files transmitted with it are confidential and 
intended solely for intended recipients. If you are not the named addressee you 
should not disseminate, distribute, copy or alter this email. Any views or 
opinions presented in this email are solely those of the author and might not 
represent those of Physician Select Management. Warning: Although Physician 
Select Management has taken reasonable precautions to ensure no viruses are 
present in this email, the company cannot accept responsibility for any loss or 
damage arising from the use of this email or attachments.

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



Re: Tomcat Server Using 100% CPU

2019-08-08 Thread Utkarsh Dave
Did you reviewed the localhost_access log file. Which web-application is
using tomcat the most ?

On Thu, Aug 8, 2019 at 9:53 AM Eric Robinson 
wrote:

> We have a farm of VMs, each running multiple instances of tomcat (up to 80
> instances per server). Everything has been running fine for years, but
> recently one server has started nailing the CPU to 100% utilization.
>
> We have tried:
>
>
>   *   Different versions of tomcat and JDK
>   *   Doubling the resources to 16 cores and 56 GB RAM
>   *   Moving the VM to different physical server
>   *   Rebuilding the tomcat instances on a brand new VM using Windows
> Server 2019
>   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
> Enterprise Linux 7.5
>
> Nothing has worked. No matter where we run the tomcats, they drive CPU up
> to 100%. Meanwhile the other six servers are still running fine. They all
> run the same canned tomcat applications.
>
> We would appreciate some guidance on getting to the bottom of this problem.
>
> --Eric
>
>
> Disclaimer : This email and any files transmitted with it are confidential
> and intended solely for intended recipients. If you are not the named
> addressee you should not disseminate, distribute, copy or alter this email.
> Any views or opinions presented in this email are solely those of the
> author and might not represent those of Physician Select Management.
> Warning: Although Physician Select Management has taken reasonable
> precautions to ensure no viruses are present in this email, the company
> cannot accept responsibility for any loss or damage arising from the use of
> this email or attachments.
>


RE: Tomcat Server Using 100% CPU

2019-08-08 Thread John.E.Gregg
Eric,

> -Original Message-
> From: Eric Robinson 
> Sent: Thursday, August 08, 2019 11:53 AM
> To: users@tomcat.apache.org
> Subject: Tomcat Server Using 100% CPU
> 
> We have a farm of VMs, each running multiple instances of tomcat (up to 80
> instances per server). Everything has been running fine for years, but
> recently one server has started nailing the CPU to 100% utilization.
> 
> We have tried:
> 
> 
>   *   Different versions of tomcat and JDK
>   *   Doubling the resources to 16 cores and 56 GB RAM
>   *   Moving the VM to different physical server
>   *   Rebuilding the tomcat instances on a brand new VM using Windows
> Server 2019
>   *   Rebuilding the tomcat instances on a brand new VM using Red Hat
> Enterprise Linux 7.5
> 
> Nothing has worked. No matter where we run the tomcats, they drive CPU
> up to 100%. Meanwhile the other six servers are still running fine. They all
> run the same canned tomcat applications.
> 
> We would appreciate some guidance on getting to the bottom of this
> problem.
> 
> --Eric
> 
> 

Are you sure that it's the Tomcat process that is using the CPU?  If so, take 
several thread dumps about 5 seconds apart.  On Linux, use kill -3 
tomcatpidhere.  They will go to catalina.out.  You'll probably need a developer 
to interpret them.



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



Tomcat Server Using 100% CPU

2019-08-08 Thread Eric Robinson
We have a farm of VMs, each running multiple instances of tomcat (up to 80 
instances per server). Everything has been running fine for years, but recently 
one server has started nailing the CPU to 100% utilization.

We have tried:


  *   Different versions of tomcat and JDK
  *   Doubling the resources to 16 cores and 56 GB RAM
  *   Moving the VM to different physical server
  *   Rebuilding the tomcat instances on a brand new VM using Windows Server 
2019
  *   Rebuilding the tomcat instances on a brand new VM using Red Hat 
Enterprise Linux 7.5

Nothing has worked. No matter where we run the tomcats, they drive CPU up to 
100%. Meanwhile the other six servers are still running fine. They all run the 
same canned tomcat applications.

We would appreciate some guidance on getting to the bottom of this problem.

--Eric


Disclaimer : This email and any files transmitted with it are confidential and 
intended solely for intended recipients. If you are not the named addressee you 
should not disseminate, distribute, copy or alter this email. Any views or 
opinions presented in this email are solely those of the author and might not 
represent those of Physician Select Management. Warning: Although Physician 
Select Management has taken reasonable precautions to ensure no viruses are 
present in this email, the company cannot accept responsibility for any loss or 
damage arising from the use of this email or attachments.


Re: Support Request for problem with problem running SSL certificate on tomcat 8

2019-08-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Munzer,

On 8/5/19 20:42, Munzer Khatib wrote:
> Here are the steps I used to create the keystore and import
> certificate to it.

These steps look okay, with the exception that Peter (logo) pointed
out: you have used two different keystores in your commands. Also, you
have tomcat10.keystore in your configuration and I think you might
want to be using tomcat14.keystore. Whichever keystore you use, you
need to be consistent. Feel free to make a backup copy after you
generate your CSR just in case you make a mistake and damage the key
store.

> C:\Program Files\Java\jre7\bin>keytool -list -keystore
> tomcat10.keystoreEnter keystore password: Keystore type:
> JKSKeystore provider: SUN Your keystore contains 3 entries root,
> Jul 22, 2019, trustedCertEntry,Certificate fingerprint (SHA1):
> 47:BE:AB:C9:22:EA:0E:78:78:34:62:A7:9F:45:C2:54:FD:E6:8Bintermediate,
> Jul 22, 2019, trustedCertEntry,Certificate fingerprint (SHA1):
> 27:AC:93:69:FA:52:07:BB:26:27:CE:FA:CC:BE:4E:F9:C3:19:B8tomcat, Jul
> 22, 2019, trustedCertEntry,Certificate fingerprint (SHA1):
> B6:27:BE:DF:ED:EF:EF:4D:62:D2:F1:5C:CC:C1:A2:AB:98:60:8E

Okay, that's the first entry in the file. What about the other two?

> 
> I also tried creating a PEM text file for all certificates and
> importing that into private key alias tomcat but it only imported
> the domain certificate as "trustedcertentry" My server xml file
> connector config is like this protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8443"
> compression="on" URIEncoding="UTF-8" compressionMinSize="2048"
> noCompressionUserAgents="gozilla, traviata"
> compressableMimeType="text/html,text/xml,text/plain,text/css,text/java
script,text/json,application/json"/> port="443" protocol="HTTP/1.1" maxThreads="150" scheme="https"
> secure="true" clientAuth="false" sslProtocol="TLS"
> SSLEnabled="true" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2"
> ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
> TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA3
84,
> TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS
_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,
> TLS_RSA_WITH_AES_256_CBC_SHA" keystorePass="password"
> keystoreFile="C:\Program Files\Java\jre7\bin\tomcat10.keystore"/>
> 

You are missing a "keyAlias" attribute. You'll want:

keyAlias="tomcat"

In that  configuration. Otherwise, Tomcat will use the
first entry found in the keystore.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl1MKqcACgkQHPApP6U8
pFhGWRAAxR38krdkv0T4UpZSgvPvhFFm5rNMaxG2JKMusybjQwO3/7H9sg6hi4TZ
XKlwrH3iqn4qcAl2GtT4oYy9VwZjoo4GPuaJzTl+qZ1gbX0vFw7YtwfKrnYVWv5A
IXprhCvZPXjIDEBgNNOoHaX9sAI0APvk6d8HDNtD/d5etqL5KxEZ3vP8o2vyV1A1
nNK0Q5wFXOxfUFpNCoGzUUdOGOAopzUtj9qmdJERi3XvGwho2IoVPfdd60Hk+/Qi
62LzTn/+rckKXhNk2A6Zgek4qFxbl60w0MpaogTPhMhC4ouQaUmy0CugBuKZfYuE
YjJzsJzlGDpXQHbOgX/wkSYhC+3Au9j1TXvflSuQG9MljtRwKKCjt3WzWHLzM30Q
/kXhFOOglIfXJ8PQdO4OUG3O0sFKbpeKNVrEy6CquhRHbYRpA1DgZPNp86oRoEnc
zPO7aqjC/hxTS9zhfCmUx1ZCb3sJg/hXuUkSi8//6UEkOLORY5qN0p2OApl+ft2j
jkoWRdvXrmQhKl0fuO5Mot27M2uOGJ/UGB2Ed0vsNOGlD2/UNg3Yz8oHi3xv1Zu0
B6tqVaRP164vHunB2ka5tGJ7jyQPw3P1Mr9Z9bbHIyKsM8ckb2QSbrKUlcsQ28gv
FT/merQctDyMS0zHVYzUobfqujE8EqC33Cyq5eedWhqGFGQpwsM=
=lp+s
-END PGP SIGNATURE-

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



Re: Problem with OpenSSL cipher suites -what's wrong with this configuration?

2019-08-08 Thread logo

Mark,

Am 08.08.2019 11:45, schrieb Mark Thomas:

On 08/08/2019 10:15, Alten, Jessica-Aileen wrote:

Therefore, I guess Tomcat cannot interpret these cipher suites for TLS 
1.3. So is this possibly a bug in Tomcat with openSSL 1.1.1c
and JDK 8 (again: I am not talking about JSSE here, it can only do TLS 
1.2)?


Tomcat supports configuring the ciphers for TLSv1.2 and below.

Tomcat does not (yet) support configuring the ciphersuites for TLS1.3
and above.


that's good to know. Any timeline (if it is necessary at all)? Does that 
mean if only protocol is TLSv1.3, no cipher string is used? Or only the 
TLS1.3 ciphers? Should "HIGH:..." work?


Peter



Mark

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


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



Re: Problem with OpenSSL cipher suites -what's wrong with this configuration?

2019-08-08 Thread Mark Thomas
On 08/08/2019 10:15, Alten, Jessica-Aileen wrote:

> Therefore, I guess Tomcat cannot interpret these cipher suites for TLS 1.3. 
> So is this possibly a bug in Tomcat with openSSL 1.1.1c
> and JDK 8 (again: I am not talking about JSSE here, it can only do TLS 1.2)?

Tomcat supports configuring the ciphers for TLSv1.2 and below.

Tomcat does not (yet) support configuring the ciphersuites for TLS1.3
and above.

Mark

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



RE: Problem with OpenSSL cipher suites -what's wrong with this configuration?

2019-08-08 Thread Alten, Jessica-Aileen
> > I have a problem with the Tomcat 9.0.22 configuration for TLSv1.3  using
> > jdk8u222-b10_openj9-0.15.1 on Windows Server 2016. In principle
> > TLSv1.3 works, but I want to specify the allowed cipher suites as well.
> >
> > The relevant parts of server.xml are:
> >  > SSLEngine="on" />
> > ...
> >  >   maxThreads="150" SSLEnabled="true"
> > sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation">
> >
> >
> >  > certificateKeystoreFile="D:/ProgramFiles/ApacheSoftwareFoundation/tomcat-base-8080/conf/keystore-pkcs12.jks"
> >   certificateKeystorePassword="mypassword" 
> > certificateKeystoreAlias="myalias" />
> >
> > 
> >
> > This configuration works!  When I connect to the server, Firefox says
> > under technical details: Connection encrypted (TLS_AES_128_GCM_SHA256,
> > 128bit key, TLS 1.3).
> >
> > But when I try to specify the cipher suites like:  > protocols="TLSv1.3" ciphers="TLS_AES_128_GCM_SHA256">
> 
> You have to use OpenSSL cipher names in this case. Like this...
> 
> ciphers="HIGH:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-
> RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-
> SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-
> SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-
> AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-
> SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS">

This cipher suite works fine for TLSv1.2. However, I only want to use TLSv1.3 
with its cipher suites. 
I installed openssl 1.1.1c and if I type "openssl ciphers -s -tls1_3" openSSL 
will return
TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
in exactly this spelling, with underscores, not with hyphens as in the other 
cipher suites. I tried it with hyphens in Tomcat - but
it does not work either.

Therefore, I guess Tomcat cannot interpret these cipher suites for TLS 1.3. So 
is this possibly a bug in Tomcat with openSSL 1.1.1c
and JDK 8 (again: I am not talking about JSSE here, it can only do TLS 1.2)?

Kind regards,
Jessica


smime.p7s
Description: S/MIME cryptographic signature