Latest Best Practices for Tomcat Tuning

2019-05-22 Thread Louis Zipes
Hi Experts,
I know that if you Google 'Tomcat Tuning' you will get some hits  (ex. 
https://www.mulesoft.com/tcat/tomcat-performance) but  I would like to see if 
we can have a discussion of best practices for Tomcat tuning from the group of 
experts here.  Is there an updated top 10 list or something similar or what 
people have found have greatly helped their performance.   Note that I have 
looked through the archives but most of the hits I get date back 10 years.

My personal situation is I'm running Tomcat 8.5.x on Windows with a third party 
application.  Since it is a third party application I feel I can't open up the 
actual coding itself so I'm left to tune around the margins (ex. Parameters in 
service.bat, maybe try to switch our odbc.jar to a different one, etc) but 
maybe I'm wrong.

Basically, is there an updated list of best practices that we can discuss here 
or is this not the appropriate venue.  I'm looking for a more generic 
conversation that would benefit all users on this forum and if it helps me 
personally then of course that is great!

Or is the answer always get the stack dumps and analyze from there.   : )

Thanks in advance

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Massive Startup Time after Server Reboot

2019-05-20 Thread Louis Zipes
Can you refresh me on how to capture the stack dumps you suggested?
It's been a while

>In Task Manager find the Tomcat process, right click on it and there is an 
>option to create a dump file.

>Also, if you have access to jconsole or other JMX tool you can connect  to it 
>and see what is going on.

-Original Message-
From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
Sent: Monday, May 20, 2019 4:44 AM
To: users@tomcat.apache.org
Subject: Re: Massive Startup Time after Server Reboot

- - - external message, proceed with caution - - -


On 20.05.2019 00:09, Jerry Malcolm wrote:
> Just an FYI this server has been in production a little over a year.  
> This TC load
> problem only started 2-3 months ago.  So 'something' changed to cause this 
> problem to
> manifest itself. It's been too long to try to correlate a specific server 
> change to the
> start of this problem. But I just wanted to point out that this problem has 
> NOT been
> around since day 1 on this server.

Just in case, since this is a Windows server ..
2-3 months ago, an update of a virus scanner ?
(of the intrusive kind which pre-checks each file that wants to be opened)
Checking may be easy or not, depending on your access : disable the virus 
scanner just the
time to start tomcat and check.

>
> Jerry
>
> On 5/19/2019 5:03 PM, Jerry Malcolm wrote:
>> Rainer,
>>
>> No change with the urandom parm.  I am attaching a portion of the Catalina 
>> log.  The
>> first half shows between 8 and 15 seconds to deploy each app for a single 
>> virtual host
>> (there are no war files, the app is already exploded in the appbase dir).  I 
>> have quite
>> a few virtual hosts with several apps each.  That initial server start took 
>> 21+ minutes.
>>   I then restarted the TC service and got the ~.5 sec start per webapp shown 
>> in the 2nd
>> half of the log below.
>>
>> Can you refresh me on how to capture the stack dumps you suggested? It's 
>> been a while
>>
>> Thx.
>>
>> Jerry
>>
>>  First start of Tomcat after server reboot
>> -
>>  [C:\domains\.com\webapps\JSPWiki.war] has finished in [8,579] ms
>> tory [C:\domains\.com\webapps\cis]
>> irectory [C:\domains\.com\webapps\cis] has finished in [11,486] ms
>> tory [C:\domains\.com\webapps\gallery]
>> irectory [C:\domains\.com\webapps\gallery] has finished in [9,204] 
>> ms
>> tory [C:\domains\.com\webapps\gl]
>> irectory [C:\domains\.com\webapps\gl] has finished in [8,469] ms
>> tory [C:\domains\.com\webapps\idmanager]
>> irectory [C:\domains\.com\webapps\idmanager] has finished in 
>> [8,689] ms
>> tory [C:\domains\.com\webapps\itemtrack]
>> irectory [C:\domains\.com\webapps\itemtrack] has finished in 
>> [6,907] ms
>> tory [C:\domains\.com\webapps\malcolment]
>> irectory [C:\domains\.com\webapps\malcolment] has finished in 
>> [8,469] ms
>> tory [C:\domains\.com\webapps\notebook]
>> irectory [C:\domains\.com\webapps\notebook] has finished in 
>> [10,189] ms
>> tory [C:\domains\.com\webapps\order]
>> irectory [C:\domains\.com\webapps\order] has finished in [8,501] ms
>> tory [C:\domains\.com\webapps\payment]
>> irectory [C:\domains\.com\webapps\payment] has finished in 
>> [14,209] ms
>> tory [C:\domains\.com\webapps\projectmanager]
>> irectory [C:\domains\.com\webapps\projectmanager] has finished in 
>> [9,018] ms
>>  [C:\Tomcat 9.0\conf\Catalina\myridetx.net\manager.xml]
>> ptor [C:\Tomcat 9.0\conf\Catalina\myridetx.net\manager.xml] has finished in 
>> [62] ms
>>
>>  Restart of Tomcat 
>> -
>> tory [C:\domains\.com\webapps\cis]
>> irectory [C:\domains\.com\webapps\cis] has finished in [594] ms
>> tory [C:\domains\.com\webapps\gallery]
>> irectory [C:\domains\.com\webapps\gallery] has finished in [547] ms
>> tory [C:\domains\.com\webapps\gl]
>> irectory [C:\domains\.com\webapps\gl] has finished in [562] ms
>> tory [C:\domains\.com\webapps\idmanager]
>> irectory [C:\domains\.com\webapps\idmanager] has finished in [578] 
>> ms
>> tory [C:\domains\.com\webapps\itemtrack]
>> irectory [C:\domains\.com\webapps\itemtrack] has finished in [547] 
>> ms
>> tory [C:\domains\.com\webapps\malcolment]
>> irectory [C:\domains\.com\webapps\malcolment] has finished in 
>> [579] ms
>> tory [C:\domains\.com\webapps\notebook]
>> irectory [C:\domains\.com\webapps\notebook] has finished in [547] 
>> ms
>> tory [C:\domains\.com\webapps\order]
>> irectory [C:\domains\.com\webapps\order] has finished in [531] ms
>> tory [C:\domains\.com\webapps\payment]
>> irectory [C:\domains\.com\webapps\payment] has finished in [562] ms
>> tory [C:\domains\.com\webapps\projectmanager]
>> irectory [C:\domains\.com\webapps\projectmanager] has finished in 
>> [531] ms
>>
>> On 5/18/2019 3:18 PM, Rainer Jung wrote:
>>> Most likely it hangs waiting for enough entropy for random number generator 
>>> seeding.
>>>
>>> Try whether the problem goes away if you add
>>>
>>>   

RE: maxActive and maxWaitMillis set to "-1" in Tomcat 8.5

2019-04-11 Thread Louis Zipes
*maxTotal replaces maxActive in Tomcat 8.5

-Original Message-
From: Louis Zipes [mailto:louis.zi...@kdrp.com]
Sent: Thursday, April 11, 2019 4:43 PM
To: Tomcat Users List
Subject: maxActive and maxWaitMillis set to "-1" in Tomcat 8.5

Hi all,
I'm upgrading from 7.0.54 to 8.5 and I know that MaxActive and maxWaitMillis 
replace MaxActive and MaxWait respectively but my third party vendor provided 
the old parameters as set to '-1' when they packaged the application with 
7.0.54.

My questions is what does '-1' mean for MaxActive and maxWaitMillis parameters? 
  Is it infinite?  Is it dangerous to continue to use those values or should I 
do something like 200/10,000 respectively?

Thanks, Louis


---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.
B�CB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


maxActive and maxWaitMillis set to "-1" in Tomcat 8.5

2019-04-11 Thread Louis Zipes
Hi all,
I'm upgrading from 7.0.54 to 8.5 and I know that MaxActive and maxWaitMillis 
replace MaxActive and MaxWait respectively but my third party vendor provided 
the old parameters as set to '-1' when they packaged the application with 
7.0.54.

My questions is what does '-1' mean for MaxActive and maxWaitMillis parameters? 
  Is it infinite?  Is it dangerous to continue to use those values or should I 
do something like 200/10,000 respectively?

Thanks, Louis


---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Tomcat doesn't restart

2019-03-19 Thread Louis Zipes
Not too much bigger than normal and they don't show too much unusual activity.  
Definitely not running out of space on the machine if that is what you are 
curious about.

Thanks, Louis

-Original Message-
From: John Dale [mailto:jcdw...@gmail.com]
Sent: Saturday, March 16, 2019 4:33 AM
To: Tomcat Users List
Subject: Re: Tomcat doesn't restart

- - - external message, proceed with caution - - -


How big had your log files gotten in that period?

On 3/14/19, Louis Zipes  wrote:
> Hi Experts,
> Running Tomcat 7.0.54 on Windows 2012
>
> Our morning process is to fire a stop of the Tomcat Windows Service and then
> an immediate restart.  This is more due to the 3rd party application that is
> running with Tomcat than a problem with Tomcat.  A few weeks ago it started
> to not cleanly stop when using the following batch file command.  Note that
> this had worked for more than a year with no problems and I don't think that
> there have been any server changes although I don't control the machine
>
>
> net stop "Apache Tomcat 7.0 TPMDEV" && net start "Apache Tomcat 7.0 TPMDEV"
>
> I then changed the batch file, that calls the Windows Service stop/start to
> give a 65 second delay between the stop and start hoping to give it more
> time to cleanly stop before restarting:
>
>
> 
>
> net stop "Apache Tomcat 7.0 TPMDEV"
>
> PING localhost -n 65 >NUL
>
> net start "Apache Tomcat 7.0 TPMDEV"
>
>
> 
>
> This modified batch file worked for about 2 weeks but then this morning it
> failed to stop and restart correctly.  Since it is PRD we just have to get
> it restarted so I usually don't have time to troubleshoot getting threads,
> etc.  (also, the off shore team is on shift when this happens but I'm the
> administrator that actually has to get to root cause when I start my
> shift).
>
> I observed the following in the std-output log it seems to receive the
> Shutdown command but it seems like either all of the threads are not being
> closed for some reason
>
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardServer await
> INFO: A valid shutdown command was received via the shutdown port. Stopping
> the Server instance.
> Mar 14, 2019 5:28:00 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-7005"]
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardService
> stopInternal
> INFO: Stopping service Catalina
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:01 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet
> [RequestDispatcherServlet]
> --
>
>
> So my questions are:
>
> 1) Does anyone have a better way to make sure Tomcat is fully stopped and
> any open threads are killed
> 2) Is this part below real cause and I need to find the root cause by doing
> a thread dump?  As mentioned it is hard for me to get one because I'm
> usually not on shift when this happens.
>
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet
> [RequestDispatcherServlet]
>
> Thanks, Louis
>
> ---
> CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and
> may contain information that is confidential, proprietary or exempt from
> disclosure. If you are not the intended recipient, please contact the sender
> immediately. Unauthorized use or distribution is prohibited and may be
> unlawful.
>

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Tomcat doesn't restart

2019-03-19 Thread Louis Zipes
Ok, thanks.  As mentioned it is difficult to grab due to timing but I will try 
to show the overnight team how to capture a thread dump but for right now I 
have change the restart time forward 10 minutes and done put in some other 
stop/start jobs for the third party app and will see if that relieves the 
problem.

Also, I would like to upgrade Tomcat in the near future so hopefully that will 
help.

- Louis

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Friday, March 15, 2019 7:52 PM
To: Tomcat Users List
Subject: Re: Tomcat doesn't restart

- - - external message, proceed with caution - - -


On 14/03/2019 20:23, Louis Zipes wrote:
> Hi Experts,
> Running Tomcat 7.0.54 on Windows 2012
>
> Our morning process is to fire a stop of the Tomcat Windows Service and then 
> an immediate restart.  This is more due to the 3rd party application that is 
> running with Tomcat than a problem with Tomcat.  A few weeks ago it started 
> to not cleanly stop when using the following batch file command.  Note that 
> this had worked for more than a year with no problems and I don't think that 
> there have been any server changes although I don't control the machine
>
>
> net stop "Apache Tomcat 7.0 TPMDEV" && net start "Apache Tomcat 7.0 TPMDEV"
>
> I then changed the batch file, that calls the Windows Service stop/start to 
> give a 65 second delay between the stop and start hoping to give it more time 
> to cleanly stop before restarting:
>
>
> 
>
> net stop "Apache Tomcat 7.0 TPMDEV"
>
> PING localhost -n 65 >NUL
>
> net start "Apache Tomcat 7.0 TPMDEV"
>
>
> 
>
> This modified batch file worked for about 2 weeks but then this morning it 
> failed to stop and restart correctly.  Since it is PRD we just have to get it 
> restarted so I usually don't have time to troubleshoot getting threads, etc.  
> (also, the off shore team is on shift when this happens but I'm the 
> administrator that actually has to get to root cause when I start my shift).
>
> I observed the following in the std-output log it seems to receive the 
> Shutdown command but it seems like either all of the threads are not being 
> closed for some reason
>
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardServer await
> INFO: A valid shutdown command was received via the shutdown port. Stopping 
> the Server instance.
> Mar 14, 2019 5:28:00 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-7005"]
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardService stopInternal
> INFO: Stopping service Catalina
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:01 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> --
>
>
> So my questions are:
>
> 1) Does anyone have a better way to make sure Tomcat is fully stopped and any 
> open threads are killed

Killing the process is probably the only other option.

> 2) Is this part below real cause and I need to find the root cause by doing a 
> thread dump?  As mentioned it is hard for me to get one because I'm usually 
> not on shift when this happens.

Yes. You need a thread dump to find out what is going on here. I'd guess
the application has been updated just before this problem started happening.

Mark


>
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
>
> Thanks, Louis
>
> ---
> CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and 
> may contain information that is confidential, proprietary or exempt from 
> disclosure. If you are not the intended recipient, please contact the sender 
> immediately. Unauthorized use or distribution is prohibited and may be 
> unlawful.
>


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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



Tomcat doesn't restart

2019-03-14 Thread Louis Zipes
Hi Experts,
Running Tomcat 7.0.54 on Windows 2012

Our morning process is to fire a stop of the Tomcat Windows Service and then an 
immediate restart.  This is more due to the 3rd party application that is 
running with Tomcat than a problem with Tomcat.  A few weeks ago it started to 
not cleanly stop when using the following batch file command.  Note that this 
had worked for more than a year with no problems and I don't think that there 
have been any server changes although I don't control the machine


net stop "Apache Tomcat 7.0 TPMDEV" && net start "Apache Tomcat 7.0 TPMDEV"

I then changed the batch file, that calls the Windows Service stop/start to 
give a 65 second delay between the stop and start hoping to give it more time 
to cleanly stop before restarting:




net stop "Apache Tomcat 7.0 TPMDEV"

PING localhost -n 65 >NUL

net start "Apache Tomcat 7.0 TPMDEV"




This modified batch file worked for about 2 weeks but then this morning it 
failed to stop and restart correctly.  Since it is PRD we just have to get it 
restarted so I usually don't have time to troubleshoot getting threads, etc.  
(also, the off shore team is on shift when this happens but I'm the 
administrator that actually has to get to root cause when I start my shift).

I observed the following in the std-output log it seems to receive the Shutdown 
command but it seems like either all of the threads are not being closed for 
some reason

Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the 
Server instance.
Mar 14, 2019 5:28:00 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-7005"]
Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
[RequestDispatcherServlet]
Mar 14, 2019 5:28:01 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
[RequestDispatcherServlet]
Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
[RequestDispatcherServlet]
--


So my questions are:

1) Does anyone have a better way to make sure Tomcat is fully stopped and any 
open threads are killed
2) Is this part below real cause and I need to find the root cause by doing a 
thread dump?  As mentioned it is hard for me to get one because I'm usually not 
on shift when this happens.

Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
[RequestDispatcherServlet]

Thanks, Louis

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Windows Service not stopping Tomcat 8.5.35 but only if it has been active for more than a day

2018-12-19 Thread Louis Zipes
Just to confirm, the relevant thread dump will have this type of header and I 
want to get it while the Tomcat is attempting to stop?

2018-12-18 08:33:58 Full thread dump Java HotSpot(TM) 64-Bit Server VM 
(24.80-b11 mixed mode):


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Wednesday, December 19, 2018 2:55 PM
To: users@tomcat.apache.org
Subject: Re: Windows Service not stopping Tomcat 8.5.35 but only if it has been 
active for more than a day

- - - external message, proceed with caution - - -


On 19/12/2018 19:44, Louis Zipes wrote:
>
> First of all, congratulations to Woonsan on his achievement!
>
> My issue is that I'm running Tomcat 8.5.35/JDK 1.7 on Windows 2012 and I'm 
> stopping and starting it using Windows Service.  I have no problems starting 
> the Tomcat service and I also have no problems stopping the Tomcat service IF 
> I stop it that day.  However, if I leave it running for more than a day then 
> I can't stop it  (it goes into Stopping mode and then eventually times out).  
> I realize that there are manual ways to kill it then but of course I want to 
> figure out the cause of it.  Note that since this is a lower environment, I 
> don't have a lot of background jobs running and when I look at the Jconsole 
> it doesn't look that 'bad'.  This was not a problem when I'm running the 
> application using Tomcat 7 on the same machine.  Obviously, I had to adopt 
> the service.bat and server.xml files to use in Tomcat 8 so maybe I accidently 
> deleted a key parameter but really, in the service.bat I just used the Xmx 
> parameter from Tomcat  and in server.xml
>
> I know about thread dumps but some of those are 4 gig in size and hard to 
> analyze.  What I'm looking for from the experts here is the order of 
> troubleshooting operations and logs.

4GB sounds like a heap dump.

You want a thread dump.

> For example, I have the Tomcat logs and one log shows this:
>
> 19-Dec-2018 13:36:43.521 INFO [Thread-13] 
> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
> ["ajp-nio-8009"]
> 19-Dec-2018 13:36:43.549 INFO [Thread-13] 
> org.apache.catalina.core.StandardService.stopInternal Stopping service 
> [Catalina]
> 19-Dec-2018 13:36:43.612 INFO [localhost-startStop-2] 
> org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) 
> to be deallocated for Servlet [jsp]
> 19-Dec-2018 13:36:44.705 INFO [localhost-startStop-2] 
> org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) 
> to be deallocated for Servlet [jsp]
> 19-Dec-2018 13:36:45.799 INFO [localhost-startStop-2] 
> org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) 
> to be deallocated for Servlet [jsp]
>
> Is this a real error message that is pointing to an issue.

Yes. It looks like you have a long running JSP that hasn't stopped. A
thread dump is what you need here. You should be able to generate one by
right-clicking on the Tomcat Manager icon in the task bar. The dump
should be in one of the log files.

> Basically, what would be the order of operations to try to troubleshoot this 
> issue?  Do I stay within Tomcat, do I look to the Windows machine itself, do 
> I look to the JDK to see if there is problem?

Start at a thread dump.

Mark

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



Windows Service not stopping Tomcat 8.5.35 but only if it has been active for more than a day

2018-12-19 Thread Louis Zipes

First of all, congratulations to Woonsan on his achievement!

My issue is that I'm running Tomcat 8.5.35/JDK 1.7 on Windows 2012 and I'm 
stopping and starting it using Windows Service.  I have no problems starting 
the Tomcat service and I also have no problems stopping the Tomcat service IF I 
stop it that day.  However, if I leave it running for more than a day then I 
can't stop it  (it goes into Stopping mode and then eventually times out).  I 
realize that there are manual ways to kill it then but of course I want to 
figure out the cause of it.  Note that since this is a lower environment, I 
don't have a lot of background jobs running and when I look at the Jconsole it 
doesn't look that 'bad'.  This was not a problem when I'm running the 
application using Tomcat 7 on the same machine.  Obviously, I had to adopt the 
service.bat and server.xml files to use in Tomcat 8 so maybe I accidently 
deleted a key parameter but really, in the service.bat I just used the Xmx 
parameter from Tomcat  and in server.xml

I know about thread dumps but some of those are 4 gig in size and hard to 
analyze.  What I'm looking for from the experts here is the order of 
troubleshooting operations and logs.

For example, I have the Tomcat logs and one log shows this:

19-Dec-2018 13:36:43.521 INFO [Thread-13] 
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
["ajp-nio-8009"]
19-Dec-2018 13:36:43.549 INFO [Thread-13] 
org.apache.catalina.core.StandardService.stopInternal Stopping service 
[Catalina]
19-Dec-2018 13:36:43.612 INFO [localhost-startStop-2] 
org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) to 
be deallocated for Servlet [jsp]
19-Dec-2018 13:36:44.705 INFO [localhost-startStop-2] 
org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) to 
be deallocated for Servlet [jsp]
19-Dec-2018 13:36:45.799 INFO [localhost-startStop-2] 
org.apache.catalina.core.StandardWrapper.unload Waiting for [1] instance(s) to 
be deallocated for Servlet [jsp]

Is this a real error message that is pointing to an issue.  Google is not clear.

Basically, what would be the order of operations to try to troubleshoot this 
issue?  Do I stay within Tomcat, do I look to the Windows machine itself, do I 
look to the JDK to see if there is problem?

Thanks, Louis



---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


[OT] Are we allowed to joke and ask when users@tomcat.apache.org will be bought for billions of dollars like GitHub or RedHat?

2018-10-29 Thread Louis Zipes

: )

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: 2 Factor Authentication Tomcat 7

2018-10-24 Thread Louis Zipes
Hello,
To clarify, are you trying to get to a point where the password to the Oracle 
schema looks something like this in server.xml?

password="2d9377fee736w1115ca984a1dfb99c943"

instead of unencrypted like

password=

so that someone wandering around your server can't get the password to your 
Oracle database?

-Original Message-
From: Loai Abdallatif [mailto:loai.abdalla...@gmail.com]
Sent: Wednesday, October 24, 2018 2:00 AM
To: Tomcat Users List
Subject: Re: 2 Factor Authentication Tomcat 7

- - - external message, proceed with caution - - -


Thank Chris, Totally I agree with you

On Tue, Oct 23, 2018 at 6:03 PM Will Nordmeyer  wrote:

> Chris,
>
> I understand all of that and am working all those concerns to the
> PTB... but as with many management situations reality doesn't fit with
> the "security" mindset.
> On Tue, Oct 23, 2018 at 10:59 AM Christopher Schultz
>  wrote:
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Will,
> >
> > On 10/23/18 10:44, Will Nordmeyer wrote:
> > > I'm currently running Tomcat 7 (will likely migrate to 8 or 9 in
> > > the next year).  I tried working with Oracle on this with no
> > > success.
> > >
> > > We have an Oracle Database connection defined within our web.xml
> > > (see below).  We need to convert to using 2 Factor (certificate?)
> > > based Authentication.
> > >
> > > How do we convert from our embedded username password to 2FA
> >
> > Uhh...
> >
> > How would you enter your second-factor into the server? During service
> > startup? What happens if the connection times-out and you have to
> > re-authenticate? Do you want to be paged in the middle of the night to
> > re-enter your 2FA code? How about 10 times per hour on 100 different
> > servers?
> >
> > 2FA doesn't make any sense at all for services contacting other
> > services. 2FA makes sense for humans contacting services because
> > humans are so much worse at password management, social engineering
> > resistance, etc.
> >
> > If you have a segment of your IT team mandating 2FA for database
> > connections (even for services), tell them that THEY have to use THEIR
> > 2FA credentials to unlock the database for YOUR services. See how long
> > that policy survives.
> >
> > - -chris
> > -BEGIN PGP SIGNATURE-
> > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> >
> > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvPN1UACgkQHPApP6U8
> > pFgyzA//b2S8wolPV9oj9rnXikgcY+aKsWsO1eDOQ89lHLNAW/vZXXBp+imE15ec
> > Ow211CgpoHvePTF6apUq0iW4zBi8xTil9ZbHHW8dcFICGtBrhOMvwzT6TBIJyPVw
> > KJF/l3f1VBBDKyfuwmdHENuakRQazvT9dnd9YBN5QTzGvkYVaGmh6gEm4u/gz+bF
> > Bncfb9ThLvPGKhNsS8mPlCS8bc/NDzjWPqaI+nQQWs2paSNHYEkgj7x0zSV0KOUV
> > HmuhRdahcAm2Tmxd6uLdQtoizO+SvX7N6emPg0UPG1I0+pKoklWVhQsSahKG1a3f
> > 9rmvaAXjiOdNFnxO6bwKWI6Q/2quJdV+77QA0MbqGMLngC38WlLfzIcB7ryfyhoh
> > SwwNeCn6AkYaQ7AwdmaskTKW1QCB/k34KmcBzbxsf2V3ChWVDDHxqlzHGkg0P7DO
> > Ctd8OAdWuhAErUxuXlNd3JOJqflOENtCB9WMPy5i2N71dZlnPhK/OUjtoE3U4dEj
> > WiynhDHuOcXXOPo4+QuhvDBNoat/todKqh5SCVkEonSx/dPSTwMbpKkCdSwM7oTT
> > dcYXEA+gb2fHIsARP6bsWDdxwhfuIhPWCtI/BVFYaXSeeVpSuUp4IF0/g3Geh26s
> > w3IFH6aP95P8t+vxeIBnwdFDZddot4VbWCJOEOJSmgqP39OcHg4=
> > =baEw
> > -END PGP SIGNATURE-
> >
> > -
> > 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
>
>
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Apache failed to initialize connector

2018-10-08 Thread Louis Zipes
Maybe I missed it but what do the Tomcat logs show when you stop and start it?

Also, to further diagnose or get more of the error message you could create a 
batch file with this in it and put in a PAUSE to see the error message

net stop "" && net start ""
PAUSE

-Original Message-
From: Gael REYNOARD [mailto:gael.reyno...@lafon.fr]
Sent: Monday, October 08, 2018 3:12 AM
To: users@tomcat.apache.org
Subject: Re: Apache failed to initialize connector

- - - external message, proceed with caution - - -


Hi Cris,

I had not thought about it, so I also tested this possible solution and it
also solves the problem.

My other test was not conclusive, I carried out the updates of Windows and
that did not change anything, if the service Tomcat starts automatically I
always have the problem.

But I have 2 possibilities to work around this problem:

- Start service manually after starting Windows
- Start service in "Automatic (Delayed Start)"


Best regards,
--
*  Gaël REYNOARD* - Ingénieur Recherche & Développement
  Service *Bureau d'étude informatique*
  44 avenue Victor Meunier - 33530 BASSENS
  Fixe 05.57.80.80.80 - Fax 05.56.31.61.21 - Poste interne 100 235
  gael.reyno...@lafon.fr - www.lafon.fr


Le jeu. 4 oct. 2018 à 19:54, Berneburg, Cris J. - US 
a écrit :

> Hi Gael
>
> >> >> >> On 03/10/18 12:28, Gael REYNOARD wrote:
> >> >> >>> Hello everybody,
> >> >> >>>
> >> >> >>> OS : Windows 7 Pro x64
> >> >> >>> Tomcat : 8.5.31
> >> >> >>>
> >> >> >>> On a test bench, I reboot Windows to test one of our C#
> >> applications.
> >> >> >>> Sometimes after starting the OS, my Tomcat server fails to
> >> initialize
> >> >> >>> because the 8080 or 8009 port would be already used.
> >> >> >>
> >> >> >> How are you starting Tomcat?
> >> >> >>
> >> >> >> Mark
>
> gr> I disabled the automatic start of Tomcat service,
> gr> it is launched a little later by my program in C #.
> gr> After 314 startups of the OS, I did not have any exceptions.
>
> gr> I did not look well enough on the internet
> gr> because I found this morning a post
> gr> (
> https://stackoverflow.com/questions/51666952/address-bind-exception-in-tomcat
> )
> gr> from someone with a similar problem and Microsoft
> gr> would have provided a solution since july.
>
> I have not tried it myself, but have you considered the "Automatic
> (Delayed Start)" Startup type in your Windows service properties?  It's
> available on my TC service in Windows Server 2012 R2.
>
> This Stack Overflow article says it waits 2 minutes:
>
>
> https://stackoverflow.com/questions/11015189/automatic-vs-automatic-delayed-start/11015576#11015576
>
> --
> Cris Berneburg, Lead Software Engineer
> CACI, IRMA Project
> phone: 703-679-5313
>
> -Original Message-
> From: Gael REYNOARD 
> Sent: Thursday, October 4, 2018 8:45 AM
> To: users@tomcat.apache.org
> Subject: Re: Apache failed to initialize connector
>
> Thank you so much,
>
> [LARGE SNIP]
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Application hanging on Tomcat 7.0.54

2018-10-01 Thread Louis Zipes
Ok, thanks as always for the advice!  We think we figured out the user error(s) 
that caused the issue but I'm now more comfortable with pulling the Thread 
Dumps/VisualVM quicker so we can at least get those before we have to restart 
the application.

Thanks, Louis





> timeout set to 60.  Should I be looking to turn on some tracing on the
> driver?
60 what?

60 was the Pool Timeout

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, September 28, 2018 6:43 PM
To: users@tomcat.apache.org
Subject: Re: Application hanging on Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 9/27/18 09:19, Louis Zipes wrote:
> Even though these hangs are critical to find, any plugin or
> additional code that I wish to put on our PRD server have to go
> through our SOX process so it can be cumbersome.  Are any of the
> monitoring techniques that you mention 'out of the box' with
> Tomcat 7.0.54 or JDK 1.7.  I can certainly open the JCONSOLE in the
> java bin folder  but I don't have those nice Spring Boot Add-ons
> documented in say
> https://stackoverflow.com/questions/36587023/how-to-debug-log-tomcat-j
dbc-connection-pools-connections

You
>
>
don't need Spring Boot or anything like that. jconsole (or, better
yet VisualVM) can certainly observe your connection pool status as well
as runtime thread state, etc.

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

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAluurl0ACgkQHPApP6U8
pFjcdBAAqDBUm3gIasaDXdo0b0ZSyL56ADyTNa4c3hDdXLy4KJQjhYEltm23JktE
VCdTDdZj7T/dYAqyJvNXugak4f4SkBS5BhGyHBK+mfLmT8H3rqNNi+lUHHLlPHJn
O03YZfNz/HtYpajSgReaFm8SQQ/9RYhtlyVA0ZH+6UH1RVsGAxnqNAaUReCMyR1r
sN4lhwzft/xQCJ+riQ+rtrgeCpQJaZts88Bph8PFQ9CMKu1tWDU4RvgqyxMJ3uzm
Ciq4wQ5zU8ke5nDuiLryfli7ODj07pDgt0HJTfVggbeNi8psNps2We+s0sjLFwbs
ldw27q00H7vJsgyds0FDtbqoGQ1C8WkmfO/L6G47VxO55Jps8O4nbaaweRNtDWJO
N/RuBU2UvvzVgKuKtzBNXnKF7mIEssSLnb0OyY7ANuQBwhy/FmcHWey79VLYvsKt
ZD9DzCKE0ekJLg1Pfc2bMQsiDI/O9lFB/6JeknLs7fde1b9j3+8DeL/kUDHEt4go
lG2rs44/2GqTfNdhBEU8ERIaxretstK/ms3/zLoeVYO7VQypHeeagDHH7TOfztbR
hlYX5egZRCs0VT61gp4A2BONhbSWcldFbrUa8zRXnYLPe0WZMUEcmDsVt7YXv85x
2UJtZL6jFawEr91L8bjB9bKPBQFdilJFok1o/iib1ltXhXsTItE=
=IVM1
-END PGP SIGNATURE-

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Application hanging on Tomcat 7.0.54

2018-09-27 Thread Louis Zipes
Hi Guido,
Even though these hangs are critical to find, any plugin or additional code 
that I wish to put on our PRD server have to go through our SOX process so it 
can be cumbersome.  Are any of the monitoring techniques that you mention 'out 
of the box' with Tomcat 7.0.54 or JDK 1.7.  I can certainly open the JCONSOLE 
in the java bin folder  but I don't have those nice Spring Boot Add-ons 
documented in say 
https://stackoverflow.com/questions/36587023/how-to-debug-log-tomcat-jdbc-connection-pools-connections

I assume I would need something additional to do the following or not true:

>>The Tomcat JDBC Connection Pool for instance provide a MBean view for every 
>>connection with it's parameters. You may live watch the number of active, 
>>idle, ... connections (with a "well hidden" chart feature: Double-Click to 
>>expand some value representations; this here to a chart)

Thank you!

-Original Message-
From: Jäkel, Guido [mailto:g.jae...@dnb.de]
Sent: Thursday, September 27, 2018 2:29 AM
To: 'Tomcat Users List'
Subject: RE: Application hanging on Tomcat 7.0.54

- - - external message, proceed with caution - - -


Dear Louis,

I would recommend to use a tool like JVisualVM (with Plugins*) to take a look 
on this things while it's still running or have blocked. You may live watch 
things like running threads or the Java heap occupation or investigate JVM, 
Java and Tomcat parameters (and even run some actions) via JMX with 
"MBean-Explorer". You may trigger to generate a heap dump or force FullGC and 
even do CPU or Memory profiling.

The Tomcat JDBC Connection Pool for instance provide a MBean view for every 
connection with it's parameters. You may live watch the number of active, idle, 
... connections (with a "well hidden" chart feature: Double-Click to expand 
some value representations; this here to a chart)

Tomcat (i.e. Catalina) have something like a running request scoreboard, also. 
You may take and identify from that all long running or blocked requests. On 
the MBean, it's at 
"Catalina|RequestProcessor|||currentURI" and 
corresponding parameters.


(*) You would have to install some plugins inside the JVisualVM Tool, e.g. 
"Visual GC", "VisualVM Buffer Monitor", "Thread Inspector", "VisualVM BMeans"

Greetings

Guido

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Application hanging on Tomcat 7.0.54

2018-09-27 Thread Louis Zipes
Chris,
I looked through the log some more and I see all of the types of Thread 
Statuses.  Blocked, Runnable, Waiting, etc..  Any in particular that I should 
concentrate on?

Ex.
"http-bio-7005-exec-128" daemon prio=6 tid=0x26466800 nid=0x40e4 
waiting for monitor entry [0x432ae000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
com.demantra.applicationServer.servlets.notifications.UserNotificationHelper.execute(UserNotificationHelper.java:117)
- waiting to lock <0x00054d652c08> (a 
com.demantra.applicationServer.metaDataObjects.user.UserList)

ODBC on the actual Window machine hosting Tomcat is Oracle in 
OraClient11g_home1  (we have a 12c Oracle database) with a pool timeout set to 
60.  Should I be looking to turn on some tracing on the driver?

Thanks, Louis



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, September 26, 2018 7:30 PM
To: users@tomcat.apache.org
Subject: Re: Application hanging on Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 9/26/18 15:56, Louis Zipes wrote:
> Problem just re-occurred and so I was able to at least get a JSTACK
> (I assume it was Tomcat since it was the Java using the most memory
> on the machine).  Here is the reoccurring message.  I get more hits
> on but haven't dug through all of the Google hits yet (due to
> multi-tasking) so apologies up front if there is a simple answer to
> this.
>
> "Event_Manager_1413" daemon prio=6 tid=0x24856000
> nid=0x40c4 waiting on condition [0x42dae000]
> java.lang.Thread.State: TIMED_WAITING (parking) at
> sun.misc.Unsafe.park(Native Method) - parking to wait for
> <0x0005ab45f7b8> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>
>
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.
awaitNanos(Unknown
> Source) at java.util.concurrent.LinkedBlockingQueue.poll(Unknown
> Source) at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown
> Source) at
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source) at java.lang.Thread.run(Unknown Source)

This thread is waiting for a task, and is essentially idle. You will
have many of these on a non-busy system.

What are the other threads doing?

> Locked ownable synchronizers: - None
>
>> Any comments/suggestions are appreciated!
>
> Your most likely problem is database connection pool
> mismanagement: connections aren't properly released and the pool
> empties. All threads are left waiting on available database
> connections which will never be replenished.
>
> I'm using the ojdbc6.jar if that is what you are referring to or is
> there a better setting somewhere.

ODBC? What is your database?

- -chris


> -Original Message- From: Christopher Schultz
> [mailto:ch...@christopherschultz.net] Sent: Wednesday, September
> 26, 2018 3:46 PM To: users@tomcat.apache.org Subject: Re:
> Application hanging on Tomcat 7.0.54
>
> - - - external message, proceed with caution - - -
>
>
> Louis,
>
> On 9/26/18 14:42, Louis Zipes wrote:
>> Hi all, Tomcat 7.0.54 running on Windows 2012
>
>> We are running a third party application on Tomcat and today we
>> have intermittently run in issues where the application stops
>> working.  The big changes in our system is that we have added
>> more end users and we are at year end so of course everyone is
>> hitting the system hard. Even if we force a log out of all users
>> and stop all background jobs then the application doesn't
>> recover.
>
>> We see no active sessions on the database (our application is
>> connecting to an Oracle database) and I see no clear error
>> messages in either our third party application logs or the Tomcat
>> logs (ex. OutofMemory).  When we go to the Windows Task Manager
>> we did not see the machine's Memory max'd out but admittedly I
>> didn't look at the Java session to see if was reaching its Heap
>> Max.  The only thing that we noticed was that TCP connections
>> went down right after the restart.  I did open up Jconsole under
>> Java and I did force a garbage collection but that didn't seem to
>> help.
>
>> We do have an Oracle Grid Control and we did get an alert in
>> regards to Metric: [HTTP Transaction] Perceived Time per Page
>> going past thresholds but not sure if that was just an old alert
>> with and old range that was set up a long time ago or is a really
>> valid clue.Since this is PRD we

RE: Application hanging on Tomcat 7.0.54

2018-09-26 Thread Louis Zipes
Problem just re-occurred and so I was able to at least get a JSTACK  (I assume 
it was Tomcat since it was the Java using the most memory on the machine).  
Here is the reoccurring message.  I get more hits on but haven't dug through 
all of the Google hits yet (due to multi-tasking) so apologies up front if 
there is a simple answer to this.

"Event_Manager_1413" daemon prio=6 tid=0x24856000 nid=0x40c4 waiting on 
condition [0x42dae000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0005ab45f7b8> (a 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown
 Source)
at java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
- None

> Any comments/suggestions are appreciated!

Your most likely problem is database connection pool mismanagement:
connections aren't properly released and the pool empties. All threads
are left waiting on available database connections which will never be
replenished.

I'm using the ojdbc6.jar if that is what you are referring to or is there a 
better setting somewhere.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, September 26, 2018 3:46 PM
To: users@tomcat.apache.org
Subject: Re: Application hanging on Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 9/26/18 14:42, Louis Zipes wrote:
> Hi all, Tomcat 7.0.54 running on Windows 2012
>
> We are running a third party application on Tomcat and today we
> have intermittently run in issues where the application stops
> working.  The big changes in our system is that we have added more
> end users and we are at year end so of course everyone is hitting
> the system hard. Even if we force a log out of all users and stop
> all background jobs then the application doesn't recover.
>
> We see no active sessions on the database (our application is
> connecting to an Oracle database) and I see no clear error messages
> in either our third party application logs or the Tomcat logs (ex.
> OutofMemory).  When we go to the Windows Task Manager we did not
> see the machine's Memory max'd out but admittedly I didn't look at
> the Java session to see if was reaching its Heap Max.  The only
> thing that we noticed was that TCP connections went down right
> after the restart.  I did open up Jconsole under Java and I did
> force a garbage collection but that didn't seem to help.
>
> We do have an Oracle Grid Control and we did get an alert in
> regards to Metric: [HTTP Transaction] Perceived Time per Page going
> past thresholds but not sure if that was just an old alert with and
> old range that was set up a long time ago or is a really valid
> clue.Since this is PRD we had to get it back up and running so
> all I did was increase the Tomcat Xmx Heap size and restarted.  I'm
> not really confident that is the solution since as mentioned you
> tend to see a clear out of memory error if it was too small.
>
> So a few questions:
>
>
> 1) Does this sound like a known issue with this earlier version
> of Tomcat?

No.

> 2) Should I turn up any logging on Tomcat and if so which
> ones?

Not yet.

> 3) We didn't do a JSTACK dump while it was happening.  Would
> that have been useful?

Absolutely.

> 4) Do we need to play around with MaxThreads and/or
> MaxConnections.  We do have maxThreads in our server.mxl but in DEV
> when we turned it down to a value = 5  hoping to overwhelm it
> nothing bad happened.

Don't change anything, yet.

> Once again, we are limited to what we could do and collect since it
> was PRD and we needed to restart it.  We restarted the Tomcat
> service and everything is processing fine for right now.  I will
> note that that we did have that bad Windows patch that prevented it
> from stopping and starting cleanly
> (https://stackoverflow.com/questions/51498291/tomcat-lockup-on-shutdow
n)
> but we have taken the break fix patch and the daily restarts seem
> to be fine since then.
>
> Any comments/suggestions are appreciated!

Your most likely problem is database connection pool mismanagement:
connections aren't properly released and the pool empties. All threads
are left waiting on available database connections which will never be
replenished.

- -

Application hanging on Tomcat 7.0.54

2018-09-26 Thread Louis Zipes
Hi all,
Tomcat 7.0.54 running on Windows 2012

We are running a third party application on Tomcat and today we have 
intermittently run in issues where the application stops working.  The big 
changes in our system is that we have added more end users and we are at year 
end so of course everyone is hitting the system hard. Even if we force a log 
out of all users and stop all background jobs then the application doesn't 
recover.

We see no active sessions on the database (our application is connecting to an 
Oracle database) and I see no clear error messages in either our third party 
application logs or the Tomcat logs (ex. OutofMemory).  When we go to the 
Windows Task Manager we did not see the machine's Memory max'd out but 
admittedly I didn't look at the Java session to see if was reaching its Heap 
Max.  The only thing that we noticed was that TCP connections went down right 
after the restart.  I did open up Jconsole under Java and I did force a garbage 
collection but that didn't seem to help.

We do have an Oracle Grid Control and we did get an alert in regards to Metric: 
[HTTP Transaction] Perceived Time per Page going past thresholds but not sure 
if that was just an old alert with and old range that was set up a long time 
ago or is a really valid clue.Since this is PRD we had to get it back up 
and running so all I did was increase the Tomcat Xmx Heap size and restarted.  
I'm not really confident that is the solution since as mentioned you tend to 
see a clear out of memory error if it was too small.

So a few questions:


1) Does this sound like a known issue with this earlier version of Tomcat?

2) Should I turn up any logging on Tomcat and if so which ones?

3) We didn't do a JSTACK dump while it was happening.  Would that have been 
useful?

4) Do we need to play around with MaxThreads and/or MaxConnections.  We do 
have maxThreads in our server.mxl but in DEV when we turned it down to a value 
= 5  hoping to overwhelm it nothing bad happened.

Once again, we are limited to what we could do and collect since it was PRD and 
we needed to restart it.  We restarted the Tomcat service and everything is 
processing fine for right now.  I will note that that we did have that bad 
Windows patch that prevented it from stopping and starting cleanly  
(https://stackoverflow.com/questions/51498291/tomcat-lockup-on-shutdown) but we 
have taken the break fix patch and the daily restarts seem to be fine since 
then.

Any comments/suggestions are appreciated!

Thanks, Louis




LOUIS ZIPES
SOFTWARE DEVELOPER ANALYST IV
O: 781-418-3257
louis.zi...@keurig.com<mailto:louis.zi...@keurig.com>
Keurig Dr Pepper
Visit us at www.KeurigDrPepper.com<http://www.keurigdrpepper.com/>


---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


Re: tomcat manager gui hangs on web-app reload for one web-app not others

2018-09-13 Thread Louis Zipes
Also any Microsoft patch differences between the working and non working 
environments and beware of the issue with a patch that was released recently 
and how it affects ports.

> On Sep 13, 2018, at 6:36 PM, Mark Thomas  wrote:
>
> - - - external message, proceed with caution - - -
>
>
>> On 13/09/18 21:14, Bill Harrelson wrote:
>> Tomcat 8.0.14, Java 1.8.0_91. I've looked through StackOverflow and
>> searched the archives and can't figure this out. We've been running
>> tomcat, various versions for about 15 years, always using the
>> manager-gui to control hosts. We have one tomcat instance running 8
>> hosts, where the manager-gui works fine for all but one of them. I've
>> compared /conf/Catalina/WEBAPPname/manager.xml with others that are
>> working and they are identical. I've compared the directory name with
>> the name in server.xml and it's identical. Behavior - when I start the
>> manager-gui for that web-app, it logs in and starts fine. I can see
>> sessions, I can see Server Status, etc.  all seems to work, except: -
>> if I click on Reload or Stop, it just sits and spins and eventually
>> times out. Every other host manager gui gets an immediate tab name
>> update, then completes, changing the url. This one web-app does none of
>> that. When this happens there are no entries in the catalina log, the
>> tomcat stderror log, or the web-app access log I can't figure out where
>> to look next. Any help would be appreciated. Thanks. It's a test server
>> and having to restart all of tomcat to change the test configuration is
>> slowing work way down. Bill
>
> Take 3 thread dumps ~5 seconds apart. Take a look for threads that pass
> through org.apache.catalina.manager.*
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: tomcat manager gui hangs on web-app reload for one web-app not others

2018-09-13 Thread Louis Zipes
What Operating System is Tomcat running on?

-Original Message-
From: Bill Harrelson [mailto:bill.harrel...@accordare.com]
Sent: Thursday, September 13, 2018 4:14 PM
To: users@tomcat.apache.org
Subject: tomcat manager gui hangs on web-app reload for one web-app not others

- - - external message, proceed with caution - - -


Tomcat 8.0.14, Java 1.8.0_91. I've looked through StackOverflow and
searched the archives and can't figure this out. We've been running
tomcat, various versions for about 15 years, always using the
manager-gui to control hosts. We have one tomcat instance running 8
hosts, where the manager-gui works fine for all but one of them. I've
compared /conf/Catalina/WEBAPPname/manager.xml with others that are
working and they are identical. I've compared the directory name with
the name in server.xml and it's identical. Behavior - when I start the
manager-gui for that web-app, it logs in and starts fine. I can see
sessions, I can see Server Status, etc.  all seems to work, except: -
if I click on Reload or Stop, it just sits and spins and eventually
times out. Every other host manager gui gets an immediate tab name
update, then completes, changing the url. This one web-app does none of
that. When this happens there are no entries in the catalina log, the
tomcat stderror log, or the web-app access log I can't figure out where
to look next. Any help would be appreciated. Thanks. It's a test server
and having to restart all of tomcat to change the test configuration is
slowing work way down. Bill

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Tomcat Manager weirdness on a Google Compute instance

2018-09-06 Thread Louis Zipes
I discovered that somehow, the "max-file-size" and
> "max-request-size" in manager/WEB-INF/web.xml had reverted from our
> standard setting of 500M, to the factory setting of 50M.

Does the file show a modified date/time that could point to at least a timing 
for the action?

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Thursday, September 06, 2018 1:41 PM
To: Tomcat Users List
Subject: Re: Tomcat Manager weirdness on a Google Compute instance

- - - external message, proceed with caution - - -


On 06/09/18 18:32, James H. H. Lampert wrote:
> (cross-posted to the gce-discussion Google group)
>
> Ladies and Gentlemen:
>
> I just experienced something very odd.
>
> It seems that this morning, when I tried to upload a WAR file to the
> prototype instance for one of my instance groups, I kept repeatedly
> hitting a brick wall: as soon as the upload passed the 2% mark, it would
> abort, and I'd get a "Connection reset" error page.
>
> After some troubleshooting, following the Sherlock Holmes axiom (once
> you eliminate the impossible, whatever remains, however unlikely, must
> be true), I discovered that somehow, the "max-file-size" and
> "max-request-size" in manager/WEB-INF/web.xml had reverted from our
> standard setting of 500M, to the factory setting of 50M.
>
> And I found that the same had happened with the prototype instance for
> another instance group.
>
> Can anybody shed any light on this? Some sort of automatic update?

Definitely not from any sort of automatic update on the Tomcat side.

Mark

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: websocket endpoints not released

2018-09-05 Thread Louis Zipes
Same behavior with Internet Explorer?  I know that in general, Chrome tabs act 
as the same session if you open more than one (at least with my application 
running on Tomcat)

-Original Message-
From: Johan Compagner [mailto:jcompag...@servoy.com]
Sent: Wednesday, September 05, 2018 3:42 AM
To: Tomcat Users List
Subject: Re: websocket endpoints not released

- - - external message, proceed with caution - - -


If a user refreshes the browser then the current ws is always closed and a
new one is opened

Op za 1 sep. 2018 02:38 schreef Alex O'Ree :

> I ran into a strange issue today. Running tomcat 8.5 with a websocket
> endpoint + some javascript to wire up a browser to the socket. All works as
> normal, however sometimes if the user refreshes the browser, it seems as if
> second web socket is opened by the browser. This leads to the user seeing
> duplicate messages which can be confusing. I do have code on the page for
> navigation links to close the socket but i'm thinking i haven't handled all
> cases. My assumption was that a full browser reload would trigger any open
> websockets to close, but apparently they don't (at least with chrome). Has
> anyone else ran into a similar issue?
>
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Tomcat service gets stuck

2018-08-22 Thread Louis Zipes
Hi Bab,
I assume you mean it is getting stuck with a Windows service or not true?

Can you please share logs with the specific error you are seeing.

Thanks, Louis

From: Bab Alemzadeh [mailto:b...@eyequestion.nl]
Sent: Wednesday, August 22, 2018 9:16 AM
To: users@tomcat.apache.org
Subject: Tomcat service gets stuck


- - - external message, proceed with caution - - -

Hi,

I have a problem with tomcat 8.5.20 and 8.5.32.
When I stop the service the PROCESS gets stuck on a specific memory usage.
I cannot even end the task, I have to restart the server.
If I just restart the service, it will create an additional process. The other 
process will remain stuck at the exact same memory usage.
I am using Tomcat on a Citrix environment.

Can you please advice?

Thank you,

[cid:ii_jl29bgh80_165574f2af9ff475]


--
With kind regards/Met vriendelijke groeten,

Bab Alemzadeh
System Administrator

EyeQuestion Software (Logic8 B.V.)
The Netherlands
Tel.: 0031628735930
[Image removed by sender. 
EQ]
  [Image removed by sender. EQT] 


Logic8 B.V. - Aamsestraat 90D - PO Box 206 - NL-6660 AE - Elst(Gld) - The 
Netherlands
The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual or 
entity to whom it is addressed and others authorized to receive it. If you are 
not the intended recipient you are hereby (a): notified that any disclosure, 
copying, distribution or taking any action with respect to the content of this 
information is strictly prohibited and may be unlawful, and (b): kindly 
requested to inform the sender immediately and destroy any copies.
Logic8 does neither accept any responsibility and/or liability for the improper 
and incomplete transmission of the information contained in this communication 
nor for any delay in its receipt.

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: how to prevent user access to JSP pages?

2018-08-16 Thread Louis Zipes
Maybe I'm not fully understanding the request but can't you create a Security 
Folder and list out only the JSPs that you want to allow the users access to?  
My application is a third party application so I didn't develop it but they use 
a folder that has a list of .jsps that I can access so I assume they have set 
it up in the code.

Or am I just telling you the end state that you want to achieve without 
actually coding suggesting any coding for you?

Thanks, Louis

-Original Message-
From: David Wall [mailto:d.w...@computer.org]
Sent: Thursday, August 16, 2018 2:27 PM
To: users@tomcat.apache.org
Subject: Re: how to prevent user access to JSP pages?

- - - external message, proceed with caution - - -


I'll be curious to see the answers.

JSPs are servlets.

For us, the common way would be for your non-JSP servlets to
authenticate the request (and save the results in the request), and then
your JSPs can check if the request has been authenticated before
progressing further.  Of course, if it's just a login check, you can
save the results of the authentication in the session, and when missing,
redirect to your login.


On 8/16/18 10:19 AM, Berneburg, Cris J. - US wrote:
> Due to security concerns and general fussiness on my part, I'd like to 
> prevent users from requesting JSP pages directly, except for the login page.  
> I want all requests to be handled by servlets.  That way I can legitimately 
> claim that all requests are being validated, input scrubbed, JSP's cannot be 
> taken advantage of w/o their servlet chaperones being present, etc.
>
> a. One way I read is by adding a  for each folder.  One 
> use case is for JSP include files.  That looks possible but makes it seem 
> like these are exceptions and not the rule.  I want "deny, deny, deny" to be 
> the default and the one or 2 allowable JSP pages to be the exception.
>
> b. Another way mentioned is by having most of the JSP files under the WEB-INF 
> folder.  That way the users don't have access to the JSP's but the servlets 
> do.  My understanding is a little wobbly here, because I can't conceptualize 
> the virtual path for files under WEB-INF when sending a response.  (See line 
> of code below.)  Also, that would require moving most of the JSP files.
>
>> request.getRequestDispatcher("folder/file.jsp"); // what about WEB-INF?
> Is there a "smart" way of doing this?  Perhaps it would have been prudent to 
> organize the JSP folders "properly" in the first place, but we're way beyond 
> that now.
>
> Got any comments, suggestions, advice?
>
> Thanks.  :-)
>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>
>


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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-15 Thread Louis Zipes
One correction.  I meant to say that I'm using 8.5 (put my zero in the wrong 
place) and yes, looking at the GUI for the Tomcat8w in the 'Start' and 'Stop' 
tabs it does indeed say JVM and it runs with no 32 bit error message like the 
packaged Tomcat 7.0.54 that came packaged with my third party app.

Thanks again.  There are a lot of articles on Stack Exchange that would benefit 
from this additional information!

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, August 14, 2018 6:41 PM
To: users@tomcat.apache.org
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 8/14/18 3:28 PM, Louis Zipes wrote:
> Hi all, Just wanted to circle back.  There was an early comment
> (maybe even in the first response to my question/problem) where
> someone mentioned that my set up (Running Tomcat as a Windows
> Service and  putting the JMX parameters directly in the
> Tomcat7.0.54 GUI in the Java tab) SHOULD work and should startup
> and shutdown gracefully  BUT that if it doesn't then try one of the
> of the later versions of Tomcat.
>
> I did finally get a chance to try Tomcat 8.0.5X and it does seem to
> work with no other configuration changes.  I can access JMX
> (JConsole) and start and shut down the Windows Service running
> Tomcat with no issues.   Although, now my problem is that my third
> party application, that is running  doesn't work,  but that is not
> a problem for this mailing list.
>
> So I think we can say that in the end the upgrade to a higher
> version resolved the issue.   Thank you to all that contributed
> input!

It's very possible that, if you used the service-installer, it simply
created a new service that uses the "jvm" launch-strategy.

I'd be interested to see if that's the case.

Before you spend a lot of time tracking-down the application
incompatabilities with 8.0.x, you might want to upgrade to 9.0.x or
8.5.x and start there. Tomcat 8.0.x has reached EOL so it's probably a
waste of your time to test against it.

Hope that helps,
- -chris

> -Original Message- From: André Warnier (tomcat)
> [mailto:a...@ice-sa.com] Sent: Thursday, August 09, 2018 12:40 PM To:
> users@tomcat.apache.org Subject: Re: Question about setting
> CATALINA_OPTS when starting Tomcat using a Windows Service in
> Tomcat 7.0.54
>
> - - - external message, proceed with caution - - -
>
>
> Maybe it is time here to quote Arthur Clarke's 3rd law : "Any
> sufficiently advanced technology is indistinguishable from magic"
> (See : https://en.wikipedia.org/wiki/Clarke%27s_three_laws)
>
> The process by which Tomcat is started and/or stopped -
> particularly under Windows and as a Service - is not very clear in
> the on-line documentation. Neither is it it very easy to write a
> comprehensive and accurate documentation, because the thing has
> gotten to a point where, for mere mortals, it is really quite
> complicated. (Have a look at bin/catalina.bat to get an idea).
>
> So let me give you some overall pointers (some of them quite basic,
> I apologise), and maybe in there somewhere, you'll find wat you are
> missing to complete the picture and do what you want to do.
>
> 1) Tomcat is a compiled java application, in java bytecode.  To run
> this bytecode, you need a JVM. The JVM is machine-executable code,
> so to run tomcat, you run a JVM and tell it to run the tomcat
> bytecode. 2) the java JVM for Windows is not very good at running
> as a Windows Service (it does not handle the appropriate Windows
> "signals" etc.). To solve this, when you want to run tomcat as a
> Windows Service (or rather - see above - run the JVM as a Windows
> Service), you actually run a specialised "wrapper program" which
> does work well as a Windows Service, and you ask this wrapper to
> start the JVM which runs tomcat. To make matters a bit more
> confusing (or maybe, for some, clearer), this generic "Windows
> Service JVM wrapper" is renamed to "tomcatV.exe" (where V is the
> tomcat version, so for tomcat 9, the program is called
> tomcat9.exe). 3) the wrapper program, when it starts the JVM, has
> to know which command-line switches it should pass to it.  For the
> Windows Service flavor of tomcat, these parameters are stored in a
> number of special keys in the Windows Registry, and that is where
> the wrapper picks them up, before starting the JVM. 4) To make it
> easier to set and edit these JVM command-line parameters, tomcat
> provides another Windows executable program - a specialised GUI
> Registry Editor - which is also renamed according to the tomcat
>

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-14 Thread Louis Zipes
nstance of tomcat actually means running a 
separate
instance of the JVM which runs tomcat.

Now armed with all the above knowledge, and with the dialog window offered by 
the
tomcat9w.exe program, it is relatively easy to figure out what happens (or at 
least what
may happen in your case, in my modest non-java-expert opinion).

Looking only at the last 3 tabs of that window (Java / Startup / Shutdown), one 
can figure
out that :
- the "java" tab contains the path of the JVM to be started, and the 
command-line
parameters that will be passed to that JVM
- the "Startup" tab contains the java class that the JVM should invoke at the 
start of
tomcat, and the argument ("start") to pass into that initial call.
- the "Shutdown" tab contains the java class that the JVM should invoke to stop 
an
already-running tomcat, and the argument ("stop") to pass into that initial 
call.
(Thus triggering the code in (7) above).

And I believe that, in the particular case of Tomcat being run as a Windows 
Service, here
may be the origin of the problem which you are encountering : the "Java" tab 
lists
command-line options that are *common* to both the JVM which starts tomcat, and 
to the
(separate) JVM which stops tomcat.  There is only one set of JVM options, for 
both cases.
Which means that if, in these JVM command-line options, you pass it one that 
tells the JVM
to open some extra listening port (which you do to enable JMX), then this will 
happen both
when a JVM is started because tomcat is being started, and when a JVM is 
started because
tomcat is being stopped.
And of course the second one will fail, because the first one has already 
opened that port.

(Note that this will happen no matter which level of indirection you build into 
the
Registry JVM parameters.)

Why does that happen only with that JMX port, and not with the other listening 
ports that
tomcat opens ?
Well, that is a question of /when/ these different things happen : the JMX-port
command-line parameter "happens" earlier, because it is something that the JVM 
does,
before it evens starts running tomcat bytecode.
While the other ports that Tomcat opens, happen in the code of tomcat itself, 
when it is
being run. And that tomcat code is smart enough to know that when it is being 
run with the
argument "stop", then it should not open these other ports mentioned in its 
configuration
file.

On the face of it, it seems a bit of an unsolvable issue, unless the tomcat 
Service
wrapper code is changed, to allow for 2 separate sets of JVM parameters (one 
for start,
with the JMX options; and one for stop, without these options).
Or unless something is done in the Tomcat code itself, to allow JMX to be 
started (or not)
from within Tomcat (assuming that's even possible).

Of course, one could also wonder if you really need JMX when you run tomcat in 
production
mode.  If this is only for testing, you could run tomcat in a console, where 
you would not
have the same issue (because you would not have the wrapper with its 
single-minded preset
JVM options).

(Or you could switch to Linux ;-))

On 09.08.2018 02:06, Daniel Savard wrote:
> Le mer. 8 août 2018 à 12:08, Louis Zipes  a écrit :
>
>>
>> Hi Calder,
>> I can successfully start up as a Windows service and get JMX working BUT
>> my problem is that Service doesn't stop cleanly (just repeating that
>> problem in case it wasn't made clear).  It says the PORT is already in use
>> which led me to try to use Catalina_Opts as per the suggestions on the
>> internet.
>>
>> Port already in use: 8008; nested exception is:
>> java.net.BindException: Address already in use: JVM_Bind
>>
>> If you were able to get JMX working and you can start AND stop the Tomcat
>> service cleanly, do you mind sharing me your 'scrubbed'  Java tab contents
>> as I can seem to get the right combination to get it to Start and Stop the
>> service.
>>
>> Thanks, Louis
>>
>>
>>
> Louis,
>
> I believe you need to understand a bit more how things are working with
> Java and the JVM. The -D options are pretty straight forward for anyone
> knowing how you define properties to the JVM on the command line. I already
> told you everything you need to know to setup properly your Tomcat. Since
> you were the one talking about CATALINA_OPTS I assumed you did know where
> and how to setup the variable for your installation. Otherwise, just go in
> the setup utility for Tomcat on Windows and put the
> -Dcom.sun.management.conf.file=${catalina.base}/conf/abc.def entry there
> without the CATALINA_OPTS= stanza since this one's intent is to set an
> environment variable for the process to pick while the former is passing
> directly the property to the JVM from the Tomcat Windows Setup dialog.
> There

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-10 Thread Louis Zipes
the JVM which runs tomcat.

Now armed with all the above knowledge, and with the dialog window offered by 
the
tomcat9w.exe program, it is relatively easy to figure out what happens (or at 
least what
may happen in your case, in my modest non-java-expert opinion).

Looking only at the last 3 tabs of that window (Java / Startup / Shutdown), one 
can figure
out that :
- the "java" tab contains the path of the JVM to be started, and the 
command-line
parameters that will be passed to that JVM
- the "Startup" tab contains the java class that the JVM should invoke at the 
start of
tomcat, and the argument ("start") to pass into that initial call.
- the "Shutdown" tab contains the java class that the JVM should invoke to stop 
an
already-running tomcat, and the argument ("stop") to pass into that initial 
call.
(Thus triggering the code in (7) above).

And I believe that, in the particular case of Tomcat being run as a Windows 
Service, here
may be the origin of the problem which you are encountering : the "Java" tab 
lists
command-line options that are *common* to both the JVM which starts tomcat, and 
to the
(separate) JVM which stops tomcat.  There is only one set of JVM options, for 
both cases.
Which means that if, in these JVM command-line options, you pass it one that 
tells the JVM
to open some extra listening port (which you do to enable JMX), then this will 
happen both
when a JVM is started because tomcat is being started, and when a JVM is 
started because
tomcat is being stopped.
And of course the second one will fail, because the first one has already 
opened that port.

(Note that this will happen no matter which level of indirection you build into 
the
Registry JVM parameters.)

Why does that happen only with that JMX port, and not with the other listening 
ports that
tomcat opens ?
Well, that is a question of /when/ these different things happen : the JMX-port
command-line parameter "happens" earlier, because it is something that the JVM 
does,
before it evens starts running tomcat bytecode.
While the other ports that Tomcat opens, happen in the code of tomcat itself, 
when it is
being run. And that tomcat code is smart enough to know that when it is being 
run with the
argument "stop", then it should not open these other ports mentioned in its 
configuration
file.

On the face of it, it seems a bit of an unsolvable issue, unless the tomcat 
Service
wrapper code is changed, to allow for 2 separate sets of JVM parameters (one 
for start,
with the JMX options; and one for stop, without these options).
Or unless something is done in the Tomcat code itself, to allow JMX to be 
started (or not)
from within Tomcat (assuming that's even possible).

Of course, one could also wonder if you really need JMX when you run tomcat in 
production
mode.  If this is only for testing, you could run tomcat in a console, where 
you would not
have the same issue (because you would not have the wrapper with its 
single-minded preset
JVM options).

(Or you could switch to Linux ;-))

On 09.08.2018 02:06, Daniel Savard wrote:
> Le mer. 8 août 2018 à 12:08, Louis Zipes  a écrit :
>
>>
>> Hi Calder,
>> I can successfully start up as a Windows service and get JMX working BUT
>> my problem is that Service doesn't stop cleanly (just repeating that
>> problem in case it wasn't made clear).  It says the PORT is already in use
>> which led me to try to use Catalina_Opts as per the suggestions on the
>> internet.
>>
>> Port already in use: 8008; nested exception is:
>> java.net.BindException: Address already in use: JVM_Bind
>>
>> If you were able to get JMX working and you can start AND stop the Tomcat
>> service cleanly, do you mind sharing me your 'scrubbed'  Java tab contents
>> as I can seem to get the right combination to get it to Start and Stop the
>> service.
>>
>> Thanks, Louis
>>
>>
>>
> Louis,
>
> I believe you need to understand a bit more how things are working with
> Java and the JVM. The -D options are pretty straight forward for anyone
> knowing how you define properties to the JVM on the command line. I already
> told you everything you need to know to setup properly your Tomcat. Since
> you were the one talking about CATALINA_OPTS I assumed you did know where
> and how to setup the variable for your installation. Otherwise, just go in
> the setup utility for Tomcat on Windows and put the
> -Dcom.sun.management.conf.file=${catalina.base}/conf/abc.def entry there
> without the CATALINA_OPTS= stanza since this one's intent is to set an
> environment variable for the process to pick while the former is passing
> directly the property to the JVM from the Tomcat Windows Setup dialog.
> There is many ways to do things. Bottom line,

RE: [OT] Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-09 Thread Louis Zipes
Oh! André, if you aren't using JMX in production, you are missing-out
on a wealth of monitoring information about your JVM(s).

But rather than using the JMX protocol, I would recommend using
Tomcat's JMXProxyServlet -- a part of the Manager application. That
allows you to make JMX queries over HTTP, and you don't have to
mess-around with Java's JMX-protocol configuration and ugly (and
lacking) authentication capabilities.

>> Just this moment we had a mystery 'hang' with my Tomcat service in PRD that 
>> required a Service Restart.  If I had JMX enabled then I might have been 
>> able to get some more information.  We just onboarded a bunch of new users 
>> but the Tomcat logs themselves don't clearly show memory issues so would 
>> have been nice to have that extra layer of logging that JMX would have given 
>> me to see if I could have figured it out.

Still working on the other suggestions that people have given over the last 24 
hours on trying to get it to working.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Thursday, August 09, 2018 1:57 PM
To: users@tomcat.apache.org
Subject: Re: [OT] Question about setting CATALINA_OPTS when starting Tomcat 
using a Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 8/9/18 12:39 PM, André Warnier (tomcat) wrote:
> 7) a helpful feature of tomcat, is that it itself provides code to
> connect to localhost port 8005 and send that shutdown string, so
> that one does not have to write its own separate program to do
> that. The bit that is a bit confusing about this feature however,
> is that in order to use that code, one of course needs to start up
> another separate instance of tomcat, just to run that code and
> actually stop the "real" running tomcat.

This should really not be a requirement. Launching a JVM just to parse
some XML and send a single TCP packet is kind of wasteful. The problem
is that Tomcat can't rely on any particular utility programs being
installed on the server in order to do something possibly more efficient
.

I could whip-up something using grep, curl, and plain-old sh for
example that would work on most *NIX systems, but windows users
wouldn't benefit from that kind of thing.

I was very surprised to find out that Tomcat's Windows service-runner
doesn't have separate "launch parameters" versus "stop parameters"
(i.e. the equivalent of CATALINA_OPTS versus JAVA_OPTS for the
script-based service-management). I guess that's just a (another) pill
you'll have to swallow if you want to run on Windows.

> Of course, one could also wonder if you really need JMX when you
> run tomcat in production mode.  If this is only for testing, you
> could run tomcat in a console, where you would not have the same
> issue (because you would not have the wrapper with its
> single-minded preset JVM options).

Oh! André, if you aren't using JMX in production, you are missing-out
on a wealth of monitoring information about your JVM(s).

But rather than using the JMX protocol, I would recommend using
Tomcat's JMXProxyServlet -- a part of the Manager application. That
allows you to make JMX queries over HTTP, and you don't have to
mess-around with Java's JMX-protocol configuration and ugly (and
lacking) authentication capabilities.

> (Or you could switch to Linux ;-))

A wise choice IMHO, if you have the expertise to manage it. I wouldn't
recommend that a Windows shop just switch to Linux any time soon. But
if you have people very familiar with *NIX deployments, I would
recommend keeping Windows on desktops and leave the servers running
some kind of *NIX.

- -chris

> On 09.08.2018 02:06, Daniel Savard wrote:
>> Le mer. 8 août 2018 à 12:08, Louis Zipes  a
>> écrit :
>>
>>>
>>> Hi Calder, I can successfully start up as a Windows service and
>>> get JMX working BUT my problem is that Service doesn't stop
>>> cleanly (just repeating that problem in case it wasn't made
>>> clear).  It says the PORT is already in use which led me to try
>>> to use Catalina_Opts as per the suggestions on the internet.
>>>
>>> Port already in use: 8008; nested exception is:
>>> java.net.BindException: Address already in use: JVM_Bind
>>>
>>> If you were able to get JMX working and you can start AND stop
>>> the Tomcat service cleanly, do you mind sharing me your
>>> 'scrubbed'  Java tab contents as I can seem to get the right
>>> combination to get it to Start and Stop the service.
>>>
>>> Thanks, Louis
>>>
>>>
>>>
>> Louis,
>>
>> I believe you need to understand a bit more how things are
>> working with Java and the JVM. T

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-09 Thread Louis Zipes
Hi Mark,

You wrote:

1. You see the error you are see because you are using Java mode. Switch to jvm 
mode and all should be well.

>> I'm already using 'C:\Program Files\Java\jdk1.7.0_80\jre\bin\server\jvm.dll' 
>>  in my Java Virtual Machine tab.  I assume that means I'm already in JVM 
>> Mode.  I think I recall when setting up Tomcat last year it wouldn't start 
>> any other way.

2. Finally 7.0.54 is very old. I strongly recommend an upgrade at least to the 
latest 7.0.x release is not 8.5.x/9.0.x

>> I'm going to try that today (or tomorrow depending on how busy it is at 
>> work).  The issue that I might run into is the application that is running 
>> on Tomcat is not my application and I might run into a restriction on how 
>> high of a version I can go to but I will deal with that later if it does 
>> work.

Thank you to all for the continued assistance.  I have a thick skin.   : )

- Louis

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Thursday, August 09, 2018 5:10 AM
To: users@tomcat.apache.org
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


On 09/08/18 01:06, Daniel Savard wrote:

> Louis,
>
> I believe you need to understand a bit more how things are working with
> Java and the JVM.

Actually Daniel, it is you who needs to understand things better.


Louis,

Clearly, when Tomcat is started a new JVM instance is created and it
listens on the configured JMX ports.

The problem is that when Tomcat is stopped another JVM instance is
created (to send the stop message to the first) and that uses the same
configuration. Hence it tries to open the same JMX port and fails
because it is already bound.

If you were running from the command line, the fix would be easy. Put
the JMX options in CATALINA_OPTS and they'd only be used on start but
not stop. (JAVA_OPTS are used on both start and stop).

There is also a simple fix if running as a Windows Service. The Windows
Service wrapper is simply a renamed version Apache Common Daemon. When
running a Java program as a Windows service there are three ways it can
be integrated.

1. jvm. The Windows service wrapper starts and embedded JVM using the
provided parameters and then calls the start method on the appropriate
class. To stop, it calls the stop method on the appropriate class in the
embedded jvm.

2. Java. The Windows service wrapper starts a separate Java process with
the provided parameters. On stop, a second Java process is started using
the same parameters which is expected to communicate with the first
process and stop it.

3. exe. Same as 2 but any executable can be used rather than java.exe.

You see the error you are see because you are using Java mode. Switch to
jvm mode and all should be well.

Finally 7.0.54 is very old. I strongly recommend an upgrade at least to
the latest 7.0.x release is not 8.5.x/9.0.x

Mark

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.

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



RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-08 Thread Louis Zipes

Hi Calder,
I can successfully start up as a Windows service and get JMX working BUT my 
problem is that Service doesn't stop cleanly (just repeating that problem in 
case it wasn't made clear).  It says the PORT is already in use which led me to 
try to use Catalina_Opts as per the suggestions on the internet.

Port already in use: 8008; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind

If you were able to get JMX working and you can start AND stop the Tomcat 
service cleanly, do you mind sharing me your 'scrubbed'  Java tab contents as I 
can seem to get the right combination to get it to Start and Stop the service.

Thanks, Louis

-Original Message-
From: calder [mailto:calder@gmail.com]
Sent: Wednesday, August 08, 2018 12:01 PM
To: Tomcat Users List
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


I configured my "Tomcat as a Service" a couple days ago for remote JMC

a) navigate to Tomcat's "bin" subdir
b) execute: tomcat7w  //ES//"type service name here"
c) go to Java tab
d) add the properties in the "Java Options" text area
e) select OK and restart Tomcat Service


On Wednesday, August 8, 2018, Louis Zipes  wrote:

> Thanks for the assistance!  See my comments below:
>
> >You put this to setenv.bat in your bin directory. If the setenv.bat file
> does not exist, create it
>
> -- My problem throughout this is that I'm starting up my Tomcat using
> Windows service so setenv.bat and catalina.bat seems to be ignored in that
> scenario.   Correct me if I'm wrong but everything on Google mentions this.
>
> >Note that you can also set your properties in CATALINA_OPTS directly,
> i.e. you'd delete the line above in setenv.bat and paste in:
>
> -- When you say 'Set Catalina_Opts directly' do you mean the Environment
> variable  or some other location?
>
> -Original Message-
> From: Marek Czernek [mailto:mczer...@redhat.com]
> Sent: Wednesday, August 08, 2018 9:39 AM
> To: users@tomcat.apache.org
> Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat
> using a Windows Service in Tomcat 7.0.54
>
> - - - external message, proceed with caution - - -
>
>
> Hi Louis,
>
> try the following format:
>
> set
> CATALINA_OPTS="-Dcom.sun.management.conf.file=%
> CATALINA_BASE%\conf\abc.efg"
>
> In the above, %CATALINA_BASE% is a bariable that should be resolved by
> Tomcat. If it is not, I made a mistake in the variable name, but I think
> it should work (you could also try %catalina.base%).
>
> You put this to setenv.bat in your bin directory. If the setenv.bat file
> does not exist, create it. Note that you can also set your properties in
> CATALINA_OPTS directly, i.e. you'd delete the line above in setenv.bat
> and paste in:
>
> set CATALINA_OPTS="-Dproperty1=value1 -Dproperty2=value2" etc. When you
> start Tomcat, it should read all the properties in CATALINA_OPTS and
> show you the properties at the beginning of the log.
>
> Hope this helps.
>
> On 08/08/2018 03:10 PM, Louis Zipes wrote:
> > Hi Daniel,
> > I apologize if maybe it is my lack of knowledge but I don't think I
> understand the actual way to write the line 'Set Catalina_Opts ='  in this
> management file that I'm going to reference in the Java window/tabe in the
> Tomcat 7w GUI.
> >
> > In my management.properties file (in the /CONF folder which is where
> also the server.xml file sits) I have the following
> >
> > com.sun.management.jmxremote
> > com.sun.management.jmxremote.port=8008
> > com.sun.management.jmxremote.authenticate=false
> > com.sun.management.jmxremote.ssl=false
> > java.rmi.server.hostname=
> >
> > How do I set these as my CATALINA_OPTS values?  I have tried various
> 'SET CATALINA_OPTS...' options but I can't seem to write it the correct way
> for Windows.  I have even tried to set the CATALINA_OPTS option, pointing
> to the management.properties file in the Java tab in the Tomcat7w GUI but I
> get an error that the Class can't be found so I must be writing it wrong.
> >
> > Thanks for the continued assistance.
> >
> > - Louis
> >
> >
> >
> > -Original Message-
> > From: Daniel Savard [mailto:daniel.sav...@gmail.com]
> > Sent: Friday, August 03, 2018 11:57 PM
> > To: Tomcat Users List
> > Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat
> using a Windows Service in Tomcat 7.0.54
> >
> > - - - external message, proceed with caution - - -
> >
> >
> > Le ven. 3 août 2018 à 12:03, Louis Zipes  a écrit
> :

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-08 Thread Louis Zipes
Thanks for the assistance!  See my comments below:

>You put this to setenv.bat in your bin directory. If the setenv.bat file does 
>not exist, create it

-- My problem throughout this is that I'm starting up my Tomcat using Windows 
service so setenv.bat and catalina.bat seems to be ignored in that scenario.   
Correct me if I'm wrong but everything on Google mentions this.

>Note that you can also set your properties in CATALINA_OPTS directly, i.e. 
>you'd delete the line above in setenv.bat and paste in:

-- When you say 'Set Catalina_Opts directly' do you mean the Environment 
variable  or some other location?

-Original Message-
From: Marek Czernek [mailto:mczer...@redhat.com]
Sent: Wednesday, August 08, 2018 9:39 AM
To: users@tomcat.apache.org
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


Hi Louis,

try the following format:

set
CATALINA_OPTS="-Dcom.sun.management.conf.file=%CATALINA_BASE%\conf\abc.efg"

In the above, %CATALINA_BASE% is a bariable that should be resolved by
Tomcat. If it is not, I made a mistake in the variable name, but I think
it should work (you could also try %catalina.base%).

You put this to setenv.bat in your bin directory. If the setenv.bat file
does not exist, create it. Note that you can also set your properties in
CATALINA_OPTS directly, i.e. you'd delete the line above in setenv.bat
and paste in:

set CATALINA_OPTS="-Dproperty1=value1 -Dproperty2=value2" etc. When you
start Tomcat, it should read all the properties in CATALINA_OPTS and
show you the properties at the beginning of the log.

Hope this helps.

On 08/08/2018 03:10 PM, Louis Zipes wrote:
> Hi Daniel,
> I apologize if maybe it is my lack of knowledge but I don't think I 
> understand the actual way to write the line 'Set Catalina_Opts ='  in this 
> management file that I'm going to reference in the Java window/tabe in the 
> Tomcat 7w GUI.
>
> In my management.properties file (in the /CONF folder which is where also the 
> server.xml file sits) I have the following
>
> com.sun.management.jmxremote
> com.sun.management.jmxremote.port=8008
> com.sun.management.jmxremote.authenticate=false
> com.sun.management.jmxremote.ssl=false
> java.rmi.server.hostname=
>
> How do I set these as my CATALINA_OPTS values?  I have tried various 'SET 
> CATALINA_OPTS...' options but I can't seem to write it the correct way for 
> Windows.  I have even tried to set the CATALINA_OPTS option, pointing to the 
> management.properties file in the Java tab in the Tomcat7w GUI but I get an 
> error that the Class can't be found so I must be writing it wrong.
>
> Thanks for the continued assistance.
>
> - Louis
>
>
>
> -Original Message-
> From: Daniel Savard [mailto:daniel.sav...@gmail.com]
> Sent: Friday, August 03, 2018 11:57 PM
> To: Tomcat Users List
> Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using 
> a Windows Service in Tomcat 7.0.54
>
> - - - external message, proceed with caution - - -
>
>
> Le ven. 3 août 2018 à 12:03, Louis Zipes  a écrit :
>
>> Good catch!!  I still had 'd' in front of my lines so once I removed those
>> JMX starts up using Management.properties file but as you mentioned it
>> doesn't really change the behavior at all and the Service still doesn't
>> stop cleanly.  So is there a way to force the JMX to use CATALINA_OPTS in
>> this file.  Something like SET CATALINA_OPTS = 'JMX settings'?
>>
>> That is if the JMX running on CATALINA_OPTS is indeed the answer.
>> Basically, trying to mimic the setenv file that is not used by the Window
>> Service.
>>
>> -Original Message-
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Sent: Friday, August 03, 2018 11:52 AM
>> To: users@tomcat.apache.org
>> Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat
>> using a Windows Service in Tomcat 7.0.54
>>
>> - - - external message, proceed with caution - - -
>>
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Louis,
>>
>> On 8/3/18 11:32 AM, Louis Zipes wrote:
>>> Hi Daniel, I tried your suggestion and while I think it is now
>>> acknowledging the existence of the management.properties file
>>> (Windows Service wouldn't start if I purposely misspelled
>>> 'managemenX.properties') but it doesn't seem to be actually working
>>> (JMX can't connect).
>>>
>>> What I did:
>>>
>>> I created a copy of an existing logging.properties file already in
>>> the CONF folder, renamed it management.properties, and removed all
>

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-08 Thread Louis Zipes
Hi Daniel,
I apologize if maybe it is my lack of knowledge but I don't think I understand 
the actual way to write the line 'Set Catalina_Opts ='  in this management file 
that I'm going to reference in the Java window/tabe in the Tomcat 7w GUI.

In my management.properties file (in the /CONF folder which is where also the 
server.xml file sits) I have the following

com.sun.management.jmxremote
com.sun.management.jmxremote.port=8008
com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false
java.rmi.server.hostname=

How do I set these as my CATALINA_OPTS values?  I have tried various 'SET 
CATALINA_OPTS...' options but I can't seem to write it the correct way for 
Windows.  I have even tried to set the CATALINA_OPTS option, pointing to the 
management.properties file in the Java tab in the Tomcat7w GUI but I get an 
error that the Class can't be found so I must be writing it wrong.

Thanks for the continued assistance.

- Louis



-Original Message-
From: Daniel Savard [mailto:daniel.sav...@gmail.com]
Sent: Friday, August 03, 2018 11:57 PM
To: Tomcat Users List
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


Le ven. 3 août 2018 à 12:03, Louis Zipes  a écrit :

> Good catch!!  I still had 'd' in front of my lines so once I removed those
> JMX starts up using Management.properties file but as you mentioned it
> doesn't really change the behavior at all and the Service still doesn't
> stop cleanly.  So is there a way to force the JMX to use CATALINA_OPTS in
> this file.  Something like SET CATALINA_OPTS = 'JMX settings'?
>
> That is if the JMX running on CATALINA_OPTS is indeed the answer.
> Basically, trying to mimic the setenv file that is not used by the Window
> Service.
>
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Friday, August 03, 2018 11:52 AM
> To: users@tomcat.apache.org
> Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat
> using a Windows Service in Tomcat 7.0.54
>
> - - - external message, proceed with caution - - -
>
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Louis,
>
> On 8/3/18 11:32 AM, Louis Zipes wrote:
> > Hi Daniel, I tried your suggestion and while I think it is now
> > acknowledging the existence of the management.properties file
> > (Windows Service wouldn't start if I purposely misspelled
> > 'managemenX.properties') but it doesn't seem to be actually working
> > (JMX can't connect).
> >
> > What I did:
> >
> > I created a copy of an existing logging.properties file already in
> > the CONF folder, renamed it management.properties, and removed all
> > contents of it and put in:
>
> Just FYI, there is nothing magical about an existing properties file.
> It's just a text file with name=value items in it.
>
> > Dcom.sun.management.jmxremote
> > Dcom.sun.management.jmxremote.port=8008
> > Dcom.sun.management.jmxremote.authenticate=false
> > Dcom.sun.management.jmxremote.ssl=false
> > Djava.rmi.server.hostname=
>
> I don't think you want those leading D characters. Is that a
> copy/paste error?
>
> > -Dcom.sun.management.config.file= C:\  > structure>\Tomcat\conf\management.properties
>
> Daniel usually knows what he's talking about, but I'll be surprised if
> Tomcat doesn't fail the same way after making these changes... you are
> just moving the configuration from one place (multiple system
> properties) to another (one system property pointing to another file
> of properties).
>
> - -chris
>

As Christopher said, you this file management.properties can be named
whatever abc.efg would do the same and in that file you have
attribute=value pairs, everything that concerns the com.sun.management.xxx
properties. Then you pass the name of that file as a single option to the
JVM with -Dcom.sun.management.config.file=${catalina.base}/conf/abc.efg and
remove everything else from the CATALINA_OPTS which is in the configuration
file. I strongly suggest to locate this file in the same directory as the
server.xml file and use the ${catalina.base} variable asis and litterally
into the 
CATALINA_OPTS="-Dcom.sun.management.conf.file=${catalina.base}/conf/abc.efg"
definition.

I skipped other configuration files for authentication, in my case I am
authenticating the users against the Active Directory database. So, the
informations I gave for the content of the configuration file is incomplete
and do not necessarily apply to your case, that's why I didn't bother to
put it in my original post. But, you may have to use extra properties for
you particular situation.

Why did I say to put everything in the configur

RE: IIS Connector Not Working

2018-08-06 Thread Louis Zipes
Hi,
The fact that it is working on one machine and not the other then have you 
rules out all of the NON IIS Connector differences (ex. Machine Operating 
Systems, Privileges, etc..)?

- Louis

-Original Message-
From: George S. [mailto:geor...@mhsoftware.com]
Sent: Monday, August 06, 2018 9:51 PM
To: Tomcat Users List
Subject: Re: IIS Connector Not Working

- - - external message, proceed with caution - - -


One more bit of information:

if I go to :

http://hostname/jakarta/

on the working machine, I get a 403-Forbidden.

If I go to the same url on the non-working machine, I get a directory
listing of the files in the directory that the "jakarta" application
points to.



On 8/6/2018 7:38 PM, George S. wrote:
> I'm having a rough time getting the IIS Connector working on a
> specific machine. I'm getting a 404 error when I request a file in my
> Tomcat application. I'm using version 1.2.43 of the ISAPI Redirector
> on Windows Server 2016 with IIS 10.0.
>
> I've carefully checked, and re-checked, and followed the directions. I
> can get it to work on a machine with a scratch install of Microsoft
> Windows Server 2016, but I can't get it to work on another machine.
>
> I'm not getting an isapi_redirect.log file in the
> ${catalina.base}\logs directory.  I've checked and re-checked the
> permissions. I've tried running the "jakarta" application under an App
> pool that runs as "Network Service" and under "DefaultAppPool". For
> DefaultAppPool, I set permissions on the directory for "IIS
> AppPool\DefaultAppPool". In neither case do I get an ISAPI Redirect
> log. I know from experience that not getting an isapi_redirect.log
> file usually indicates a permission problem but I've beaten that
> silly. I've verified my URIWorkerMap.properties and Workers.properties
> files exist as expected.
>
> I tried enabling Windows Tracing for 404 requests, and the log files
> aren't getting created by IIS for the failed request.
>
> Does anyone have any ideas? Is there another way to integrate with IIS
> via reverse proxy?
>
> I would REALLY appreciate any ideas.
>
>

--
George S.
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Tomcat 8.x-9.x + Struts 1.3.x - Applications will get into a state where they won't serve random bunch of static resources, 500 errors

2018-08-06 Thread Louis Zipes
Hi,
Not an answer but just letting you my thinking on where I would look for 
additional error messages that might help tell more of the story.

1) Any additional information in the individual Java Plugin Logs that tell more 
of the story?

2) Can you increase the logging on the Tomcat side to try to capture more of 
the error?

3) What about the SUSE logs themselves?  Do they tell you anything?

Thanks, Louis

-Original Message-
From: Chrifister [mailto:chrifis...@gmail.com]
Sent: Monday, August 06, 2018 11:54 AM
To: users@tomcat.apache.org
Subject: Tomcat 8.x-9.x + Struts 1.3.x - Applications will get into a state 
where they won't serve random bunch of static resources, 500 errors

- - - external message, proceed with caution - - -


Hi,

Our current setup is Tomcat 9.0.8 running SuSE Enterprise. This server is
running a dozen web applications built with Struts 1.3.8 with some newer
Spring applications on the horizon. There is a large user base with some
applications seeing heavy usage. Applications are currently using Java 1.7
and 1.8.

We were originally running Tomcat 7.x but were having issues with perm gen
maxing out very quickly for unknown reasons but possibly related to a buggy
third party "enterprise-grade" reporting Java library. We had to restart
the server nightly to try and keep perm gen from maxing out. Part of the
reason was this third-party library spawned immortal threads that would
prevent an application from unloading and being garbage collected when a
newer build of an application was deployed (the developers behind it never
expected the library would be run on a server with multiple
applications). So we upgraded Tomcat to 8.5.x first and then to 9.x
recently. This fixed the perm gen issue.

Our current issue we are having is that for some unknown reason and after
seemingly random lengths of time, an application will get into a state and
will start having issues which results in failed page loads or pages not
loading correctly. According to Chrome's network tab in developer console,
a random bunch of static resources (javascript, css, images) are returning
500 errors and not being served. Whether the page loads or not depends on
exactly which resources were not returned. Every time you access any page
in that application, another random bunch of resources have 500 errors.
There's no indication in any of Tomcat's log files that an application is
in this state. The application will stay in this unusable state until it is
restarted or the server is restarted.

We've resorted to once again scheduling the server to restart nightly which
has cut down on the frequency of this happening which hints at this being
related to usage, but it is still happening once a week and sometimes more.
The applications that seem to experience this the most are I believe the
more heavily used applications.

No Spring application has experienced this issue on our other servers which
leads me to tentatively say that Spring is not affected and/or is not a
cause of the issue but upgrading all applications to Spring is not feasible
at the moment.

We've tried upgrading Struts in the most frequently affected applications
to 1.3.10 but it did not solve the issue and actually afflicted us with
another issue stemming from a bug in that Struts version. So we had to go
back to 1.3.8.

I spoke with a couple of people in Tomcat's IRC channel and they seemed to
think it was a third-party library or a problem/race condition between the
Struts and Tomcat servlets. While this may be important information, I have
no idea what to do with it.

I'm not sure debugging is a possibility because it's a remote server and I
wouldn't even know what to look for. I also can't allow a production
application to remain in this state for very long.

I can't file a bug report because I can't reproduce it at will and I am
unable to provide thread or heap dumps.

I have a suspicion it may be caused by that third part library although I
don't see how that library would affect Tomcat's serving of static
resources.

This issue has never happened to our test server or our local instances of
tomcat. Since I suspect it's related to usage, this is not surprising.

Any help would be greatly appreciated.

Chris
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-03 Thread Louis Zipes
Good catch!!  I still had 'd' in front of my lines so once I removed those JMX 
starts up using Management.properties file but as you mentioned it doesn't 
really change the behavior at all and the Service still doesn't stop cleanly.  
So is there a way to force the JMX to use CATALINA_OPTS in this file.  
Something like SET CATALINA_OPTS = 'JMX settings'?

That is if the JMX running on CATALINA_OPTS is indeed the answer.  Basically, 
trying to mimic the setenv file that is not used by the Window Service.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, August 03, 2018 11:52 AM
To: users@tomcat.apache.org
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 8/3/18 11:32 AM, Louis Zipes wrote:
> Hi Daniel, I tried your suggestion and while I think it is now
> acknowledging the existence of the management.properties file
> (Windows Service wouldn't start if I purposely misspelled
> 'managemenX.properties') but it doesn't seem to be actually working
> (JMX can't connect).
>
> What I did:
>
> I created a copy of an existing logging.properties file already in
> the CONF folder, renamed it management.properties, and removed all
> contents of it and put in:

Just FYI, there is nothing magical about an existing properties file.
It's just a text file with name=value items in it.

> Dcom.sun.management.jmxremote
> Dcom.sun.management.jmxremote.port=8008
> Dcom.sun.management.jmxremote.authenticate=false
> Dcom.sun.management.jmxremote.ssl=false
> Djava.rmi.server.hostname=

I don't think you want those leading D characters. Is that a
copy/paste error?

> -Dcom.sun.management.config.file= C:\  structure>\Tomcat\conf\management.properties

Daniel usually knows what he's talking about, but I'll be surprised if
Tomcat doesn't fail the same way after making these changes... you are
just moving the configuration from one place (multiple system
properties) to another (one system property pointing to another file
of properties).

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltkejcACgkQHPApP6U8
pFjRPBAAghgmIUA3IBV7qWtk2icUSTOkmF1qd7oFt64pwkitSQmlmJ0FecnDJwVH
OoMCEB9yg1KvtIKMOJ9nHDIgTn7an0iS7wK2MzbKZs4cWMAqpxagS6S2M1AmygNr
pnsig+WTSmO2r5OkcdWM+JE2qmn+oeQecf2E439RIkEcb/OuzTIJLjk0iIVKSOlQ
EihDsVKh+dBvDyDol5RC9k+cxNxNQyYH06ZcOKOTbJCOclMvSUqcqpLesEWnoM5r
Zh1TaOXc40HtcvtBQCda6aOdrQE/qieI4pxtduT0BDGxBnjS2GijitrY1isqVv0k
RnUYGbvGlcI3OHdfUBAkitl0Bhrx24zqDnaFJ73PHuItlP0aqBeH7eSMTwt5AGXg
T7h3PylWdpeL8G2qh1MEdvUCzRKStOHqAYweKnwb0REuNf4YJs6t8n+zRc1sbnkk
bNXidsZlUD5ofxdh9fSVeWKiPnHfEYNz3aDqlavymgN1mKDkNJ+qmZoxctEUdKSo
Gv4/vNhNOHK6Vb7RSYyp2Ac87jxy4DDl+RL5ltv2oDAp1rIoH1EamDzOTMiJtFpk
Sy6EyW8PqWjoLzOBsBC8gH8OdJUNojRkTrl/D+B/dysAEz1tsUw5Kj/4o0HRPvIU
svv56gDNaOPTfMbXQvX4vyykfCAxYKKBouB0zyjp7GAY0+4SAG4=
=LV/k
-END PGP SIGNATURE-

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

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-03 Thread Louis Zipes
Hi Daniel,
I tried your suggestion and while I think it is now acknowledging the existence 
of the management.properties file (Windows Service wouldn't start if I 
purposely misspelled 'managemenX.properties') but it doesn't seem to be 
actually working  (JMX can't connect).

What I did:

I created a copy of an existing logging.properties file already in the CONF 
folder, renamed it management.properties, and removed all contents of it and 
put in:

Dcom.sun.management.jmxremote
Dcom.sun.management.jmxremote.port=8008
Dcom.sun.management.jmxremote.authenticate=false
Dcom.sun.management.jmxremote.ssl=false
Djava.rmi.server.hostname=

And then in the Tomcat7w GUI under the Java tab I added it (last line)

-Dcatalina.home=C:\ \Tomcat
-Dcatalina.base=C:\ \Tomcat
-Djava.endorsed.dirs=C:\ \Tomcat\endorsed
-Djava.io.tmpdir=C:\ \Tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\ \Tomcat\conf\logging.properties
-Dcom.sun.management.config.file= C:\ \Tomcat\conf\management.properties<== new line

But it didn't connect through when opening  up jconsole.exe under C:\Program 
Files\Java\jdk1.7.0_80\bin and I didn't see the PORT being used when I did 
NETSTAT.  Note that I did an ECHO %CATALINA_OPTS% to make sure it wasn't hiding 
somewhere and nothing was returned

Finally, just to confirm that my parameters in the management.properties file 
were correct I add in the contents of it back into the Tomcat7w GUI under the 
Java tab like I had originally set up (JMX does now work BUT my original 
problem of not being able to stop the Service cleanly returns)

-Dcatalina.home=C:\ \Tomcat
-Dcatalina.base=C:\ \Tomcat
-Djava.endorsed.dirs=C:\ \Tomcat\endorsed
-Djava.io.tmpdir=C:\ \Tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\ \Tomcat\conf\logging.properties
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8008
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=

Did I miss something in your instructions?

Thanks, Louis

-Original Message-
From: Daniel Savard [mailto:daniel.sav...@gmail.com]
Sent: Thursday, August 02, 2018 6:15 PM
To: Tomcat Users List
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


In ${Tomcat}/conf create the file management.properties and put your stuff
in this file like:

com.sun.management.jmxremote = true
com.sun.management.jmxremote.port = 9876
com.sun.management.registry.ssl =true
com.sun.management.ssl = true
com.sun.management.ssl.enebled.protocols = TLSv1.2
...

Then, remove your stuff from the CATALINA_OPTS and just point to this file
with
-Dcom.sun.management.config.file=${CATALINA_BASE}/conf/management.properties
and you port in use message will disappear since this configuration will be
handled properly.

Regards,

Le 2 août 2018 3:58 PM, "Louis Zipes"  a écrit :

Hi All,
I'm trying to enable JMX monitoring using Tomcat 7.0.54.  Turning on the
JMX monitoring is not the problem. To do this I added the following to the
Apache Tomcat 7.0 Properties 'JAVA' tab  GUI Window, which opens up when
you run 'TOMCAT7w.exe //ES/', and it works in that JMX can
monitor it.

-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote.port=8555
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=


The problem is that when I go to STOP the Service it gives me the following
error

Error: Exception thrown by the agent : java.rmi.server.ExportException:
Port already in use: 8555; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind


I have to do a hard kill by either restarting the Appserver or doing SC
QUERY which is not realistic

I can find hits on the error message but the answers seem to relate to the
need to set up JMX under CATALINA_OPTS.  My issue is that I'm struggling to
figure out how to set up CATALINA_OPTS that in Windows when starting Tomcat
using a Service.  The solutions I find either are Linux (I'm Windows) or
talks about setting up JMX with a setenv.bat OR catalina.bat files.
However, from my research the catalina.bat and setenv files are ignored
when you use a Windows Service.

So my question is how do I do I set up CATALINA_OPTS parameter in Tomcat
7.0.54 when I'm using a Windows Service?

Thanks, Louis

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and
may contain information that is confidential, proprietary or exempt from
disclosure. If you are not the intended recipient, please contact the
sender immediately. Unauthorized use or distribution is prohibited and may
be unlawful.
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s)

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-02 Thread Louis Zipes
Thanks for the response

>When you say "stop the service" you just mean clicking the "stop service" link 
>in the management snap-in, right?

Correct

>1. You only have a single Tomcat service defined.
>2. It starts up just fine.
> 3. It only fails when trying to stop it.

Correct

> Do you have any opportunities for upgrading to 7.0.latest?

I have a sandbox where I can try that but it might cause issues with the 
application I'm running with Tomcat.  I will try to try this within the next 
week and let you know.



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Thursday, August 02, 2018 5:04 PM
To: users@tomcat.apache.org
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Louis,

On 8/2/18 3:58 PM, Louis Zipes wrote:
> Hi All, I'm trying to enable JMX monitoring using Tomcat 7.0.54.
> Turning on the JMX monitoring is not the problem. To do this I
> added the following to the Apache Tomcat 7.0 Properties 'JAVA' tab
> GUI Window, which opens up when you run 'TOMCAT7w.exe //ES/ name>', and it works in that JMX can monitor it.
>
> -Djava.rmi.server.hostname=localhost
> -Dcom.sun.management.jmxremote.port=8555
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=

Congratulations on getting that working. Sometimes it can be a pain to
get JMX working.

FWIW, I always recommend using the JMX Proxy Servlet[1] because (a)
you don't have to set up a remote-JMX port and (b) deal with the poor
authentication support and (c) launch a whole JVM process just to take
a quick sample.

> The problem is that when I go to STOP the Service it gives me the
> following error
>
> Error: Exception thrown by the agent :
> java.rmi.server.ExportException: Port already in use: 8555; nested
> exception is: java.net.BindException: Address already in use:
> JVM_Bind

Yuck.

When you say "stop the service" you just mean clicking the "stop
service" link in the management snap-in, right?

Hrm.

> I have to do a hard kill by either restarting the Appserver or
> doing SC QUERY which is not realistic
>
> I can find hits on the error message but the answers seem to
> relate to the need to set up JMX under CATALINA_OPTS.

Yeah, that's usually because someone is using the scripts like
catalina.sh (*NIX) or catalina.bat to launch (and stop) Tomcat and
they have used JAVA_OPTS (which are applied to all JVM launches) to
set those options instead of CATALINA_OPTS (which only applies to
starting Tomcat, not to stopping it, etc.).

> My issue is that I'm struggling to figure out how to set up
> CATALINA_OPTS that in Windows when starting Tomcat using a
> Service.

Ignore all that. When using the service, the environment variables are
not relevant (after creating the service).

> The solutions I find either are Linux (I'm Windows) or talks about
> setting up JMX with a setenv.bat OR catalina.bat files.
> However, from my research the catalina.bat and setenv files are
> ignored when you use a Windows Service.
Exactly.

> So my question is how do I do I set up CATALINA_OPTS parameter in
> Tomcat 7.0.54 when I'm using a Windows Service?

I'm surprised it's failing at all, honestly.

Can you confirm the following:

1. You only have a single Tomcat service defined.
2. It starts up just fine.
3. It only fails when trying to stop it.

Do you have any opportunities for upgrading to 7.0.latest?

- -chris

[1]
http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html#Using_the_JMXPro
xyServlet
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltjcd0ACgkQHPApP6U8
pFis3g/+Ll/6m4VYpII6IFgJF+weoMn9EZ/3E9zbmN/00b63l2uKgNL9rX5eFRXH
v+8Mt9HLRy3ve+UXQsCE3dbm0Uw974ujjht6HrTr3dt4uTY6pGU1XtJqxUL4aFXF
Ri1xL3CwbO8+lGMNsd7zW80kf9wvcyqDt2NfXKz50Y/EkjiFjPYwVbyO2qWjORx9
JdUGBY7GCyk6E9f/UeEJq1JAWRqX2DAdwOn9l8EQ7ECYpXNyd6Jp7gxO/sIpuEpL
NuyRjIjrqyD/7ob65rTEjhXkWarZi5R88RMPmBJ2sHm+mefZQu1sVjJ47sU6emM4
eTAZVgB8RPdtHwjE2+rfezSnKk0969xF8rvI6ehkbaCJ+0qXNYwcqu2lbRhZrPv/
wMNSBj03NToglihLUfmKDraweH3LBvsUdLDLm/mUZoR44l7pjE55o8fc7bT7rJSM
1lFkPOPlXlWtbNrjIMXdLIaJU4fAh8StwQbIdg9Fxku4k9uo7+kT+w52tFVzGq6u
dlKKG/uYIzmkSbJQBK/C1q4wy7hgi3s3kd5KnymRAXeBva9tPkbUkKlAvNdQVfxN
f5RHdECFF6vL5lLNgcDAHNwRPsQJ2G7nPDdGuoBpf6hQR30jUN7l0nTv/CYYVZY1
0DWlxaVr+/mboIGwOTrB602qKif5FYSuf3WuoogHSuRAueBjBmM=
=gT8A
-END PGP SIGNATURE-

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

---
CONFIDENTIALITY N

RE: Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-02 Thread Louis Zipes
Thanks.  I will try this tomorrow.

-Original Message-
From: Daniel Savard [mailto:daniel.sav...@gmail.com]
Sent: Thursday, August 02, 2018 6:15 PM
To: Tomcat Users List
Subject: Re: Question about setting CATALINA_OPTS when starting Tomcat using a 
Windows Service in Tomcat 7.0.54

- - - external message, proceed with caution - - -


In ${Tomcat}/conf create the file management.properties and put your stuff
in this file like:

com.sun.management.jmxremote = true
com.sun.management.jmxremote.port = 9876
com.sun.management.registry.ssl =true
com.sun.management.ssl = true
com.sun.management.ssl.enebled.protocols = TLSv1.2
...

Then, remove your stuff from the CATALINA_OPTS and just point to this file
with
-Dcom.sun.management.config.file=${CATALINA_BASE}/conf/management.properties
and you port in use message will disappear since this configuration will be
handled properly.

Regards,

Le 2 août 2018 3:58 PM, "Louis Zipes"  a écrit :

Hi All,
I'm trying to enable JMX monitoring using Tomcat 7.0.54.  Turning on the
JMX monitoring is not the problem. To do this I added the following to the
Apache Tomcat 7.0 Properties 'JAVA' tab  GUI Window, which opens up when
you run 'TOMCAT7w.exe //ES/', and it works in that JMX can
monitor it.

-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote.port=8555
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=


The problem is that when I go to STOP the Service it gives me the following
error

Error: Exception thrown by the agent : java.rmi.server.ExportException:
Port already in use: 8555; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind


I have to do a hard kill by either restarting the Appserver or doing SC
QUERY which is not realistic

I can find hits on the error message but the answers seem to relate to the
need to set up JMX under CATALINA_OPTS.  My issue is that I'm struggling to
figure out how to set up CATALINA_OPTS that in Windows when starting Tomcat
using a Service.  The solutions I find either are Linux (I'm Windows) or
talks about setting up JMX with a setenv.bat OR catalina.bat files.
However, from my research the catalina.bat and setenv files are ignored
when you use a Windows Service.

So my question is how do I do I set up CATALINA_OPTS parameter in Tomcat
7.0.54 when I'm using a Windows Service?

Thanks, Louis

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and
may contain information that is confidential, proprietary or exempt from
disclosure. If you are not the intended recipient, please contact the
sender immediately. Unauthorized use or distribution is prohibited and may
be unlawful.
---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.


Question about setting CATALINA_OPTS when starting Tomcat using a Windows Service in Tomcat 7.0.54

2018-08-02 Thread Louis Zipes
Hi All,
I'm trying to enable JMX monitoring using Tomcat 7.0.54.  Turning on the JMX 
monitoring is not the problem. To do this I added the following to the Apache 
Tomcat 7.0 Properties 'JAVA' tab  GUI Window, which opens up when you run 
'TOMCAT7w.exe //ES/', and it works in that JMX can monitor it.

-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote.port=8555
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=


The problem is that when I go to STOP the Service it gives me the following 
error

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port 
already in use: 8555; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind


I have to do a hard kill by either restarting the Appserver or doing SC QUERY 
which is not realistic

I can find hits on the error message but the answers seem to relate to the need 
to set up JMX under CATALINA_OPTS.  My issue is that I'm struggling to figure 
out how to set up CATALINA_OPTS that in Windows when starting Tomcat using a 
Service.  The solutions I find either are Linux (I'm Windows) or talks about 
setting up JMX with a setenv.bat OR catalina.bat files.However, from my 
research the catalina.bat and setenv files are ignored when you use a Windows 
Service.

So my question is how do I do I set up CATALINA_OPTS parameter in Tomcat 7.0.54 
when I'm using a Windows Service?

Thanks, Louis

---
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may 
contain information that is confidential, proprietary or exempt from 
disclosure. If you are not the intended recipient, please contact the sender 
immediately. Unauthorized use or distribution is prohibited and may be unlawful.