Re: Documentation on Connectors needs updating

2014-12-01 Thread Igal @ getRailo.org
Chris,

On 11/28/2014 6:26 AM, Christopher Schultz wrote:
 4. Tomcat can server static content just as quickly as httpd.

I remember that years ago it was recommended to front Tomcat with a web
server in order to serve static content.  I understand from your
statement that this is not the case anymore. 

Were there any benchmark tests done for that?  Any published sources
that can be cited?

What about the overhead of session management for requests of static
content?  Is there any overhead there as opposed to using an http server?

Thanks,


Igal



Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/19/2014 9:44 AM, Igal @ getRailo.org wrote:
 hi,

 I don't have use for scanning the jars for tld files etc., so usually,
 in catalina.properties, I skip all jars by setting

 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 I just noticed that I can set it via a system property, i.e.

 -Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 1) does the system property override catalina.properties?

 2) can I use just * instead of *.jar?

 3) is it possible to set the common.loader from catalina.properties via
 a system property?
anyone?

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



Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/21/2014 9:19 AM, Christopher Schultz wrote:
 Lot of folks are at ApacheCon Europe this week. Give it a bit more time.

 -chris
No problem.  Thanks Chris!


Igal

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



Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/21/2014 9:36 AM, Konstantin Kolinko wrote:
 I think the answer is yes, but you would better try it / read the code.

 Note that common.loader can include references to other properties,
 like it does with ${catalina.base} etc.
Spasiba Konstantin!


Igal

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



catalina.properties and system properties

2014-11-19 Thread Igal @ getRailo.org
hi,

I don't have use for scanning the jars for tld files etc., so usually,
in catalina.properties, I skip all jars by setting

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

I just noticed that I can set it via a system property, i.e.

-Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

1) does the system property override catalina.properties?

2) can I use just * instead of *.jar?

3) is it possible to set the common.loader from catalina.properties via
a system property?

thanks,


Igal

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



Security Best Practices on Windows Service

2014-11-05 Thread Igal @ getRailo.org
hi,

what are the security best practices for running Tomcat as a Windows
Service?

is the local system account safe or am I better off creating a new user
and giving it write permissions only to the Tomcat runtime folders and
read permissions to the web contents folder?

TIA

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



systemd tomcat.service

2014-10-14 Thread Igal @ getRailo.org
hi,

is there an official tomcat.service for systemd?

thanks,


Igal

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: systemd tomcat.service

2014-10-14 Thread Igal @ getRailo.org
Chris,

On 10/14/2014 11:48 AM, Christopher Schultz wrote:
 Would you care to write a tomcat.service for systemd and post it to
 the wiki?

I'd love to, after I iron out the details.  I've been running Tomcat on
Windows for years and am now migrating to Linux.  Once I have things
running properly I'd love to help in any way I can.

Best,


Igal

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/



Re: Windows Tomcat install folder

2014-10-12 Thread Igal @ getRailo.org
On 10/12/2014 5:00 AM, Guy Dillen wrote:
 What is the ³recommended²/usually used installation folder for manually
 install of Tomcat on Windows 7/8:

 c:\Program Files\Š 

 or

 c:\tomcat\apache-tomcat-8.0.14
 c:\tomcat\apache-tomcat-7.0.56
I don't know about the recommended way, but personally I hate the
SPACE in Program Files, so I definitely prefer the 2nd option.

in fact I would suggest creating a folder named C:\Apps or C:\Programs
and put the Tomcat files there, so it would be
C:\Apps\apache-tomcat-x.y.zz -- then you can put other related software
by its side like your web server etc.


-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Tomcat JVM Crash

2014-10-03 Thread Igal @ getRailo.org
 Whose problem is this: Google, Apache Tomcat, GoDaddy(SSL), or Oracle?
regardless of whose fault this is, Tomcat should be patched so that it
doesn't crash.

can you produce a reduced test case so that the good people at Tomcat
can reproduce it on their end and patch it?



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



Re: Tomcat JVM Crash

2014-10-03 Thread Igal @ getRailo.org
On 10/3/2014 11:14 AM, Mark Thomas wrote:
 The general position of the Tomcat developers is that we do *not*
 patch Tomcat to work around bugs in third party code. There have been
 exceptions in the past but - since this JVM bug as a workaround
 available - I very much doubt that Tomcat will be patched to avoid
 this (even if such a patch was possible which looks unlikely). 
fair enough, but first we need to ensure that this is not a Tomcat
issue, right?  I agree that if it only happens with a certain browser
then it's unlikely that Tomcat is the issue, but TBH I'm concerned if
some hacker can drop my servers by issuing some planned https request.

 A reproducible test case is definitely a good thing but it needs to go
 to Oracle, not to the Tomcat devs. Note we do have some contacts with
 Oracle we can use to ensure a bug report gets in front of the right
 people. Mark
that would be sufficient because as long as this problem, if it does
exist, is resolved, then it doesn't matter to me (and I believe to other
users) who fixed it.

thanks,


Igal

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Windows Service Install Startup Type

2014-09-11 Thread Igal @ getRailo.org
I have written a simple script that make it really easy for me to
upgrade Tomcat when new versions are available.

The service is simply unistalled, and then re-installed with the updated
paths etc.

The problem is that after the service is re-installed it is set to

Startup Type: Manul

whereas I want it to be

Startup Type: Automatic

How can I specify the Startup Type when installing the service?

Thanks,


Igal

-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Windows Service Install Startup Type

2014-09-11 Thread Igal @ getRailo.org
Thanks Jordan (for a second there when I saw your name I thought that I
may have posted my question to the wrong list ;])


On 9/11/2014 11:09 AM, Jordan Michaels wrote:
 c:\railo\tomcat\bin\tomcat7.exe //US//%SERVICE_NAME% --Startup=auto

 Warm Regards,
 Jordan Michaels

 On 09/11/2014 10:50 AM, Igal @ getRailo.org wrote:
 I have written a simple script that make it really easy for me to
 upgrade Tomcat when new versions are available.

 The service is simply unistalled, and then re-installed with the updated
 paths etc.

 The problem is that after the service is re-installed it is set to

  Startup Type: Manul

 whereas I want it to be

  Startup Type: Automatic

 How can I specify the Startup Type when installing the service?

 Thanks,


 Igal


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


-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Windows Service Install Startup Type

2014-09-11 Thread Igal @ getRailo.org
On 9/11/2014 11:09 AM, Jordan Michaels wrote:
 c:\railo\tomcat\bin\tomcat7.exe //US//%SERVICE_NAME% --Startup=auto
are you sure about that? 

from the service.bat file, the command to install is //IS// not //US//

also, the params are not separated by = but by space

 Warm Regards,
 Jordan Michaels

 On 09/11/2014 10:50 AM, Igal @ getRailo.org wrote:
 I have written a simple script that make it really easy for me to
 upgrade Tomcat when new versions are available.

 The service is simply unistalled, and then re-installed with the updated
 paths etc.

 The problem is that after the service is re-installed it is set to

  Startup Type: Manul

 whereas I want it to be

  Startup Type: Automatic

 How can I specify the Startup Type when installing the service?

 Thanks,


 Igal

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




-- 
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Windows Service Install Startup Type

2014-09-11 Thread Igal @ getRailo.org
On 9/11/2014 11:16 AM, Igal @ getRailo.org wrote:
 On 9/11/2014 11:09 AM, Jordan Michaels wrote:
 c:\railo\tomcat\bin\tomcat7.exe //US//%SERVICE_NAME% --Startup=auto
 are you sure about that? 

 from the service.bat file, the command to install is //IS// not //US//

 also, the params are not separated by = but by space
oh, I see.  //US// is for Update.  perhaps I don't need to go through
the whole Uninstall/Reinstall in the first place...


Igal

p.s. I'm not sure why in this list you're supposed to add your reply at
the bottom...  not sure what mail clients others use here, but it
doesn't make sense to me...


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



Re: Windows Service Install Startup Type

2014-09-11 Thread Igal @ getRailo.org
On 9/11/2014 11:09 AM, Jordan Michaels wrote:
 c:\railo\tomcat\bin\tomcat7.exe //US//%SERVICE_NAME% --Startup=auto 

ok, I can confirm that the delimiter is a space, so

--Starup auto

does the trick.

also, for some reason it wasn't that easy for me to find so I'm posting
the link to the docs here:
http://tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html

thanks,


Igal


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



Re: UTF-8 encoded request URI

2014-09-03 Thread Igal @ getRailo.org


On 9/3/2014 4:52 AM, Mark Thomas wrote:

On 03/09/2014 12:45, Lulseged Zerfu wrote:

Hi  I am getting bad request from tomcat when I send UTF-8 encoded
request to my application. I have configured connector in my
server.xml with URIEncoding=”UTF-8”. I have set charset in the
request to UTF-8. How can I solve 400 Bad request?

Don't send an invalid request.
Unfortunately this is not always within our control.  I've been seeing 
the following in my log files recently:
java.nio.charset.IllegalCharsetNameException:'UTF-8' caused by different 
User Agents like Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; 
Trident/5.0) and Amazon CloudFront


It happens when I try to get the request headers.  I don't have a full 
stacktrace or more details because I am not logging that ATM, but I can 
add it to the logs if needed.


--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Specifying Path to Config

2014-08-26 Thread Igal @ getRailo.org
is it possible to specify the path to the /conf folder?  if yes, how?  
if no, why?


I like upgrading Tomcat when a new update is available, and it would be 
much easier if I could keep all of my config files in one place, without 
having to move files with each upgrade.  (actually, I overwrite the /bin 
and /lib folders when upgrading a minor version, but that's beside the 
point).


thanks,


Igal

--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Specifying Path to Config

2014-08-26 Thread Igal @ getRailo.org

hi Chris, thank you for your prompt response.

I should have clarified in my original email that:

  1) I am running Tomcat as a Windows service

  2) my goal is to have something like this:

C:\Programs\Tomcat-conf  == /conf folder goes here, unchanged 
with an upgrade


C:\Programs\Tomcat-bin  == /bin and /lib go here, updated when 
there is a new point-release


from the README.txt/advanced that you cited I see that I can use 
CATALINA_BASE for the Tomcat-conf folder above, and CATALINA_HOME for 
the Tomcat-bin, and specifying the env values when installing the 
service, as documented at

http://tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html#Multiple_Instances

do you think that this would work for a Windows service setup?

thanks again,


Igal

On 8/26/2014 8:16 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Igal,

On 8/26/14, 11:05 AM, Igal @ getRailo.org wrote:

is it possible to specify the path to the /conf folder?  if yes,
how? if no, why?

I like upgrading Tomcat when a new update is available, and it
would be much easier if I could keep all of my config files in one
place, without having to move files with each upgrade.  (actually,
I overwrite the /bin and /lib folders when upgrading a minor
version, but that's beside the point).

Take a look at the Advanced section of RUNNING.txt in any Tomcat
distribution's root. It will explain how you can use CATALINA_BASE and
CATALINA_HOME environment variables to have a single deployment
directory that doesn't (usually) have to change between point-releases
(e.g. 7.0.50 - 7.0.51). It also allows you to install multiple Tomcat
versions side-by-side and choose which one to use at launch.

This will allow you to install a new version of Tomcat, launch with
it, and then easily roll-back to the prior version if you decide that
the upgrade is not working for you for some reason.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJT/KTVAAoJEBzwKT+lPKRYx/IP/3+IJyjg/lgqAwv1fIvyz8MT
uFKPkmOSkq8nsxgnQb12oYRMgOW3bvDOWywdkNV5cfzGm+vbFbPkoqks0C0o/62I
I5gXwPoKDye+Jun8p21U2pP2sOAwTxTOJtFeNbX5wZ88uGShvjyLeJnsCaWEQVf7
P2lwZJjxilRB+ElgBzk7tyX0/YM80PINKIi+CZuyoKNGtqZa/jT5tJzQ6p1kFCuv
2/6in1tVZOPJ4bkVqhI0vSErrFrMQhCpFiKIVOw+FXMD0WJTNEs+bEPBG7TTr+7Z
SOH/x47tPrA+fco6IKfZcWAMTy26raqS1helA3vb0Shepi0Oa7eIKWG4FCRd5cqv
F5cjXAYdf7uL7ue9sFhXCplDoATamkv9fBAGzS7jbl9xKYLsDEXf7dvVuSDa2mk7
KbgUsqy8qWn8sZFKr449wtyJTIoRqYioki+5ZnypujQG/5WF0mdSgORrvVHqBK0b
G358Vc0Wtcs5R1JpGCN/SBMPNtfprt3wJITXpNdZSaE8g/qbQxMZnVfjSDAnmb1p
BA8n0a0DXcceeZvp6LjrEtchzqVNVxs2vHUJqrTiQKaeqze9ZM8zlQxiFMEcw4x3
OtO6A5Xrfm/+thwX7db8fJIrdMVcJkQiBV1GftkAc5riW6D8utcoZTrx9UA+gSSf
0cIOW4rqrr/OIIpiMXP1
=/13l
-END PGP SIGNATURE-

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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Specifying Path to Config

2014-08-26 Thread Igal @ getRailo.org

great!  thank you very much for your insight!


On 8/26/2014 10:08 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Igal,

On 8/26/14, 11:35 AM, Igal @ getRailo.org wrote:

hi Chris, thank you for your prompt response.

I should have clarified in my original email that:

1) I am running Tomcat as a Windows service

You can use CATALINA_HOME and CATALINA_BASE as environment variables
before running service.bat to install the service. You can also set
catalina.home and catalina.base properties using tomcatXw.exe (where X
is your Tomcat version).


2) my goal is to have something like this:

C:\Programs\Tomcat-conf  == /conf folder goes here, unchanged with
an upgrade

C:\Programs\Tomcat-bin  == /bin and /lib go here, updated when
there is a new point-release

Change this to:

C:\Tomcats\Tomcat-conf\conf
C:\Tomcats\Apache Tomcat 7.0.50
C:\Tomcats\Apache Tomcat 7.0.51

C:\ SET CATALINA_HOME=C:\Tomcats\Apache Tomcat 7.0.50
C:\ SET CATALINA_HOME=C:\Tomcats\Tomcat-conf
C:\ %CATALINA_HOME%\bin\service.bat [your options]

Now you can start your webapps deployed into
C:\Tomcats\Tomcat-conf\webapps using Tomcat 7.0.50. To switch to
Tomcat 7.0.51:

Step 0: Stop the existing Tomcat service

Then,
C:\ SET CATALINA_HOME=C:\Tomcats\Apache Tomcat 7.0.51
C:\ SET CATALINA_HOME=C:\Tomcats\Tomcat-conf
C:\ %CATALINA_HOME%\bin\service.bat [your options]

Now, restart the service.

you can even define different services to start the same webapps under
different Tomcat versions. (Don't try to start them at the same time,
though, unless you have changed all the port numbers to avoid conflicts).


from the README.txt/advanced that you cited I see that I can use
CATALINA_BASE for the Tomcat-conf folder above, and CATALINA_HOME
for the Tomcat-bin, and specifying the env values when installing
the service, as documented at
http://tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html#Multiple_Instances

  do you think that this would work for a Windows service setup?

Absolutely, though must admit that I haven't actually done it myself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJT/L71AAoJEBzwKT+lPKRY0lAP/0FvOYfypBQeJfHK7NjMh5Ni
q62sL/pNXPh5qA9tGjys1LtFiBNtIHPlu2KMJ+0PbXFLIy5/gOFJRQEeQDSmaLMy
DTv5JIGmrQcpKn5HUOwAbH94dSPxsgWBCUtgPoNlOo8BI76c2OUw+crCCxTfjFhE
lorQ7EXSp5r+lbA98EQehx9fRh84+CSwWN41fCQQsFf+Ne8ka6/Uara7Q7M72L9c
4jFJ0ZZeVbJ5tbAVa6RqiWUcx3JpUI94hO6lCootjr53ueoDUm41/1ufD25HGdDX
4imGecKMcLtMGuo+l7zW0rxXImA9muRpxMZp2er04/phLdhf+faCfqn4gdMvyV3I
Ld/PqZUJYLcnMwdtKN/VMQpVqKrA3o3HfPn6cfLr+WATEnAnLLtt53PM+SMoEydC
21BvdvGG8UJ0F4J6SkBk7+OUFlVE+7BpNb2LI0sDTrBoEmsbO/Cqua50cxy09ELq
xoXKImsL2UV9JbVi3oXMndoYiE0TH1dLSKR1nsiIpAoBJf1Wwtrlq4nDUeTBepUp
wwhs5Sq9PQFsCAzpAz1jzb0QURcAr3OpldjWe9p+npUFTevttRPsDfa8vn/Iw5NO
Vuep66WBSULFaFC8/G104xLVNN6Dx8fBIeKKF4294ScXH02MPSgemLzm4NlHzBTr
YzadOPLTpPxAXK/DaSx8
=qKao
-END PGP SIGNATURE-

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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: un-subscribe

2014-08-11 Thread Igal @ getRailo.org

The list will be pleased to hear that the message finally sunk in

+1


On 8/11/2014 10:08 AM, Mark Thomas wrote:

On 11/08/2014 15:13, Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC,
54350 wrote:

I have un-subscribed from every list and still get all postings so there is a 
reference somewhere that is not being un-subscribed from these services?

The list will be pleased to hear that the message finally sunk in (on
the fourth attempt). The mailing list logs show that this user
unsubscribed themselves from the users list at
11 Aug 2014 14:21:35 -

Note that the time in the On ... wrote: section above is UTC+1 so the
unsubscribe was 8 minutes later.

Mark



Thanks,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space  Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax:  (504) 697-5628
keith.pendergr...@navy.mil


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Monday, August 11, 2014 9:02 AM
To: Tomcat Users List
Subject: Re: un-subscribe

On 11/08/2014 14:15, Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC,
54350 wrote:


Regards,

Keith Pendergrass (CIV) MS/ MBA/ Network+ IT Specialist (APPSW)
Software/Data Engineer Space  Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax: (504) 697-5628
keith.pendergr...@navy.mil

As you have already been told twice off list when you mailed the list owner, 
you need to send you unsubscription request to the list you are subscribed to, 
not some random other Tomcat list.

The complete list of mailing lists (including with unsubscription
addresses) is here:
http://tomcat.apache.org/lists.html

And, also for the third time, once you have sent your unsubscription request to 
the correct address and if it still fails, send a copy of that failure to the 
list owners.

Mark

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



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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Programmatically retrieve number of tomcat connections

2014-07-31 Thread Igal @ getRailo.org
well -- Mark surely knows much better than I do -- so take into account 
what he wrote, but I was already writing this so I decided to send 
anyway, and for most application it should work fine IMO:


1) you create a class that implements the Filter interface and maintains 
the count in an AtomicLong object.


2) you increment the AtomicLong before the call to chain.doFilter() and 
decrement it after that call.


3) you add a way to get the value, either with a public method or by 
setting the value to a Servlet Attribute.


see more about Filters at 
http://www.oracle.com/technetwork/java/filters-137243.html


another way I can think of is to get all the threads in the JVM with 
Thread.getAllStackTraces(), loop over them, and check their names for 
example.



On 7/31/2014 10:01 AM, Mark Thomas wrote:

On 31/07/2014 17:56, Campbell, Lance wrote:

Could you elaborate a little?  How do you actually get the number of HTTP 
connections?

You can't do this with a Filter. You can determine the number of active
requests for an application but connection != active request and
application != Tomcat server.

There is no standard Servlet API for the information you want.

Mark




Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382




-Original Message-
From: Igal Sapir [mailto:i...@getrailo.org]
Sent: Thursday, July 31, 2014 11:35 AM
To: Tomcat Users List
Subject: RE: Programmatically retrieve number of tomcat connections

Write a simple ServletFilter
  On Jul 31, 2014 9:33 AM, Campbell, Lance la...@illinois.edu wrote:


Good question.  I would like to have a servlet that would return to me
the number of tomcat HTTP connections.  I know you can do this via a
Linux console command.  But I would prefer to do it via a servlet.


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382



-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Thursday, July 31, 2014 11:10 AM
To: Tomcat Users List
Subject: Re: Programmatically retrieve number of tomcat connections

On 31/07/2014 17:06, Campbell, Lance wrote:

Tomcat 7

Is there a way via a Java servlet to get the number of tomcat

connections?

Connections from what to what in what state?

With or without non-Servlet API calls?

Mark


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


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



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



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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Programmatically retrieve number of tomcat connections

2014-07-31 Thread Igal @ getRailo.org

André -- thank you for making this clear.


On 7/31/2014 2:27 PM, André Warnier wrote:

Caldarale, Charles R wrote:
From: Igal Sapir Subject: RE: Programmatically retrieve number of 
tomcat connections



Isn't Filter.doFilter() called once for each incoming http request?


Yes, which is why it has nothing to do with the number of _connections_.



To elaborate just a little :
Presumably when the OP wrote connections, he meant connections, 
and this was not just sloppy language.


In that case, consider keep-alive connections : a browser 
establishes *one* connection to Tomcat, and then uses that same 
connection to send 100 HTTP requests (and get 100 HTTP responses) over 
that same connection.
A filter would count 100 requests (assuming that they are all to that 
same application), but there would still be a single connection.
(On the other hand of course, if all the request were directed to 
another application which does not have the filter, then the filter 
would count 0 requests, and there would still be 1 connection).


Talking about fuzzy language though, review Mark's original response : 
which connections are we talking about here ? and are we talking 
about a snapshot, where we want to know how many connections with 
Tomcat are active at a specific moment in time, or how many 
connections with Tomcat have been established/closed over a period of 
time ?

Or about something else altogether ?

And if one really wanted to count connections at the Tomcat level, I 
would imagine that the sensible place to do this would be at the 
Connector level, no ? (all of them)


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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Graceful Shutdown

2014-07-30 Thread Igal @ getRailo.org

will -force work even if the JVM has a running non-daemon thread?

thanks,


Igal

On 7/30/2014 8:19 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Arseny,

On 7/30/14, 4:13 PM, Arseny wrote:

30.07.2014 16:19, Ron Holckener пишет:

This behavior exists using the regular shutdown.sh script? Is the
timeout (10s) configurable?

Thanks, Ron Holckener



./$CATALINA_HOME/bin/catalina.sh stop 30

(30 sec. wait)

Don't remember same option inside shutdown.sh, but anyway - it
call catalina.sh with stop option.

catalina.sh stop 30 will only wait 30 seconds to check to see if the
process stopped: it will not force a shutdown.

Under default setup, Tomcat will only perform a graceful shutdown.
That is, no explicit process termination will occur. A SHUTDOWN
command is sent to the server which will pause the connectors (so they
will not accept new connections) but any in-progress connections will
complete, the thread pool(s) will drain, etc.

If you use:

$ CATALINA_PID=/tmp/tomcat.pid bin/catalina.sh stop 30 -force

... then catalina.sh will wait 30 seconds and then try to kill the JVM
using kill -9 once per second for 5 seconds until the process is
dead or the 5 tries don't work.

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

iQIcBAEBCAAGBQJT2bWsAAoJEBzwKT+lPKRYDiUQAL6MbPwQAsvKATU5Xquhy40k
DHc3KKPG5Ro/i4cNJkT7MkyPzfJTeKCyfJpqk2YyNv2xcdY6RLHcVFEixBrtE1oK
KEzZFZbQy1kMGcn1QJhzRW5nuWJYRk/XPI+YZ87BMnNl9MBmHRdyQxL2fEEtrXf5
srsPR3FY1OWtz59ZrQ49A2v4vnnx49p3+UmRhO6WxvYlD08W24PbE/MNwG75fdg8
TDQFRD+4UZ6seILGX+7/oVXDMw6SbyrRKo/8qfKWBZG7j9NkYzirvYE7pH9szI16
7nMi4to5YN3JLLTFCDgwPsxgbct0577UUzRAfMqbFwOdhY5F2drphVwoPqSZvPUw
7qwDi+u4AkQhXoxcWGsSGi+bKHxOHayZBLH+M7UDtc6cPFCYDCL11umyFnEuJFj7
vqMODzn+Y70pVHCTiXtkOyoLjEFbrQk/h+GPDAlsDUYDoQ8woDCY2aNZn5yrQ+Hr
uyoeHQCYKamok6tEPScNUzLuVHdiS9PSdDA+NFsYkq0Vw3GmHV/a2SGSye+Esilj
8uhlxeIuN6OpFqtZ2qZADdETSGwXWOrK0o+bLMGm+7yQK5aVTlPxm0gxCMT3kOyH
Uopy0vvZL0GmWznjVJLvmcb0DUqwmV0U0ZWk7vKL9SqF2BXC0ESnUsI2gZhos26r
qzQcHnG8QuIroFsfRPQQ
=MpLt
-END PGP SIGNATURE-

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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Tomcat virtual host shows blank page

2014-07-24 Thread Igal @ getRailo.org

I prefer to use Context/docBase instead of Host/appBase

try this:

Host name=www.mysite.com
   Aliasmysite.com/Alias

   Context path= docBase=/var/lib/tomcat7/webapps/mysite /
/Host



On 7/24/2014 6:28 PM, Arya Farzan wrote:

I just tried this with IE and it says The webpage cannot be found

in google chrome source is 100% blank


On Thu, Jul 24, 2014 at 8:20 PM, Igal Sapir i...@getrailo.org wrote:


Check with view source on the blank page and see if you get anything there
On Jul 24, 2014 6:16 PM, Jordan Michaels jor...@viviotech.net wrote:


Hi Arya,

Are you using a web server like Apache in front of Tomcat, or are you
hitting the Tomcat port directly? This will tell us if the problem is
somewhere in your connector setup or not.

Any clues in your catalina.out log file?

Warm Regards,
Jordan Michaels

On 07/24/2014 06:03 PM, Arya Farzan wrote:


Hello

I also asked this on Stackoverflow but no one has commented or answered.

I've been trying to configure tomcat for multiple domains and

everything I

have tried was unsuccessful.

I added this to /etc/tomcat7/server.xml

Host name=www.mysite.com appBase=webapps/mysite
  unpackWARs=true autoDeploy=true
Aliasmysite.com/Alias
/Host

and I created the folder /var/lib/tomcat7/webapps/mysite

Whenever I go to my domain all I get is a blank page. What am I doing
wrong
here? I am running Debian 7



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




--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Tomcat (v 6.0.32) write response to wrong client socket

2014-07-09 Thread Igal @ getRailo.org

if Tomcat is fronted by a web server then I would also check the connector.

I've seen similar issues in the past with IIS and a faulty AJP connector.

switching to nginx with an APR connector resolved it in my case.


Igal

On 7/9/2014 2:49 AM, Mark Thomas wrote:

On 09/07/2014 08:43, yanchun.y...@finnova.ch wrote:

Hello,

We got a serious problem on our online banking applications: a user U1 of bank 
A got to see the data of another user U2 of another bank B.
It happened only once, before and after that went everything well.

The two same online banking applications are running on one instance of tomcat 
(V.6.0.32) and have different backend path.

That is quite an old version with a number of public security
vulnerabilities to be using for a banking application.


The logs show that the problem must be not on the side of web application 
(frontend), backend and firewall. The scenario looks as following:
1.  U1 log on the online banking of bank A and U2 log on the online banking 
of
bank B, and the two sessions have been running well a while till
2.  later at the exactly same time U1 wanted to see the start page and U2
booking
detail
3.  U1 got to see the false data of the booking detail of U2.
4. after that the two sessions went further well without any problem

In the access log of the tomcat seems everything went well:

Access log Bank A (U1):
10.25.4.8 - - F862B9AD5DA9AC4A0D38B46D4E5B0D6C [15/Jun/2014:16:03:41 +0200]
HTTP/1.1 GET /finprdcbo/defAccountStartPage.account
?DIRTY=YDEFAULT=1node=STARTSEITE 200 69000 
/ebanking/defAccountStatementDetail.account Mozilla/5.0 (Macintosh; Intel Mac OS X 
10.9; rv:29.0) Gecko/20100101 Firefox/29.0

Access log Bank B (U2):
10.25.4.8 - - 12A6E21F0D6321A95C553B160DBCC9A0 [15/Jun/2014:16:03:40 +0200]
HTTP/1.1 POST /finprdzrb/defAccountStatementOfAccount.account  200 45765 
/ebanking/defAccountAssetOverview.account Mozilla/5.0 (X11; Linux i686;
rv:24.0) Gecko/20100101 Firefox/24.0

These logs show the requests coming from the same IP address. Since the
requests are from different users then there must be something acting as
a reverse proxy. Is it the firewall? Is it some other component?


But the response of the request for booking detail from U2 was mistakenly sent 
to U1.  We can confirm this by looking into the logs of firewall as
following:

Firewall log of Session U2:
Jun 15 16:04:16  Web-Requests Access m:WR-SG-SUMMARY
vhost:wwwsec.zrb.clientis.ch:443 (https) POST /ebanking/defAccountStatementOfAccount.account = 
https://10.25.2.43:5215/finprdzrb/defAccountStatementOfAccount.account , status:n/a , 
redirection URL:n/a , referer:/ebanking/defAccountAssetOverview.account , mapping:blappl-zrb 
, request size: 1089 , backend response size: n/a , audit
token:308792478954626740 rid:U52nvH8AAAEAAAoy1CIAAAno
sid:384490af19eb229b7f0874b6ef0323c8 ip:84.74.211.190  12

Fact :  backend response size: n/a means there is no reponse from tomcat 
for the request of  POST /ebanking/defAccountStatementOfAccount.account and a timeout is trigged

Firewall log of Session U1:
Jun 15 16:03:40  Web-Requests Access SG_child[14145]: m:WR-SG-SUMMARY
vhost:wwwsec.oberuzwil.clientis.ch:443 (https) GET 
/ebanking/defAccountStartPage.account?DIRTY=YDEFAULT=1node=STARTSEITE = 
https://10.25.2.43:5215/finprdcbo/defAccountStartPage.account , status:200 , redirection 
URL:n/a , referer:/ebanking/defAccountStatementDetail.account , mapping:blappl-cbo , 
request size: 614 , backend response size: 45765 , audit
token:147310158715306970 request total 287469 , allow/deny filters 3780 , backend 
responsiveness 208455 , response processing 74282 , ICAP reqmod n/a , ICAP respmod 
n/a rid:U52nvH8AAAEAAATYu6cAAATi sid:1dad4372b4a2f67d980e6e195aa954fe 
ip:84.73.20.65  12

Fact: backend response size: 45765 means the reponse of Request of U2 is 
mistakenly passed to U1. See the same size of the response in the access log Bank B
(U2):s

The firewall appears to be transforming the URL. That suggests it is the
firewall that is acting as the reverse proxy. (Aside: Transforming the
URL like this is doable but does require very careful configuration to
ensure everything still works properly)


My questions:

1.  Is such a problem (bug) already known?

Have you looked in the changelog?
Mixing up responses would be a security issue so have you looked in
http://tomcat.apache.org/security-6.html


2.  When will the tomcat access log be written? after sent of response or
before?

It isn't quite that simple. In Tomcat 6 (it changes in 7.0.x) the access
log is written after the application has finished writing the response
to the buffer but before the content of that buffer is written to the
client.


3.  how could the problem happen on the side of tomcat?

Depending on exactly how the application works, CVE-2011-3375 might be
able to trigger this but given that requires an error to occur it looks
unlikely.



4.  how could the problem be hidden otherwise?

Most errors of this 

Re: Host appBase vs Context docBase

2014-07-07 Thread Igal @ getRailo.org

hi Terence,

thanks again for your reply.

I have autoDeploy set to false, but did not explicitly set 
deployOnStartup (I think that the default is true).  I am actually not 
using WARs so I'm not sure how, or if, any of this is applicable to my case.



Igal

On 7/7/2014 9:54 AM, Terence M. Bandoian wrote:

On 7/5/2014 1:38 PM, Igal @ getRailo.org wrote:

What version of Tomcat are you using?

I've been using Tomcat 6 and 7 for a while, and now running Tomcat 8.

it is recommended that Context elements not be placed directly in 
server.xml
I know, but it is much easier for me to edit a single file, 
server.xml then deploy all the other files.  I'm looking to keep the 
deployment process as simple as possible.


you shouldn't need the empty directory. I've used an absolute path 
for the Host appBase attribute with relative paths for Context 
docBase attributes in Tomcat 6 and 7 without any problems.
when I try that then webapps is used by default.  if a request is 
made for a file that exists in webapps, e.g. index.jsp and does not 
exist in my application's folder, then it is served from webapps and 
I don't want that.


are you sure you want / for the Context path attribute in the 
first example above?
it was my understanding that  and / are the same here.  / reads 
more clearly to me as the root directory so I prefer to use that.


*after reading your email and testing it, however, I noticed that if 
I omit the Host/appBase and use an empty-string for the 
Context/docBase/path it works as intended, so maybe that's what I was 
doing wrong?  is that the best practice?*


Host name=Site1 unpackWARs=false autoDeploy=false
  Context path= docBase=D:/www/site1 /
  Context path=/virtualdir docBase=D:/www/shared/virtualdir /
/Host

?

thank you both for your responses,


Igal


On 7/5/2014 9:48 AM, Terence M. Bandoian wrote:

On 7/4/2014 9:04 PM, Igal @ getRailo.org wrote:

I'm a little confused about the Host appBase attribute.

Let's say that my website resides in D:\www\site1

I don't like using {Tomcat}/webapps so I don't want to have it as a 
base directory for websites.  What I've been doing so far is create 
an empty folder alongside webapps, named empty, and use it as 
appBase, e.g.


Host name=Site1 appBase=empty unpackWARs=false 
autoDeploy=false

  !-- this works but what's the deal with appBase? !--
  Context path=/ docBase=D:/www/site1 /
/Host

But it feels like I'm doing something wrong.  I expect this to 
work, but it doesn't:


Host name=Site1 appBase=D:/www/site1 unpackWARs=false 
autoDeploy=false

  !-- this doesn't work !--
/Host

Can anyone explain why the snippet above doesn't work, and if that 
is the way it should be, then what is the purpose of Host/appBase?


TIA



Hi, Igal-

What version of Tomcat are you using?  Also, it is recommended that 
Context elements not be placed directly in server.xml.  See:


http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context 



That said, you shouldn't need the empty directory.  I've used an 
absolute path for the Host appBase attribute with relative paths 
for Context docBase attributes in Tomcat 6 and 7 without any 
problems.  I haven't tried it with absolute paths for both appBase 
and docBase.


Lastly, are you sure you want / for the Context path attribute 
in the first example above?  The Context path for the default web 
application of a Host should be an empty string ().  See:


http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes 



-Terence Bandoian


Hi, Igal-

Glad you were able to get it working.  Please note the warning in the 
Tomcat docs about using the Context path attribute that reads:


Even when statically defining a Context in server.xml, this attribute 
must not be set unless either the docBase is not located under the 
Host's appBase or both deployOnStartup and autoDeploy are false. If 
this rule is not followed, double deployment is likely to result.


This is included in:

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Common_Attributes 



For information about about how context paths relate to WAR file names 
and application directory names, see:


http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Naming

In particular, please note that If the context path is the empty 
string them the base name will be ROOT (always in upper case)


The recommended practice is to create separate context XML files and 
package them in the application WAR files.  However, for simple 
installations, I've had success with something like:


  Host name=Host
  appBase=c:/webapps
  autoDeploy=false
  deployOnStartup=true
  unpackWARs=true

Context path= docBase=ROOT /

  /Host

The [Tomcat]/webapps directory may then be deleted (if you don't need 
the packaged apps or doc) and ROOT.war placed directly in c:/webapps.


-Terence Bandoian


-
To unsubscribe

Re: Host appBase vs Context docBase

2014-07-05 Thread Igal @ getRailo.org

Normally,we configure docBase when we want the application to be resided on a 
separate directory and not inside tomcat

that's exactly what I'm trying to do


when you use docBase I don't think you need to configure host/appbase as well
if I don't use host/appBase then webapps is set as default, and then 
if a document that exists in webapps is requested, e.g. /index.jsp and 
it does not exist in my application directory, then it is served from 
webapps, which is something that I really don't want to happen.


sure, I can clear the contents of the webapps folder instead of creating 
the empty folder, but not sure I want to do that either.



On 7/5/2014 3:49 AM, Neeraj Sinha wrote:

Normally,we configure docBase when we want the application to be resided on
a separate directory and not inside tomcat. So, when you use docBase I
don't think you need to configure host/appbase as well.
Appbase folders go under tomcat directory parallel to default appbase
webapps. Each appbase is mapped to a particular host so we configure more
than one appbases when we want to have applications running under different
hosts deployed in the same tomcat.

On Jul 5, 2014 7:35 AM, Igal @ getRailo.org i...@getrailo.org wrote:

I'm a little confused about the Host appBase attribute.

Let's say that my website resides in D:\www\site1

I don't like using {Tomcat}/webapps so I don't want to have it as a base

directory for websites.  What I've been doing so far is create an empty
folder alongside webapps, named empty, and use it as appBase, e.g.

Host name=Site1 appBase=empty unpackWARs=false autoDeploy=false
   !-- this works but what's the deal with appBase? !--
   Context path=/ docBase=D:/www/site1 /
/Host

But it feels like I'm doing something wrong.  I expect this to work, but

it doesn't:

Host name=Site1 appBase=D:/www/site1 unpackWARs=false

autoDeploy=false

   !-- this doesn't work !--
/Host

Can anyone explain why the snippet above doesn't work, and if that is the

way it should be, then what is the purpose of Host/appBase?

TIA

--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Host appBase vs Context docBase

2014-07-05 Thread Igal @ getRailo.org

What version of Tomcat are you using?

I've been using Tomcat 6 and 7 for a while, and now running Tomcat 8.

it is recommended that Context elements not be placed directly in 
server.xml
I know, but it is much easier for me to edit a single file, server.xml 
then deploy all the other files.  I'm looking to keep the deployment 
process as simple as possible.


you shouldn't need the empty directory. I've used an absolute path for 
the Host appBase attribute with relative paths for Context docBase 
attributes in Tomcat 6 and 7 without any problems.
when I try that then webapps is used by default.  if a request is made 
for a file that exists in webapps, e.g. index.jsp and does not exist in 
my application's folder, then it is served from webapps and I don't want 
that.


are you sure you want / for the Context path attribute in the 
first example above?
it was my understanding that  and / are the same here.  / reads 
more clearly to me as the root directory so I prefer to use that.


*after reading your email and testing it, however, I noticed that if I 
omit the Host/appBase and use an empty-string for the 
Context/docBase/path it works as intended, so maybe that's what I was 
doing wrong?  is that the best practice?*


Host name=Site1 unpackWARs=false autoDeploy=false
  Context path= docBase=D:/www/site1 /
  Context path=/virtualdir docBase=D:/www/shared/virtualdir /
/Host

?

thank you both for your responses,


Igal


On 7/5/2014 9:48 AM, Terence M. Bandoian wrote:

On 7/4/2014 9:04 PM, Igal @ getRailo.org wrote:

I'm a little confused about the Host appBase attribute.

Let's say that my website resides in D:\www\site1

I don't like using {Tomcat}/webapps so I don't want to have it as a 
base directory for websites.  What I've been doing so far is create 
an empty folder alongside webapps, named empty, and use it as 
appBase, e.g.


Host name=Site1 appBase=empty unpackWARs=false 
autoDeploy=false

  !-- this works but what's the deal with appBase? !--
  Context path=/ docBase=D:/www/site1 /
/Host

But it feels like I'm doing something wrong.  I expect this to work, 
but it doesn't:


Host name=Site1 appBase=D:/www/site1 unpackWARs=false 
autoDeploy=false

  !-- this doesn't work !--
/Host

Can anyone explain why the snippet above doesn't work, and if that is 
the way it should be, then what is the purpose of Host/appBase?


TIA



Hi, Igal-

What version of Tomcat are you using?  Also, it is recommended that 
Context elements not be placed directly in server.xml.  See:


http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context 



That said, you shouldn't need the empty directory.  I've used an 
absolute path for the Host appBase attribute with relative paths for 
Context docBase attributes in Tomcat 6 and 7 without any problems.  
I haven't tried it with absolute paths for both appBase and docBase.


Lastly, are you sure you want / for the Context path attribute in 
the first example above?  The Context path for the default web 
application of a Host should be an empty string ().  See:


http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes 



-Terence Bandoian

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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/



Host appBase vs Context docBase

2014-07-04 Thread Igal @ getRailo.org

I'm a little confused about the Host appBase attribute.

Let's say that my website resides in D:\www\site1

I don't like using {Tomcat}/webapps so I don't want to have it as a base 
directory for websites.  What I've been doing so far is create an empty 
folder alongside webapps, named empty, and use it as appBase, e.g.


Host name=Site1 appBase=empty unpackWARs=false autoDeploy=false
  !-- this works but what's the deal with appBase? !--
  Context path=/ docBase=D:/www/site1 /
/Host

But it feels like I'm doing something wrong.  I expect this to work, but 
it doesn't:


Host name=Site1 appBase=D:/www/site1 unpackWARs=false 
autoDeploy=false

  !-- this doesn't work !--
/Host

Can anyone explain why the snippet above doesn't work, and if that is 
the way it should be, then what is the purpose of Host/appBase?


TIA

--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Stop Tomcat8 Service Gracefully on Windows

2014-07-01 Thread Igal @ getRailo.org
)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown 
Source)

at java.util.concurrent.LinkedBlockingDeque.pollFirst(Unknown Source)
at java.util.concurrent.LinkedBlockingDeque.poll(Unknown Source)
at 
org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:144)


   Locked ownable synchronizers:
- None

Attach Listener - Thread t@5
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
- None

Signal Dispatcher - Thread t@4
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
- None

Finalizer - Thread t@3
   java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
- waiting on 1674ba21 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

   Locked ownable synchronizers:
- None

Reference Handler - Thread t@2
   java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
- waiting on 4967d80b (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

   Locked ownable synchronizers:
- None




On 6/30/2014 2:45 PM, Mark Thomas wrote:

On 30/06/2014 22:40, Igal @ getRailo.org wrote:

Does anyone know why Tomcat takes a full minute to stop?

Tomcat doesn't. It takes a few seconds to stop. Your application might
well take a full minute to stop. Try taking some thread dumps.

Mark



Is there a paid support for Tomcat?



On 6/27/2014 8:29 PM, Igal @ getRailo.org wrote:

And again there is a full minute between Service stop thread
completed. and Run service finished., which doesn't look like a
coincidence.

[2014-06-27 20:24:14] [info]  [ 3156] Stopping service...
[2014-06-27 20:24:15] [info]  [ 3156] Service stop thread completed.
[2014-06-27 20:25:15] [info]  [ 2520] Run service finished.
[2014-06-27 20:25:15] [info]  [ 2520] Commons Daemon procrun finished
Can anyone shed some light on this?


Igal

On 6/27/2014 2:08 PM, Igal @ getRailo.org wrote:

I installed Tomcat 8.09 on Windows 2008R2

When trying to stop the service it takes a long time, and usually I
get a prompt on the screen saying that there was an error.

Windows Event Log did not show anything about this, but
commons-daemon log shows:

[2014-06-27 13:59:53] [info]  [ 5504] Commons Daemon procrun
(1.0.15.0 64-bit) started
[2014-06-27 13:59:53] [info]  [ 5504] Running 'Tomcat8' Service...
[2014-06-27 13:59:53] [info]  [ 5176] Starting service...
[2014-06-27 13:59:54] [info]  [ 5176] Service started in 1185 ms.
*[2014-06-27 14:00:08] [info]  [ 3472] Stopping service...
[2014-06-27 14:00:09] [info]  [ 3472] Service stop thread completed.
[2014-06-27 14:01:09] [info]  [ 5504] Run service finished.
[2014-06-27 14:01:09] [info]  [ 5504] Commons Daemon procrun finished*
Why does it take a full minute from Service stop thread completed.
where the stop command has yet to return, until Run service
finished. when it actually does stop the service?

Is there any way to speed that up?

TIA


--
Igal Sapir
Railo Core Developer
http://getRailo.org/

--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



--
Igal Sapir
Railo Core Developer
http://getRailo.org/


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



Re: Stop Tomcat8 Service Gracefully on Windows

2014-07-01 Thread Igal @ getRailo.org

The offending thread was:  ehcache.data

Thank you for your help and insight,


Igal

On 7/1/2014 9:46 AM, Igal Sapir wrote:


I generated this with VisualVM.

I will try to generate in a different way, or to inspect the threads 
within the 60 seconds window as you suggested.


Thank you,

Igal

On Jul 1, 2014 9:42 AM, Mark Thomas ma...@apache.org 
mailto:ma...@apache.org wrote:


On 01/07/2014 17:13, Igal @ getRailo.org wrote:
 Hi Mark -- Thank you for replying.

 Here is a thread dump from about 30 seconds after I request to
stop the
 service.  Can you tell which thread is preventing the JVM from
exiting?

No, because the thread dump doesn't show whether a thread is a daemon
thread or not (which is odd - I thought the standard thread dump did
show that). My guess would be the timer threads. Use one of the many
tools that come with the JDK (or a profiler) to look at the
threads and
see which non-daemon threads are still running.

Mark

 Thanks again!


 2014-07-01 09:09:00
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03
mixed mode):

 DestroyJavaVM - Thread t@78
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
 - None

 Thread-24 - Thread t@61
java.lang.Thread.State: RUNNABLE
 at
sun.net.dns.ResolverConfigurationImpl.notifyAddrChange0(Native
 Method)
 at

sun.net.dns.ResolverConfigurationImpl$AddressChangeListener.run(Unknown
 Source)

Locked ownable synchronizers:
 - None

 RMI TCP Connection(4)-192.168.0.7 - Thread t@48
java.lang.Thread.State: RUNNABLE
 at sun.management.ThreadImpl.dumpThreads0(Native Method)
 at sun.management.ThreadImpl.dumpAllThreads(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.reflect.misc.Trampoline.invoke(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
 at

com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown
 Source)
 at

com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown
 Source)
 at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
 at
com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
 at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown
Source)
 at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)
 at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)
 at javax.management.StandardMBean.invoke(Unknown Source)
 at
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
 Source)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
 at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
 Source)
 at
javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown
 Source)
 at


javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
 Source)
 at

javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
 Source)
 at
javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
 at sun.rmi.transport.Transport$1.run(Unknown Source)
 at sun.rmi.transport.Transport$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)
 at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
 Source)
 at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(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:
 - locked 6cb0e9eb (a
java.util.concurrent.ThreadPoolExecutor$Worker)

 RMI TCP Connection(3

Re: Stop Tomcat8 Service Gracefully on Windows

2014-06-30 Thread Igal @ getRailo.org

Does anyone know why Tomcat takes a full minute to stop?

Is there a paid support for Tomcat?



On 6/27/2014 8:29 PM, Igal @ getRailo.org wrote:
And again there is a full minute between Service stop thread 
completed. and Run service finished., which doesn't look like a 
coincidence.


[2014-06-27 20:24:14] [info]  [ 3156] Stopping service...
[2014-06-27 20:24:15] [info]  [ 3156] Service stop thread completed.
[2014-06-27 20:25:15] [info]  [ 2520] Run service finished.
[2014-06-27 20:25:15] [info]  [ 2520] Commons Daemon procrun finished
Can anyone shed some light on this?


Igal

On 6/27/2014 2:08 PM, Igal @ getRailo.org wrote:

I installed Tomcat 8.09 on Windows 2008R2

When trying to stop the service it takes a long time, and usually I 
get a prompt on the screen saying that there was an error.


Windows Event Log did not show anything about this, but 
commons-daemon log shows:


[2014-06-27 13:59:53] [info]  [ 5504] Commons Daemon procrun (1.0.15.0 64-bit) 
started
[2014-06-27 13:59:53] [info]  [ 5504] Running 'Tomcat8' Service...
[2014-06-27 13:59:53] [info]  [ 5176] Starting service...
[2014-06-27 13:59:54] [info]  [ 5176] Service started in 1185 ms.
*[2014-06-27 14:00:08] [info]  [ 3472] Stopping service...
[2014-06-27 14:00:09] [info]  [ 3472] Service stop thread completed.
[2014-06-27 14:01:09] [info]  [ 5504] Run service finished.
[2014-06-27 14:01:09] [info]  [ 5504] Commons Daemon procrun finished*
Why does it take a full minute from Service stop thread completed. 
where the stop command has yet to return, until Run service 
finished. when it actually does stop the service?


Is there any way to speed that up?

TIA


--
Igal Sapir
Railo Core Developer
http://getRailo.org/


--
Igal Sapir
Railo Core Developer
http://getRailo.org/


--
Igal Sapir
Railo Core Developer
http://getRailo.org/



Stop Tomcat8 Service Gracefully on Windows

2014-06-27 Thread Igal @ getRailo.org

I installed Tomcat 8.09 on Windows 2008R2

When trying to stop the service it takes a long time, and usually I get 
a prompt on the screen saying that there was an error.


Windows Event Log did not show anything about this, but commons-daemon 
log shows:


[2014-06-27 13:59:53] [info]  [ 5504] Commons Daemon procrun (1.0.15.0 64-bit) 
started
[2014-06-27 13:59:53] [info]  [ 5504] Running 'Tomcat8' Service...
[2014-06-27 13:59:53] [info]  [ 5176] Starting service...
[2014-06-27 13:59:54] [info]  [ 5176] Service started in 1185 ms.
*[2014-06-27 14:00:08] [info]  [ 3472] Stopping service...
[2014-06-27 14:00:09] [info]  [ 3472] Service stop thread completed.
[2014-06-27 14:01:09] [info]  [ 5504] Run service finished.
[2014-06-27 14:01:09] [info]  [ 5504] Commons Daemon procrun finished*

Why does it take a full minute from Service stop thread completed. 
where the stop command has yet to return, until Run service finished. 
when it actually does stop the service?


Is there any way to speed that up?

TIA


--
Igal Sapir
Railo Core Developer
http://getRailo.org/



Re: Stop Tomcat8 Service Gracefully on Windows

2014-06-27 Thread Igal @ getRailo.org
And again there is a full minute between Service stop thread 
completed. and Run service finished., which doesn't look like a 
coincidence.


[2014-06-27 20:24:14] [info]  [ 3156] Stopping service...
[2014-06-27 20:24:15] [info]  [ 3156] Service stop thread completed.
[2014-06-27 20:25:15] [info]  [ 2520] Run service finished.
[2014-06-27 20:25:15] [info]  [ 2520] Commons Daemon procrun finished

Can anyone shed some light on this?


Igal

On 6/27/2014 2:08 PM, Igal @ getRailo.org wrote:

I installed Tomcat 8.09 on Windows 2008R2

When trying to stop the service it takes a long time, and usually I 
get a prompt on the screen saying that there was an error.


Windows Event Log did not show anything about this, but commons-daemon 
log shows:


[2014-06-27 13:59:53] [info]  [ 5504] Commons Daemon procrun (1.0.15.0 64-bit) 
started
[2014-06-27 13:59:53] [info]  [ 5504] Running 'Tomcat8' Service...
[2014-06-27 13:59:53] [info]  [ 5176] Starting service...
[2014-06-27 13:59:54] [info]  [ 5176] Service started in 1185 ms.
*[2014-06-27 14:00:08] [info]  [ 3472] Stopping service...
[2014-06-27 14:00:09] [info]  [ 3472] Service stop thread completed.
[2014-06-27 14:01:09] [info]  [ 5504] Run service finished.
[2014-06-27 14:01:09] [info]  [ 5504] Commons Daemon procrun finished*
Why does it take a full minute from Service stop thread completed. 
where the stop command has yet to return, until Run service 
finished. when it actually does stop the service?


Is there any way to speed that up?

TIA


--
Igal Sapir
Railo Core Developer
http://getRailo.org/


--
Igal Sapir
Railo Core Developer
http://getRailo.org/