Tomcat startup exception

2009-11-09 Thread Milan Tomic


I got this excpetion while starting Tomcat 6.0.20:

INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)

I have already used Google, but it didn't helped me.

What could be wrong? Exception messege here is not descriptive enough.

Thank you in advance,
Milan


  

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



A question about mod_jk 1.2.28 configuration

2009-11-09 Thread thomas2004

I newly installed the mod_jk 1.2.28 and since then got problem (see below).

**
We have a web application deployed on Jboss (RH Linux OS). The access to the
web application is via a Apache Httpd Web Server. One of the function of
this web application is one can online generate PDF-reports. This report
could by quite big (30 MB). After the report is generated (this will take
about 20 to 40 min.) it will show up on the browser.

Formerly we have mod_jk 1.2.26 and everything is ok. Since a week we update
the mod_jk to 1.2.28 and got problem. Exactly to say, the PDF-report can not
be shown up on browser. One can find some error messages in mod_jk.log as
follow:

Code:

[Tue Nov 03 11:03:07 2009] [12138:2537062720] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (1150):
(worker_portfolio_son1) can't receive the response header message from
tomcat, network problems or tomcat (172.23.17.37:8009) is down (errno=11)
[Tue Nov 03 11:03:07 2009] [12138:2537062720] [error]
ajp_get_reply::jk_ajp_common.c (1962): (worker_portfolio_son1) Tomcat is
down or refused connection. No response has been sent to the client (yet)
[Tue Nov 03 11:03:07 2009] [12138:2537062720] [info]
ajp_service::jk_ajp_common.c (2447): (worker_portfolio_son1) sending request
to tomcat failed (recoverable), (attempt=2) [Tue Nov 03 11:03:07 2009]
[12138:2537062720] [error] ajp_service::jk_ajp_common.c (2466):
(worker_portfolio_son1) connecting to tomcat failed. [Tue Nov 03 11:03:07
2009] worker_portfolio_son1 citibank-extranet-ru-test.civ-versicherung.de
244.108419 [Tue Nov 03 11:03:07 2009] [12138:2537062720] [info]
jk_handler::mod_jk.c (2615): Service error=0 for
worker=worker_portfolio_son1

From google I know this could be a problem of reply_timeout. I set the
reply_timeout in workers.properties but it doesn't help. Here is my
workers.properties.

Code:

worker.list=jkstatus, worker_portfolio_son1
worker.worker_portfolio_son1.connection_pool_timeout=600
worker.worker_portfolio_son1.socket_timeout=120
worker.worker_portfolio_son1.socket_keepalive=True
worker.worker_portfolio_son1.lbfactor=1
worker.worker_portfolio_son1.type=ajp13
worker.worker_portfolio_son1.port=8009
worker.worker_portfolio_son1.host=appl-portfolio-test.proactiv.de
worker.worker_portfolio_son1.sticky_session=True
worker.worker_portfolio_son1.reply_timeout=360


-- 
View this message in context: 
http://old.nabble.com/A-question-about-mod_jk-1.2.28-configuration-tp26264069p26264069.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: errno 110 in mod_jk

2009-11-09 Thread Rainer Jung
On 09.11.2009 03:13, Mohit Anchlia wrote:
 Thanks. Looks like we are hitting the same bug.
 
 I am still looking for an answer to one of my questions that I posted earlier.
 
 To narrow down I just left one node running and started the test. When I
 look at JkStatus worker I see that even though all other nodes are down
 it's still showing OK in the status for those workers. I am not sure
 why it would do
 that. I expect it to show the workers in ERR status.

No, there are two statuses: activation and state.
If you down a worker via activation, its activation will be displayed
either as disabled or stopped according to your config, but its runtime
status is OK (i.e. there is no error, because you put it out of order
administratively). It should be shown as OK/IDLE, i.e. we expect it to
work, but it hasn't been used for a long time, so we can't be sure.

status ERR is only shown, if a request detected the backend is not working.

 Do you know the default timeout of connectionTimeout? I am getting
 conflicting results. Some place it says 6 and other places 60.
 Is there any disadvantage of setting this value too low?

Default: no timeout.
Setting too low: the lower you set it, the more often connections will
be closed an later reopened. It is a question of how long a connection
should be reused. For server to server you want that to be typically  1
minute. Why not resuing for a very long time, e.g. unlimited? Because in
case there is a firewall in between httpd and Tomcat it might drop idle
connections. Also you might want to free connections (and thus threads)
which were only necessary due to peak load or failover.

I usually suggest something between 1 and 10 minutes.

Regards,

Rainer

 On Sun, Nov 8, 2009 at 9:59 AM, Rainer Jung rainer.j...@kippdata.de wrote:
 On 08.11.2009 01:36, Mohit Anchlia wrote:
 Could someone please help me understand this?

 What about adding connectionTimeout to the JBoss Connector element (and
 keep its value in sync with connection_pool_timeout^for the ajp workers.
 Note that the Connector attribute is in milliseconds, the worker
 attribute in seconds.

 Also make sure that you weren't hit by

 https://jira.jboss.org/jira/browse/JBPAPP-366

 Regards,

 Rainer

 On Sat, Nov 7, 2009 at 8:50 AM, Mohit Anchlia mohitanch...@gmail.com 
 wrote:
 I am also seeing that in Jboss (Back End) that there are lot of keep
 alive sessions and I think that's the reason I am seeing the timeout.
 As I add new web server it hits the 250 MaxThreads limit and then it
 start to timeout. Those threads are there even though not doing any
 work. I tried disabling keepalive in worker.properties but still those
 threads are not being freed up.

 Could someone please tell me why that might be happening?

 On Sat, Nov 7, 2009 at 7:25 AM, Mohit Anchlia mohitanch...@gmail.com 
 wrote:
 To narrow down I just left one node running and started test. When I
 look at JkStatus worker I see even though all other nodes are down
 it's still showing OK in the status. I am not sure why it would do
 that. Could this be the reason why I am seeing slow response times in
 mod-jk?

 On Fri, Nov 6, 2009 at 6:30 PM, Mohit Anchlia mohitanch...@gmail.com 
 wrote:
 I am looking at the tcpdump but I don't see packet retransmits. What
 should I expect to see in tcpdump? thanks for your help.

 On Fri, Nov 6, 2009 at 4:05 PM, Rainer Jung rainer.j...@kippdata.de 
 wrote:
 $ grep 110 /usr/include/*/errno.h

 #defineETIMEDOUT   110 /* Connection timed out */

 On 07.11.2009 00:56, Mohit Anchlia wrote:
 I turned on mod_jk debug and see:

 [Fri Nov 06 15:48:31.190 2009] [31055:4143340384] [info]
 ajp_handle_cping_cpong::jk_ajp_common.c (865): timeout in reply cpong

 So your backend doesn't send the required cpong answer during the
 timeout ou configured.

 [Fri Nov 06 15:48:31.191 2009] [31055:4143340384] [debug]
 jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 14
 [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [debug]
 jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0
 lingering bytes
 [Fri Nov 06 15:48:31.256 2009] [31044:4143340384] [error]
 ajp_connect_to_endpoint::jk_ajp_common.c (957): (eitappfe2)
 cping/cpong after connecting to the backend server failed (errno=110)
 [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [error]
 ajp_send_request::jk_ajp_common.c (1467): (eitappfe2) connecting to
 backend failed. Tomcat is probably not started or is listening on the
 wrong port (errno=110)
 [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [info]
 ajp_service::jk_ajp_common.c (2407): (eitappfe2) sending request to
 tomcat failed (recoverable), because of error during request sending
 (attempt=1)
 [Fri Nov 06 15:48:31.257 2009] [31044:4143340384] [debug]
 ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms
 before retrying
 [Fri Nov 06 15:48:31.314 2009] [31032:4143340384] [debug]
 jk_shutdown_socket::jk_connect.c (731): Shutdown socket 14 and read 0
 

Re: Tomcat startup exception

2009-11-09 Thread Pid

On 09/11/2009 09:40, Milan Tomic wrote:



I got this excpetion while starting Tomcat 6.0.20:

INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)

I have already used Google, but it didn't helped me.

What could be wrong? Exception messege here is not descriptive enough.


Post the full stacktrace please.

Your server.xml with comments removed and any other pertinent config, 
e.g. META-INF/context.xml would also be useful, as would some 
information about your setup.


Is this a vanilla install?

On which OS/version?



p



Thank you in advance,
Milan




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




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



Re: Tomcat startup exception

2009-11-09 Thread Milan Tomic
Hi Pid,


 Post the full stacktrace please.
At the end of this mail.

 Your server.xml with comments removed
At the end of this mail.

 Is this a vanilla install?
I have just installed it and moved some apps from tomcat 5.0.

 On which OS/version?
Windows 2003 Server

Thank you! :)


LOG:
Using CATALINA_BASE:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_HOME:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_TMPDIR: D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20\temp
Using JRE_HOME:    D:\LPIS_0\jdk_jRockIt\jrrt-3.1.0-1.6.0
9.11.2009 9:22:49 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting property
'debug' to '1' did not find a matching property.
9.11.2009 9:22:49 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\LPIS_0\j
dk_jRockIt\jrrt-3.1.0-1.6.0\bin;.;C:\WINDOWS\system32;C:\Documents and Settings\
Administrator\WINDOWS;D:\oracle\product\10.2.0\bin;D:\oracle\product\10.1.0\db\j
re\1.4.2\bin\client;D:\oracle\product\10.1.0\db\jre\1.4.2\bin;D:\oracle\product\
10.1.0\db\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
\system32\nls;C:\WINDOWS\system32\nls\ENGLISH
9.11.2009 9:22:49 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8082
9.11.2009 9:22:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1088 ms
9.11.2009 9:22:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.josso.Lookup.clinit(Lookup.java:55)
    at com.sinergise.josso.tc60.agent.SSOAgentValve.start(SSOAgentValve.java
:201)
    at org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java
:233)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1050)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
)
    at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:290)
    ... 1 more




SERVER.XML:
?xml version='1.0' encoding='utf-8'?
Server port=8008 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
    Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
  Service name=Catalina
  
    Connector port=8082 maxThreads=800 maxKeepAliveRequests=999 
minSpareThreads=200 maxSpareThreads=400 enableLookups=false 
protocol=HTTP/1.1 
   connectionTimeout=2 acceptCount=100 debug=0 
disableUploadTimeout=true
   redirectPort=8443 /
    Connector port=8011 protocol=AJP/1.3 redirectPort=8443 /

    Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=localhost  appBase=webapps
    unpackWARs=true autoDeploy=true
    xmlValidation=false xmlNamespaceAware=false
 

Re: Tomcat startup exception

2009-11-09 Thread Milan Tomic
Oh, I have missed this line:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

it seems that Log4J is missing.

Best regards,
Milan



- Original Message 
From: Milan Tomic tomicmi...@yahoo.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Mon, November 9, 2009 12:32:47 PM
Subject: Re: Tomcat startup exception

Hi Pid,


 Post the full stacktrace please.
At the end of this mail.

 Your server.xml with comments removed
At the end of this mail.

 Is this a vanilla install?
I have just installed it and moved some apps from tomcat 5.0.

 On which OS/version?
Windows 2003 Server

Thank you! :)


LOG:
Using CATALINA_BASE:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_HOME:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_TMPDIR: D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20\temp
Using JRE_HOME:    D:\LPIS_0\jdk_jRockIt\jrrt-3.1.0-1.6.0
9.11.2009 9:22:49 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting property
'debug' to '1' did not find a matching property.
9.11.2009 9:22:49 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\LPIS_0\j
dk_jRockIt\jrrt-3.1.0-1.6.0\bin;.;C:\WINDOWS\system32;C:\Documents and Settings\
Administrator\WINDOWS;D:\oracle\product\10.2.0\bin;D:\oracle\product\10.1.0\db\j
re\1.4.2\bin\client;D:\oracle\product\10.1.0\db\jre\1.4.2\bin;D:\oracle\product\
10.1.0\db\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
\system32\nls;C:\WINDOWS\system32\nls\ENGLISH
9.11.2009 9:22:49 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8082
9.11.2009 9:22:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1088 ms
9.11.2009 9:22:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.josso.Lookup.clinit(Lookup.java:55)
    at com.sinergise.josso.tc60.agent.SSOAgentValve.start(SSOAgentValve.java
:201)
    at org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java
:233)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1050)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
)
    at org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:290)
    ... 1 more




SERVER.XML:
?xml version='1.0' encoding='utf-8'?
Server port=8008 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
    Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
  Service name=Catalina
  
    Connector port=8082 maxThreads=800 maxKeepAliveRequests=999 
minSpareThreads=200 maxSpareThreads=400 enableLookups=false 
protocol=HTTP/1.1 
   connectionTimeout=2 acceptCount=100 debug=0 
disableUploadTimeout=true
   redirectPort=8443 /
    Connector port=8011 

Deploying and building a war file

2009-11-09 Thread Ziggy
Hi all,

I've got a query on the way web applications are deployed. I have an
application that has several jsp files and serlvets that are in
WEB-INF/classes.

When i deploy the application all i do is do a checkout on CVS, make the
changes, rebuild the war using ANT and redeploy manually. This works fine
but now i am having some doubts on this approach.

Basicaly if i even change one file i have to rebuild the war file meaning i
have to recompile everything. I think this is unecessary. i would like to be
able to just recompile the one file and redeploy the one file without having
to rebuild the whole war file.

1. How do you deploy your application? If you deploy as a war file, do you
recompile everything even if the change is to a single file or a
configuration file.

2. Could you provide an example on the approach you use from the point a
source file comes out from CVS to the point it get to the production
environment. (An example with a single file change would be usefull)

2. Do you use any tool to manage this?

I am thinking that if i change one file i should be able to just compile
that one file and move it to the WEB-INF/classes folder into the relevant
folder. This might work but is there a better way of doing this instead of
moving it manually?


Thanks


Re: Tomcat startup exception

2009-11-09 Thread Pid

On 09/11/2009 11:49, Milan Tomic wrote:

Oh, I have missed this line:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

it seems that Log4J is missing.

Best regards,
Milan



- Original Message 
From: Milan Tomictomicmi...@yahoo.com
To: Tomcat Users Listusers@tomcat.apache.org
Sent: Mon, November 9, 2009 12:32:47 PM
Subject: Re: Tomcat startup exception

Hi Pid,



Post the full stacktrace please.

At the end of this mail.


Your server.xml with comments removed

At the end of this mail.


Is this a vanilla install?

I have just installed it and moved some apps from tomcat 5.0.


On which OS/version?

Windows 2003 Server

Thank you! :)


LOG:
Using CATALINA_BASE:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_HOME:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_TMPDIR: D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20\temp
Using JRE_HOME:D:\LPIS_0\jdk_jRockIt\jrrt-3.1.0-1.6.0
9.11.2009 9:22:49 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting property
'debug' to '1' did not find a matching property.


This isn't harmful, but it's worth noting that Tomcat config practices 
have changed just a little between 5.0 and 6.0.


Take the debug=1 line out to clean up this message.


9.11.2009 9:22:49 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\LPIS_0\j
dk_jRockIt\jrrt-3.1.0-1.6.0\bin;.;C:\WINDOWS\system32;C:\Documents and Settings\
Administrator\WINDOWS;D:\oracle\product\10.2.0\bin;D:\oracle\product\10.1.0\db\j
re\1.4.2\bin\client;D:\oracle\product\10.1.0\db\jre\1.4.2\bin;D:\oracle\product\
10.1.0\db\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
\system32\nls;C:\WINDOWS\system32\nls\ENGLISH


Comment out the AprLifecycleListener to clean up this message, if you're 
not intending to use tcnative.



9.11.2009 9:22:49 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8082
9.11.2009 9:22:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1088 ms
9.11.2009 9:22:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 at org.josso.Lookup.clinit(Lookup.java:55)


As you recognise, you're missing commons-logging.jar.


 at 
com.sinergise.josso.tc60.agent.SSOAgentValve.start(SSOAgentValve.java
:201)
 at 
org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java
:233)
 at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1050)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
 at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
)
 at 
org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
 at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:290)
 ... 1 more




SERVER.XML:
?xml version='1.0' encoding='utf-8'?
Server port=8008 shutdown=SHUTDOWN
   Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
   Listener className=org.apache.catalina.core.JasperListener /
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
   Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
   GlobalNamingResources
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   

RE: Deploying and building a war file

2009-11-09 Thread Martin Gainty

ant war task 
http://ant.apache.org/manual/CoreTasks/war.html

or maven-war-plugin
http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html
(in the case of maven you MUST adhere to the directory layout suggested)

either build environment will perform these tasks for you
you can ask ant-users list for more information
http://ant.apache.org/mail.html

or maven-users list if you prefer a version specific way to manage the build
http://maven.apache.org/mail-lists.html

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Mon, 9 Nov 2009 12:04:12 +
 Subject: Deploying and building a war file
 From: zigg...@gmail.com
 To: users@tomcat.apache.org
 
 Hi all,
 
 I've got a query on the way web applications are deployed. I have an
 application that has several jsp files and serlvets that are in
 WEB-INF/classes.
 
 When i deploy the application all i do is do a checkout on CVS, make the
 changes, rebuild the war using ANT and redeploy manually. This works fine
 but now i am having some doubts on this approach.
 
 Basicaly if i even change one file i have to rebuild the war file meaning i
 have to recompile everything. I think this is unecessary. i would like to be
 able to just recompile the one file and redeploy the one file without having
 to rebuild the whole war file.
 
 1. How do you deploy your application? If you deploy as a war file, do you
 recompile everything even if the change is to a single file or a
 configuration file.
 
 2. Could you provide an example on the approach you use from the point a
 source file comes out from CVS to the point it get to the production
 environment. (An example with a single file change would be usefull)
 
 2. Do you use any tool to manage this?
 
 I am thinking that if i change one file i should be able to just compile
 that one file and move it to the WEB-INF/classes folder into the relevant
 folder. This might work but is there a better way of doing this instead of
 moving it manually?
 
 
 Thanks
  
_
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/


RE: Tomcat startup exception

2009-11-09 Thread Martin Gainty

this is my log4j

$CATALINA_HOME/lib
09/14/2006  06:04 AM   367,444 log4j-1.2.14.jar

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Mon, 9 Nov 2009 03:49:48 -0800
 From: tomicmi...@yahoo.com
 Subject: Re: Tomcat startup exception
 To: users@tomcat.apache.org
 
 Oh, I have missed this line:
 
 Caused by: java.lang.NoClassDefFoundError: 
 org/apache/commons/logging/LogFactory
 
 it seems that Log4J is missing.
 
 Best regards,
 Milan
 
 
 
 - Original Message 
 From: Milan Tomic tomicmi...@yahoo.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Mon, November 9, 2009 12:32:47 PM
 Subject: Re: Tomcat startup exception
 
 Hi Pid,
 
 
  Post the full stacktrace please.
 At the end of this mail.
 
  Your server.xml with comments removed
 At the end of this mail.
 
  Is this a vanilla install?
 I have just installed it and moved some apps from tomcat 5.0.
 
  On which OS/version?
 Windows 2003 Server
 
 Thank you! :)
 
 
 LOG:
 Using CATALINA_BASE:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
 Using CATALINA_HOME:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
 Using CATALINA_TMPDIR: D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20\temp
 Using JRE_HOME:D:\LPIS_0\jdk_jRockIt\jrrt-3.1.0-1.6.0
 9.11.2009 9:22:49 org.apache.tomcat.util.digester.SetPropertiesRule begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting 
 property
 'debug' to '1' did not find a matching property.
 9.11.2009 9:22:49 org.apache.catalina.core.AprLifecycleListener init
 INFO: The APR based Apache Tomcat Native library which allows optimal 
 performanc
 e in production environments was not found on the java.library.path: 
 D:\LPIS_0\j
 dk_jRockIt\jrrt-3.1.0-1.6.0\bin;.;C:\WINDOWS\system32;C:\Documents and 
 Settings\
 Administrator\WINDOWS;D:\oracle\product\10.2.0\bin;D:\oracle\product\10.1.0\db\j
 re\1.4.2\bin\client;D:\oracle\product\10.1.0\db\jre\1.4.2\bin;D:\oracle\product\
 10.1.0\db\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
 \system32\nls;C:\WINDOWS\system32\nls\ENGLISH
 9.11.2009 9:22:49 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8082
 9.11.2009 9:22:50 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1088 ms
 9.11.2009 9:22:50 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
 java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 Caused by: java.lang.NoClassDefFoundError: 
 org/apache/commons/logging/LogFactory
 at org.josso.Lookup.clinit(Lookup.java:55)
 at 
 com.sinergise.josso.tc60.agent.SSOAgentValve.start(SSOAgentValve.java
 :201)
 at 
 org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java
 :233)
 at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1050)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
 at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
 )
 at 
 org.apache.catalina.core.StandardService.start(StandardService.java:5
 16)
 at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:710
 )
 at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
 at 

Nagios3 and Tomcat6 configuration under Apache2.2

2009-11-09 Thread Paolo Santarsiero
Hi, I  have a Tomcat6 cluster under Apache2.2. I'd like to monitor the
system and so I want to use nagios3 but I don't know how configure
VirtualHosts for Tomcat and Nagios under Apache ( I use Ubuntu so I have
/etc/apache2/ports.conf and /etc/apache2/sites-enabled/000-default). I hope
you can help me.


[SECURITY] CVE-2009-3548 Apache Tomcat Windows Installer insecure default administrative password

2009-11-09 Thread Mark Thomas
CVE-2009-3548: Apache Tomcat Windows Installer insecure default
administrative password

Severity: Low

Vendor:
The Apache Software Foundation

Versions Affected:
Tomcat 5.5.0 to 5.5.28
Tomcat 6.0.0 to 6.0.20

The unsupported Tomcat 3.x, 4.0.x, 4.1.x and 5.0.x versions may be also
affected.

Description:
The Windows installer defaults to a blank password for the
administrative user. If this is not changed during the install process,
then by default a user is created with the name admin, roles admin and
manager and a blank password.

Mitigation:
Users of all Tomcat versions may mitigate this issue by one of the
following methods:
- Using the .zip or .tar.gz distributions
- Specifying a strong password for the admin user when using the
  Windows installer
- Removing the admin user from the tomcat-users.xml file after the
  Windows installer has completed
- Editing the tomcat-users.xml file to provide the admin user with
  a strong password after the Windows installer has completed

A patch for this issue [1] has been applied to trunk and will be
included in the next releases of 6.0.x and 5.5.x

Credit:
This issue was reported directly [2] to the tomcat users public mailing
list by David Horheim.
Security researchers are reminded that undisclosed vulnerabilities in
Apache Tomcat should, in the first instance, be reported to the private
security mailing list. [3]

References:
[1] http://svn.apache.org/viewvc?view=revisionrevision=834047
[2] http://markmail.org/thread/wfu4nff5chvkb6xp
[3] http://tomcat.apache.org/security.html

Mark Thomas



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



Re: Windows distribution vunerability

2009-11-09 Thread Mark Thomas
Tim Funk wrote:
 Confirmed. The docs are not in sync with what the installer does. We'll
 get this fixed in a future release.
 
 In future, please report possible security issues privately rather than
 publicly.
 
 -Tim

To complete the thread, this was announced as CVE-2009-3548.

Mark

 
 David Norheim wrote:
 Hi,

 I would like someone's opinion on the following issue that we have
 discovered using the windows distribution of Tomcat 6. (tested for
 Tomcat 6.0.14, 6.0.16 and 6.0.20 downloaded from [1] )

 The documentation for Tomcat 6 states

 It would be quite unsafe to ship Tomcat with default settings that
 allowed anyone on the Internet to execute the Manager application on
 your server. Therefore, the Manager application is shipped with the
 requirement that anyone who attempts to use it must authenticate
 themselves, using a username and password that have the role manager
 associated with them. Further, there is no username in the default
 users file ($CATALINA_BASE/conf/tomcat-users.xml) that is assigned
 this role. Therefore, access to the Manager application is completely
 disabled by default.



 While installing the zip or tar.gz version of the binary distributions
 does not open for the manager application, the windows exe version does.

 Having downloaded the exe version and started the wizard you get to
 screen where you are asked to enter Administrator Login username and
 password. The default settings leaves you with a tomcat-users.xml file
 that has the manager application enabled. Also there are (as far as I
 can see) no way to avoid this step in the installation wizard.

 The net result is that you end up with an unsafe installation, having
 this statement in the tomcat-users.xml file

 user name=admin password= roles=admin,manager /

 This is as far as I can see related to some of the problems that has
 occurred in the past, notably [2] and we also had a situation related
 to this in our installation. As far as I can see there is nothing
 wrong with the distribution file itself - it seems to be valid in
 relation to the md5 file so this must have been a design choice.

 Could someone please comment on this, and if there are any planned
 actions related to this.

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




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



Re: Tomcat startup exception

2009-11-09 Thread Pid

On 09/11/2009 13:14, Martin Gainty wrote:


this is my log4j

$CATALINA_HOME/lib
09/14/2006  06:04 AM   367,444 log4j-1.2.14.jar


My cat's name is Mittens.

p


Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.





Date: Mon, 9 Nov 2009 03:49:48 -0800
From: tomicmi...@yahoo.com
Subject: Re: Tomcat startup exception
To: users@tomcat.apache.org

Oh, I have missed this line:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

it seems that Log4J is missing.

Best regards,
Milan



- Original Message 
From: Milan Tomictomicmi...@yahoo.com
To: Tomcat Users Listusers@tomcat.apache.org
Sent: Mon, November 9, 2009 12:32:47 PM
Subject: Re: Tomcat startup exception

Hi Pid,



Post the full stacktrace please.

At the end of this mail.


Your server.xml with comments removed

At the end of this mail.


Is this a vanilla install?

I have just installed it and moved some apps from tomcat 5.0.


On which OS/version?

Windows 2003 Server

Thank you! :)


LOG:
Using CATALINA_BASE:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_HOME:   D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20
Using CATALINA_TMPDIR: D:\LPIS_0\Tomcat2_novo\apache-tomcat-6.0.20\temp
Using JRE_HOME:D:\LPIS_0\jdk_jRockIt\jrrt-3.1.0-1.6.0
9.11.2009 9:22:49 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Realm} Setting property
'debug' to '1' did not find a matching property.
9.11.2009 9:22:49 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: D:\LPIS_0\j
dk_jRockIt\jrrt-3.1.0-1.6.0\bin;.;C:\WINDOWS\system32;C:\Documents and Settings\
Administrator\WINDOWS;D:\oracle\product\10.2.0\bin;D:\oracle\product\10.1.0\db\j
re\1.4.2\bin\client;D:\oracle\product\10.1.0\db\jre\1.4.2\bin;D:\oracle\product\
10.1.0\db\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
\system32\nls;C:\WINDOWS\system32\nls\ENGLISH
9.11.2009 9:22:49 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8082
9.11.2009 9:22:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1088 ms
9.11.2009 9:22:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
9.11.2009 9:22:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 at org.josso.Lookup.clinit(Lookup.java:55)
 at 
com.sinergise.josso.tc60.agent.SSOAgentValve.start(SSOAgentValve.java
:201)
 at 
org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java
:233)
 at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1050)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
 at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
)
 at 
org.apache.catalina.core.StandardService.start(StandardService.java:5
16)
 at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   

Re: Nagios3 and Tomcat6 configuration under Apache2.2

2009-11-09 Thread Pid

On 09/11/2009 13:45, Paolo Santarsiero wrote:

Hi, I  have a Tomcat6 cluster under Apache2.2. I'd like to monitor the
system and so I want to use nagios3 but I don't know how configure
VirtualHosts for Tomcat and Nagios under Apache ( I use Ubuntu so I have
/etc/apache2/ports.conf and /etc/apache2/sites-enabled/000-default). I hope
you can help me.



You'll be wanting to read the docs then.

 http://tomcat.apache.org/tomcat-6.0-doc/


p

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



Re: Tomcat startup exception

2009-11-09 Thread André Warnier

Pid wrote:


My cat's name is Mittens.


and mimsy were the borogroves.

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



Re: Nagios3 and Tomcat6 configuration under Apache2.2

2009-11-09 Thread André Warnier

Pid wrote:

On 09/11/2009 13:45, Paolo Santarsiero wrote:

Hi, I  have a Tomcat6 cluster under Apache2.2. I'd like to monitor the
system and so I want to use nagios3 but I don't know how configure
VirtualHosts for Tomcat and Nagios under Apache ( I use Ubuntu so I have
/etc/apache2/ports.conf and /etc/apache2/sites-enabled/000-default). I 
hope

you can help me.



You'll be wanting to read the docs then.

 http://tomcat.apache.org/tomcat-6.0-doc/


Would this be more useful ?
http://httpd.apache.org

Paolo,
this is more of an Apache httpd issue than a Tomcat one.
The Apache httpd forum is mentioned here :
http://httpd.apache.org/lists.html#http-users


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



Re: Tomcat startup exception

2009-11-09 Thread Pid

On 09/11/2009 15:46, André Warnier wrote:

and mimsy were the borogroves


Aha!  You've employed the Inclined Sandle Variation presuming that will 
flummox me; but I have the perfect riposte: marmoset singlehat.


I think you'll find you've been boxed.


p


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



RE: Tomcat startup exception

2009-11-09 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Tomcat startup exception
 
 I think you'll find you've been boxed.

Goo goo g'joob.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



[SECURITY] CVE-2009-3555 SSL Man-In-The-Middle attack

2009-11-09 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

A vulnerability in the TLS protocol has recently been made public [1]
that allows an attacker to inject arbitrary requests into an TLS stream.

The current understanding of the Tomcat developers is as follows:

BIO  NIO connectors using JSSE
These connectors are vulnerable when renegotiation is triggered by the
client or the server.
Server initiated re-negotiation can be limited by configuration
Server initiated re-negotiation could be prevented by a code change
Client initiated re-negotiation can not currently be prevented

APR/Native connector using OpenSSL
Vulnerable when renegotiation is triggered by the client or the server.
Server initiated re-negotiation is not supported prior to 1.1.17
Client initiated re-negotiation is supported but can not be prevented

OpenSSL 0.9.8l disables all negotiation by default


In terms of what this means for users:

BIO/NIO
- - We haven't yet (we are still looking) found a way to stop client
  initiated renegotiation. It may be necessary to wait for the JVM
  vendors to respond.

APR/native
- - Re-building any version of the APR/native connector with OpenSSL
  0.9.8l will protect against this vulnerability but any configurations
  that require renegotiation will break.
- - Version 1.1.17 of the APR/native connector will be released shortly.
  The binary versions will be built with OpenSSL 0.9.8l which will
  protect against this vulnerability but configurations that require
  renegotiation will break.

Supporting renegotiation whilst avoiding the vulnerability requires a
protocol fix. The Tomcat development team is examining possible
work-arounds that may provide an interim solution. These options include
porting r833582 from httpd to the APR/native connector which would
disable client triggered renegotiation for OpenSSL  0.9.8l which may
help some users who can't easily change their OpenSSL version.

If you'd would like to join/follow the work-around discussions, please
join the Tomcat dev mailing list. Any significant developments in this
area will be posted to the Tomcat announce@ and users@ mailing lists.

Mark

[1] http://extendedsubset.com/?p=8
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJK+Ea6AAoJEBDAHFovYFnnjggP/RU6UpOmXDCzOG/neVmMI0RX
XMKMZdpph8TCdjOzOd1UdCGPK5q3U1CDvB7P96eYZ5R745YTT6Ct1hXETC++SAh2
Q6jRD2qNPXX7hA9JFallC6+PUjq+IaHknJQYGAFaHCEdvwocp8NYWxUSqg5yTc6U
toUclHntjEwXc6jpEeNwuU3An8WNf2rX5OV9IX17lS7mxtElfVVIM5o4PrkMV0Tn
5i3YpLXTzHIHZ3Wv6VOlsQy+X+JhM4GMWF+4wWgHzdUfQ3wCpUrmC/tOgsXp23j8
ITPqIcf5dsDsOEd9RAZRWoRPpgcJH3bypnmG65VpITRkjnvKq6GC1TcKXTdUBxER
0OwpAY2A/e6OzHpw68q0wn5deYKBEo+6DJ/rFmHCs4KYiw7WXpOQFsL5LXxuDfEr
7W79w1nEPAaXz6KGSGiEuPxyLtJafAP16ZtaITqzoI9Pn1bpl9iP/OK+2OTc/e+/
BF0vI0gh2ZD2AbktNZJLY8+i5FmF/jcJP6/SQLnFQl5AZQ6YhRNQl87bc4lEkZkm
IHIdJW28EbD/4V0Yex8MnAFIFEq/jyWe2LgUep0/j9LEkMKlFGpoNNgEQsA9E8ml
RR9adgTCESBN6cCCsn5CrYTlsTKyfxk/Db2inI7L/OM3zfQoCTQDFnxY1l13I+Dt
FiHrC9dgiTCEZL0fR69F
=xrMK
-END PGP SIGNATURE-



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



How do I set the location of where catalina.out goes

2009-11-09 Thread Campbell, Lance
Tomcat 6
How do I set the location and file name of catalina.out?

Thanks,

Lance Campbell
Project Manager/Software Architect/DBA
Web Services at Public Affairs
217-333-0382



RE: How do I set the location of where catalina.out goes

2009-11-09 Thread Caldarale, Charles R
 From: Campbell, Lance [mailto:la...@illinois.edu]
 Subject: How do I set the location of where catalina.out goes
 
 How do I set the location and file name of catalina.out?

The catalina.out file is not used directly by Tomcat itself.  Rather, it's a 
redirection of stdout and stderr set up by the catalina.sh script.  You're free 
to modify the script to redirect anywhere you want; note that there are three 
references to the file in the script.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: How do I set the location of where catalina.out goes

2009-11-09 Thread Campbell, Lance
It just occurred to me to use a symbolic link.  That works great. 


Thanks,

Lance Campbell
Project Manager/Software Architect/DBA
Web Services at Public Affairs
217-333-0382

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, November 09, 2009 11:21 AM
To: Tomcat Users List
Subject: RE: How do I set the location of where catalina.out goes

 From: Campbell, Lance [mailto:la...@illinois.edu]
 Subject: How do I set the location of where catalina.out goes
 
 How do I set the location and file name of catalina.out?

The catalina.out file is not used directly by Tomcat itself.  Rather,
it's a redirection of stdout and stderr set up by the catalina.sh
script.  You're free to modify the script to redirect anywhere you want;
note that there are three references to the file in the script.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
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



Identifying Clients via SSL Certificates

2009-11-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I've been playing around with client SSL certificates, not for
authentication per se, but as a gateway to a relaxed authentication
mechanism for one of our webapps.

I have a client SSL cert working (see my previous thread mod_jk 
Client SSL Certificates) and successfully verifying the signature of
the client cert by the server.

I'd like to be able to uniquely identify the client certificate being
used to authenticate via SSL, but I'm a newbie at this sort of thing and
I'd appreciate some suggestions as to how to do that. A few ideas I've
had are:

1. Use a directory-style 'CN' attribute like UID=myuniqueid

2. Use the fingerprint of the client certificate

3. Use the full text of the client certificate

All 3 of the above can be used to then link to appropriate records in
the database for limited authentication.

Does anyone have any suggestions or preferred techniques?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr4aBwACgkQ9CaO5/Lv0PDIFgCfb69oibXH3GAwQ1R4z40eux+w
lQcAoL5rFQHQX2rSWjh1LVoptUHXCQLt
=gPOY
-END PGP SIGNATURE-

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



Re: Deploying and building a war file

2009-11-09 Thread Ken Bowen
If you use Eclipse (www.eclipse.org/   free; runs on Wins/Mac/Linux)  
with the web plugins, it records your deploy target, and allows you to  
deploy with either a war file, or in exploded form.  In the latter  
case, you can usually leave your web server running, make a code  
change, save the file, and it is automatically re-compiled  re- 
deployed to the running server.  At worst, you only need to hit a  
refresh button.  It makes life much simpler, and the syntax-directed  
editor saves me from many stupidities.


--Ken

On Nov 9, 2009, at 7:04 AM, Ziggy wrote:


Hi all,

I've got a query on the way web applications are deployed. I have an
application that has several jsp files and serlvets that are in
WEB-INF/classes.

When i deploy the application all i do is do a checkout on CVS, make  
the
changes, rebuild the war using ANT and redeploy manually. This works  
fine

but now i am having some doubts on this approach.

Basicaly if i even change one file i have to rebuild the war file  
meaning i
have to recompile everything. I think this is unecessary. i would  
like to be
able to just recompile the one file and redeploy the one file  
without having

to rebuild the whole war file.

1. How do you deploy your application? If you deploy as a war file,  
do you

recompile everything even if the change is to a single file or a
configuration file.

2. Could you provide an example on the approach you use from the  
point a

source file comes out from CVS to the point it get to the production
environment. (An example with a single file change would be usefull)

2. Do you use any tool to manage this?

I am thinking that if i change one file i should be able to just  
compile
that one file and move it to the WEB-INF/classes folder into the  
relevant
folder. This might work but is there a better way of doing this  
instead of

moving it manually?


Thanks



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



Re: Want to customise the tomcat's session logic

2009-11-09 Thread Martin Choma
Ok, i think i see what you mean. As far as I know there is no quickwin
for that. Web application suffer with this disease - that mean sharing
session over tabs. You have got three choices to deal with that.
A) You dont mind :)
B) You will prevent to work in multitabs over one session
C) You choose the third and the hardest - to support it :)

Here are some ideas, but no of them is 100%
1) set tomcat to use URL rewriting indtead of cookies
(http://tomcat.apache.org/tomcat-6.0-doc/config/context.html)
2) produce some tab/browser identification and divide session (maybe
window.name property could be helpfull)
3) Look at JBoss Seam, it also support multitab browsing without
harming session as i know.

Good luck ;)

2009/11/7 S Arvind arvindw...@gmail.com:
 To my knowledge, there is no path attribute in the session. Are you
 proposing that you add one?
 deploy one app in tomcat by having context xml in
 catalinadomainxxx.xml . When you access this app check the session u
 will find the path attribute with xxx in it.


 So... do you mean that you want to deploy one web application (into a
 single context), but you want to separate certain parts of the session
 into different areas of the webapp?
 yes


 I don't believe that deploying the same webapp multiple times into
 different contexts has any effect on session sharing: Tomcat will treat
 them as different webapps and no session sharing will occur unless you
 have taken other steps to share sessions between contexts.
 Session sharing will not occur for different context. But i need to have
 single context still session should not be shared. Is it possible in single
 context.??

 Consider i have one login app, after login i track the state by session.
 First i login that website in single tab in browser and session was created
 with details in it. And in another tab or window i need to login with
 different username without sharing the session. But if i did this first
 created session was overwrite by second session. Wat i need is two different
 session for same webapp running under single tomcat???

 IS it possible??

 Arvind S


 Many of lifes failure are people who did not realize how close they were to
 success when they gave up.
 -Thomas Edison


 On Sat, Nov 7, 2009 at 7:14 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Arvind,

 On 11/2/2009 5:06 AM, S Arvind wrote:
  Basically my requirement is ability to control the session
  sharing in browser. Till now we maintained each application as different
  context but pointing to same doc-base. So different web application will
 be
  running on a same code to control the session sharing between different
  application.

 I don't believe that deploying the same webapp multiple times into
 different contexts has any effect on session sharing: Tomcat will treat
 them as different webapps and no session sharing will occur unless you
 have taken other steps to share sessions between contexts.

  But now we want to run in same context as one application but
  control the session sharing.

 So... do you mean that you want to deploy one web application (into a
 single context), but you want to separate certain parts of the session
 into different areas of the webapp?

  So i planned to customise session creation n
  management of the tomcat to our requirements to add some value to
  *path* attribute in session. Is this possible?

 To my knowledge, there is no path attribute in the session. Are you
 proposing that you add one?

 Modifying Tomcat's session management code is probably going to lead you
 down a path that leads to insanity: the APIs are not (officially)
 stable, there is no standard, etc.

 I suspect there is a better way to accomplish what you want to do... I
 just don't really understand what you want to do. Instead of speaking in
 generalities, why not give us a use case?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkr00RcACgkQ9CaO5/Lv0PBeqwCfQK7r/8a0jn2jiHxyLkU0ypyA
 uXUAn19ms08C6ydU6DvZTdg6Ep6za6at
 =kDId
 -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



Re: A question about mod_jk 1.2.28 configuration

2009-11-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas,

On 11/9/2009 5:27 AM, thomas2004 wrote:
 We have a web application deployed on Jboss (RH Linux OS). The access to the
 web application is via a Apache Httpd Web Server. One of the function of
 this web application is one can online generate PDF-reports. This report
 could by quite big (30 MB). After the report is generated (this will take
 about 20 to 40 min.) it will show up on the browser.

Just to confirm: you have a single request that takes 20-40 minutes to
fulfill? Or do you issue a request to generate the report and then,
later, issue a request to retrieve the (already-generated) report?

 worker.worker_portfolio_son1.lbfactor=1
 worker.worker_portfolio_son1.sticky_session=True

If you are not using a load-balancing configuration, these lines are not
useful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr4bKQACgkQ9CaO5/Lv0PDqCACgt9K9UwglBFX99ZRGFsLsBc/t
+IQAn3LUCfnjZlXiARFjcMz/k3asLwAI
=B76h
-END PGP SIGNATURE-

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



Tomcat Coyote HTTP11Protocol Pause

2009-11-09 Thread Arunkumar Janarthanan
on tomcat server instances, they were giving below errors on all 3 machines.

Below are the config details.


Tomcat 5.5.9

java version 1.5.0_14
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

Solaris 10 Generic_137111-04

Nov 5, 2009 3:54:28 PM org.apache.jk.server.JkCoyoteHandler action
INFO: Response already committed Nov 5, 2009 3:54:29 PM
org.apache.jk.server.JkCoyoteHandler action
INFO: Response already committed Nov 5, 2009 3:54:33 PM
org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8180 Nov 5, 2009 3:54:34 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina Nov 5, 2009 3:54:34 PM
org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 8 instance(s) to be deallocated Nov 5, 2009 3:54:35 PM
org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 8 instance(s) to be deallocated Nov 5, 2009 3:54:36 PM
org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 8 instance(s) to be deallocated Nov 5, 2009 3:54:36 PM
org.apache.coyote.http11.Http11Protocol destroy

INFO: Stopping Coyote HTTP/1.1 on http-8180 Nov 5, 2009 3:54:42 PM
org.apache.catalina.loader.WebappClassLoader loadClass

INFO: Illegal access: this web application instance has been stopped
already.

Could not load org.jboss.util.NestedException.
The eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.

Please advice.
Arun Janarthanan


Re: Tomcat startup exception

2009-11-09 Thread André Warnier

Caldarale, Charles R wrote:

From: Pid [mailto:p...@pidster.com]
Subject: Re: Tomcat startup exception

I think you'll find you've been boxed.


Goo goo g'joob.


Sirs, you've got me smacked, two episodes ago already.
In my defense, I'll quote Samuel Clemens :
To any foreigner, English is exceedingly difficult. Even the angels 
speak it with an accent.


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



RE: Tomcat startup exception

2009-11-09 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Tomcat startup exception
 
  Goo goo g'joob.
 
 Sirs, you've got me smacked, two episodes ago already.

Hint: I am the Walrus (Lennon, not Carroll - although there are numerous 
similarities).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: Tomcat Coyote HTTP11Protocol Pause

2009-11-09 Thread Caldarale, Charles R
 From: Arunkumar Janarthanan [mailto:arunkumar.webad...@gmail.com]
 Subject: Tomcat Coyote HTTP11Protocol Pause
 
 on tomcat server instances, they were giving below errors on all 3
 machines.

What errors?  All the messages are marked INFO.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



WebappClassLoader and undeploy

2009-11-09 Thread Gerwood Stewart
I originally started down this path trying to find a memory leak (involving 
commons-logging etc). I now have a more general question:

I've created an almost empty context. It contains 1 servlet which contains an 
arraylist (just to create a large object that is easier to see in memory 
graphs) and a default jsp page (as created by the maven webapp archetype).

I deploy this along with the tomcat manager into tomcat 5.5.28, which is the 
standard tar.gz download with all the extra webapps stripped out of 
server/webapps (except for manager) and webapps. 

This means that there are 2 WebappClassLoader instances in memory, one for each 
context. This seems correct.
There are also 2 WebappLoader instances in memory, I assume one for each 
context which also seems correct.

Now my understanding of the WebappClassLoader is that there is and instance for 
each context and eacg class loader is used to load classes for that context. 
This allows for dynamic class loading and some (?) isolation for each context. 
My assumption (partially from what I have read) is that when the context is 
undeployed tomcat severs its references to the class loader and thus the gc 
process can clean up all the leftovers...

Is this incorrect?

I've deployed the very minimal context into tomcat and then undeployed it via 
the manager. I used VisualVM to look and the heapdumps from before and after.

From the before heapdump I saw what I expected: 2 WebappClassLoaders and 2 
WebappLoaders.
After I saw:  2 WebappClassLoaders and 1 WebappLoader, which is not what I 
expected. 

Tomact seems to have retained 1 on the WebappClassLoader instances.

I have two questions at this point:

1. From the Javadocs both WebappClassLoader and WebappLoader are class loaders. 
What are the differences and why does Tomcat use both? 

2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
successfully but seems to 'hang-on' to the WebappClassLoader instance?

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



Re: WebappClassLoader and undeploy

2009-11-09 Thread Mark Thomas
Gerwood Stewart wrote:
 Tomact seems to have retained 1 on the WebappClassLoader instances.
 
 I have two questions at this point:
 
 1. From the Javadocs both WebappClassLoader and WebappLoader are class 
 loaders. What are the differences and why does Tomcat use both?
WebappClassLoader is the actual class loader, WebappLoader is the
context level object that manages the class loader.

 2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
 successfully but seems to 'hang-on' to the WebappClassLoader instance?
My money is on it being JVM code rather than Tomcat code that is hanging
onto the WebappClassLoader. Are you testing with JDK 1.6.0_15 or later
by any chance?

Mark




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



Re: Tomcat startup exception

2009-11-09 Thread Pid

On 09/11/2009 21:04, Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Tomcat startup exception


Goo goo g'joob.


Sirs, you've got me smacked, two episodes ago already.


Hint: I am the Walrus (Lennon, not Carroll - although there are numerous 
similarities).

  - Chuck


@Andre, Chuck cunningly employed a naked shunt to convert the box into a 
half grip, thus neatly ending the game - as everyone will recognise.


p



THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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




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



RE: Identifying Clients via SSL Certificates

2009-11-09 Thread Jorge Medina
 
OpenSSL hashes the subject name. 
This is used in OpenSSL to form an index to allow certificates in a 
directory to be looked up by subject name. 
but that seems weak.

http://www.openssl.org/docs/apps/x509.html#http://www.openssl.org/docs/apps/verify.html#




-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, November 09, 2009 2:06 PM
To: Tomcat Users List
Subject: Identifying Clients via SSL Certificates

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I've been playing around with client SSL certificates, not for authentication 
per se, but as a gateway to a relaxed authentication mechanism for one of our 
webapps.

I have a client SSL cert working (see my previous thread mod_jk  Client SSL 
Certificates) and successfully verifying the signature of the client cert by 
the server.

I'd like to be able to uniquely identify the client certificate being used to 
authenticate via SSL, but I'm a newbie at this sort of thing and I'd appreciate 
some suggestions as to how to do that. A few ideas I've had are:

1. Use a directory-style 'CN' attribute like UID=myuniqueid

2. Use the fingerprint of the client certificate

3. Use the full text of the client certificate

All 3 of the above can be used to then link to appropriate records in the 
database for limited authentication.

Does anyone have any suggestions or preferred techniques?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr4aBwACgkQ9CaO5/Lv0PDIFgCfb69oibXH3GAwQ1R4z40eux+w
lQcAoL5rFQHQX2rSWjh1LVoptUHXCQLt
=gPOY
-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



Secure login only, not rest of app

2009-11-09 Thread Robert Denison

Hi all,

I am trying to have setup my tomcat webapp to be secure for login  
only. It works as you'd expect if the security-constraint for /* is  
unsecure and if I make it secure (using CONFIDENTIAL) for /*.


However if I try to make it secure only for the login page and  
unsecure elsewhere any attempt to go to a page redirects to the login  
page but unsecure - not using the https and higher port. I've seen  
comments about filters to redirect up to the https port but my  
thoughts are:


1) From what I understand it should be possible with multiple  
constraints for different URLs, and
2) as I only want to do this if the user is not logged in I'm not sure  
how the filter would work.


I have a working https Connector because I can use the service  
configured for /* to be secure.


Any offered help appreciated.

The relevant (I think) web.xml snippet is:

security-constraint
  web-resource-collection
web-resource-nameApplication Login/web-resource-name
url-pattern/login.jsp/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
  /web-resource-collection
  auth-constraint
role-nameplayer/role-name
  /auth-constraint
  user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
  /user-data-constraint
/security-constraint

security-constraint
  web-resource-collection
web-resource-nameApplication/web-resource-name
url-pattern/*/url-pattern
  /web-resource-collection
  auth-constraint
role-nameplayer/role-name
  /auth-constraint
/security-constraint

!-- Define the Login Configuration for this Application --
login-config
  auth-methodFORM/auth-method
  realm-nameApplication/realm-name
  form-login-config
form-login-page/jsp/login.jsp/form-login-page
form-error-page/jsp/error.jsp/form-error-page
  /form-login-config
/login-config


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



Re: Want to customise the tomcat's session logic

2009-11-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arvind,

On 11/7/2009 11:35 PM, S Arvind wrote:
 is it possible to provide costume sessionid while creating session.? so that
 different time when session needs to be created i can create new sessionid
 and store it in cookie.

No, you can't customize the session id, but you can register a listener
that will be notified of session creation events:

http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpSessionListener.html

Note that there aren't any objects available during this method that
will let you set a cookie on the request. For that, you could write a
Filter that wraps the request to intercept calls to getSession() and
make sure that, if a session is created, your cookies are written as well.

I wish you'd tell us what the heck you're trying to do because I'm
certain there's an easier way to do it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr4m2MACgkQ9CaO5/Lv0PCA+QCcCI3cfZTtJx9C4d1O/hvT+Rux
kLcAoLlTj04s7st0Sd4+B9rpx48TPVx8
=ZQDV
-END PGP SIGNATURE-

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



Re: WebappClassLoader and undeploy

2009-11-09 Thread Elli Albek
Managing class loaders is done in the JVM. Tomcat cannot force the JVM
to garbage collect class loaders, in the same way that it cannot force
the JVM to garbage collect any object.
If the class loader is unreachable, and all other objects that this
class loader provided are also unreachable, then the JVM can garbage
collect it like any other object.

This garbage collection is heavier than simple object reference. I
assume the JVM will do it only in major garbage collections and maybe
even not in every major one. If your test app is not doing anything,
there is no reason for the JVM to actually do something about it since
memory is not consumed. If you try to force major garbage collections,
eventually it should happen. If you run a load test, which will force
tomcat to consume memory, then you will eventually get to a major
garbage collection. This can take much longer than what you would
think. If the code is simple (like JSP page and hello world type of
servlet) it can be optimized by the JVM to consume memory on a local
stack based heap (per thread), and not use the JVM main heaps.

If you keep a reference to one object that was created from this class
loader, then the Class object of this object is reachable, and the
class loader is reachable via the Class. Since it is reachable, it
cannot be garbage collected.

WebappLoader is a class that has the code to manage a webapp
lifecycle. It is not a class loader. The JVM to track references to it
like any other simple object (String). In addition, it is an internal
tomcat object, so it is a lot simpler to keep track of references to
it in the tomcat code. It is not visible to the webapps or exposed to
user code that can leak it.

WebappClassLoader is the opposite: It is a real class loader. Garbage
collecting it is not a simple matter. My guess is that:

1.  If you constantly load the memory, then eventually it will be
garbage collected.
2.  If it is not garbage collected in that case, there is a reference
leak, something is keeping a reference to either the class loader or
to an object that was loaded by from it.

Tomcat is releasing references to objects on its side, but the user
code can do other things.

If the web app contains one servlet and one JSP page, that should be
easy to follow. Tomcat keeps references to those objects (both should
be servlets), but also releases them when you redeploy. You can verify
that the objects are gone. The actual instances should be gone very
quickly since they are simple objects. JSP page is turned into a
class, you should see it in the memory management tool.

Notice that if the web app is reloaded, the new class loader will load
the same classes again, so they will have the same class name, but
they will have separate Class instances. You will have two objects
that have the same class name, but are different class.

Other possible reference leaks from the webapp to the outside:
Threads that are left running
JNDI
Sessions
Thread local
Any library in a class loader above the webapp (in class loaders app,
system, common and shared, possibly even in Catalina but less likely)
Logging and reflection libraries always star as favorite leakers.

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



RE: WebappClassLoader and undeploy

2009-11-09 Thread Jorge Medina
 
Does the JVM perform class unloading by default?
I usually add the option -XX:+CMSClassUnloadingEnabled so that classes also get 
garbage collected. (Otherwise I was running into out of PermGen memory space)

Would that solve your problem?


-Original Message-
From: Elli Albek [mailto:e...@sustainlane.com] 
Sent: Monday, November 09, 2009 5:53 PM
To: Tomcat Users List
Subject: Re: WebappClassLoader and undeploy

Managing class loaders is done in the JVM. Tomcat cannot force the JVM to 
garbage collect class loaders, in the same way that it cannot force the JVM to 
garbage collect any object.
If the class loader is unreachable, and all other objects that this class 
loader provided are also unreachable, then the JVM can garbage collect it like 
any other object.

This garbage collection is heavier than simple object reference. I assume the 
JVM will do it only in major garbage collections and maybe even not in every 
major one. If your test app is not doing anything, there is no reason for the 
JVM to actually do something about it since memory is not consumed. If you try 
to force major garbage collections, eventually it should happen. If you run a 
load test, which will force tomcat to consume memory, then you will eventually 
get to a major garbage collection. This can take much longer than what you 
would think. If the code is simple (like JSP page and hello world type of
servlet) it can be optimized by the JVM to consume memory on a local stack 
based heap (per thread), and not use the JVM main heaps.

If you keep a reference to one object that was created from this class loader, 
then the Class object of this object is reachable, and the class loader is 
reachable via the Class. Since it is reachable, it cannot be garbage collected.

WebappLoader is a class that has the code to manage a webapp lifecycle. It is 
not a class loader. The JVM to track references to it like any other simple 
object (String). In addition, it is an internal tomcat object, so it is a lot 
simpler to keep track of references to it in the tomcat code. It is not visible 
to the webapps or exposed to user code that can leak it.

WebappClassLoader is the opposite: It is a real class loader. Garbage 
collecting it is not a simple matter. My guess is that:

1.  If you constantly load the memory, then eventually it will be
garbage collected.
2.  If it is not garbage collected in that case, there is a reference
leak, something is keeping a reference to either the class loader or to an 
object that was loaded by from it.

Tomcat is releasing references to objects on its side, but the user code can do 
other things.

If the web app contains one servlet and one JSP page, that should be easy to 
follow. Tomcat keeps references to those objects (both should be servlets), but 
also releases them when you redeploy. You can verify that the objects are gone. 
The actual instances should be gone very quickly since they are simple objects. 
JSP page is turned into a class, you should see it in the memory management 
tool.

Notice that if the web app is reloaded, the new class loader will load the same 
classes again, so they will have the same class name, but they will have 
separate Class instances. You will have two objects that have the same class 
name, but are different class.

Other possible reference leaks from the webapp to the outside:
Threads that are left running
JNDI
Sessions
Thread local
Any library in a class loader above the webapp (in class loaders app, system, 
common and shared, possibly even in Catalina but less likely) Logging and 
reflection libraries always star as favorite leakers.

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


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



Re: Secure login only, not rest of app

2009-11-09 Thread Pid

On 09/11/2009 22:33, Robert Denison wrote:

Hi all,

I am trying to have setup my tomcat webapp to be secure for login only.
It works as you'd expect if the security-constraint for /* is unsecure
and if I make it secure (using CONFIDENTIAL) for /*.

However if I try to make it secure only for the login page and unsecure
elsewhere any attempt to go to a page redirects to the login page but
unsecure - not using the https and higher port. I've seen comments about
filters to redirect up to the https port but my thoughts are:

1) From what I understand it should be possible with multiple
constraints for different URLs, and
2) as I only want to do this if the user is not logged in I'm not sure
how the filter would work.

I have a working https Connector because I can use the service
configured for /* to be secure.


So, to summarise, you want *only* the login page to be sent over SSL?


The login page isn't ever requested directly, it's forwarded to by the 
AuthenticationValve.  This means that you can place it out of the way, 
in, say:


 WEB-INF/login/form.jsp
 WEB-INF/login/error.jsp

but it also means that you shouldn't directly request the login page.

When you're using Container managed security, you request a secured 
resource and the Valve forwards to the form.  Once you authenticate the 
original request is restored.


Your config won't enforce SSL for the login page because the container 
forwards the request to the page after it recognises the /* rule 
requires a login.



If you want the whole app to require a login, you can either choose to 
use SSL, or not, but you can't easily send the login page only over SSL.


If only one part of the app required a login, you could employ a Filter 
to downgrade to non-SSL when the URL didn't match that path.


Is there a particular reason why you want to downgrade after login?


You might look into the Tomcat compatible SecurityFilter project, as it 
provides very similar functionality to container managed security, but 
more flexibility.


 http://securityfilter.sourceforge.net/


p



Any offered help appreciated.

The relevant (I think) web.xml snippet is:

security-constraint
web-resource-collection
web-resource-nameApplication Login/web-resource-name
url-pattern/login.jsp/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
/web-resource-collection
auth-constraint
role-nameplayer/role-name
/auth-constraint
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

security-constraint
web-resource-collection
web-resource-nameApplication/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
role-nameplayer/role-name
/auth-constraint
/security-constraint

!-- Define the Login Configuration for this Application --
login-config
auth-methodFORM/auth-method
realm-nameApplication/realm-name
form-login-config
form-login-page/jsp/login.jsp/form-login-page
form-error-page/jsp/error.jsp/form-error-page
/form-login-config
/login-config


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




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



RE: WebappClassLoader and undeploy

2009-11-09 Thread Caldarale, Charles R
 From: Jorge Medina [mailto:jmed...@e-dialog.com]
 Subject: RE: WebappClassLoader and undeploy
 
 Does the JVM perform class unloading by default?

Usually.  However, the JVM version and the choice of GC algorithm may make it 
impossible to unload classes.  For example, the concurrent collectors were 
unable to discard classes in their early days.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: WebappClassLoader and undeploy

2009-11-09 Thread Gerwood Stewart
Mark

 2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
 successfully but seems to 'hang-on' to the WebappClassLoader instance?
My money is on it being JVM code rather than Tomcat code that is hanging
onto the WebappClassLoader. Are you testing with JDK 1.6.0_15 or later
by any chance?

Yes. I'm using Apple's JVM and Suns (on Ubuntu 9.04)

I traced the webappclassloader gcroot. It appears to be connected via 
sun.awt.AppContext?

Any thoughts.

Gerwood


From: Mark Thomas [ma...@apache.org]
Sent: Tuesday, 10 November 2009 9:07 AM
To: Tomcat Users List
Subject: Re: WebappClassLoader and undeploy

Gerwood Stewart wrote:
 Tomact seems to have retained 1 on the WebappClassLoader instances.

 I have two questions at this point:

 1. From the Javadocs both WebappClassLoader and WebappLoader are class 
 loaders. What are the differences and why does Tomcat use both?
WebappClassLoader is the actual class loader, WebappLoader is the
context level object that manages the class loader.

 2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
 successfully but seems to 'hang-on' to the WebappClassLoader instance?
My money is on it being JVM code rather than Tomcat code that is hanging
onto the WebappClassLoader. Are you testing with JDK 1.6.0_15 or later
by any chance?

Mark




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


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



RE: WebappClassLoader and undeploy

2009-11-09 Thread Gerwood Stewart
Elli 

I understand most of this. I do several things such as forcing a GC before 
doing the heap dump, from what you are say this may not be enough?
Either way I'm not looking for an instance of the class to simply be there I'm 
looking at the GC Roots.

I also tried an additional step of after undeploying and finding I still had 2 
GC roots I did a redeploy/undeploy. The results are:

redeploy WebappClassLoader +1 (total 3) 
undeploy WebappClassLoader -1 (total 2)

So generally the behaviour appears to be correct after the initial issue with 
the 1 class loader. It would also appear that at that point some form of GC has 
occured and cleaned up other instances. What I'm left with is that the rogue 
instance is is reachable and that it probably shouldn't be. As per the response 
to Mark and the JDK version it appears the gcroot is though sun.awt.AppContext

Any thoughts?

Additionally I'm going to try and find a slightly old version of java and check 
it's behaviour...



Gerwood

From: Elli Albek [e...@sustainlane.com]
Sent: Tuesday, 10 November 2009 9:52 AM
To: Tomcat Users List
Subject: Re: WebappClassLoader and undeploy

Managing class loaders is done in the JVM. Tomcat cannot force the JVM
to garbage collect class loaders, in the same way that it cannot force
the JVM to garbage collect any object.
If the class loader is unreachable, and all other objects that this
class loader provided are also unreachable, then the JVM can garbage
collect it like any other object.

This garbage collection is heavier than simple object reference. I
assume the JVM will do it only in major garbage collections and maybe
even not in every major one. If your test app is not doing anything,
there is no reason for the JVM to actually do something about it since
memory is not consumed. If you try to force major garbage collections,
eventually it should happen. If you run a load test, which will force
tomcat to consume memory, then you will eventually get to a major
garbage collection. This can take much longer than what you would
think. If the code is simple (like JSP page and hello world type of
servlet) it can be optimized by the JVM to consume memory on a local
stack based heap (per thread), and not use the JVM main heaps.

If you keep a reference to one object that was created from this class
loader, then the Class object of this object is reachable, and the
class loader is reachable via the Class. Since it is reachable, it
cannot be garbage collected.

WebappLoader is a class that has the code to manage a webapp
lifecycle. It is not a class loader. The JVM to track references to it
like any other simple object (String). In addition, it is an internal
tomcat object, so it is a lot simpler to keep track of references to
it in the tomcat code. It is not visible to the webapps or exposed to
user code that can leak it.

WebappClassLoader is the opposite: It is a real class loader. Garbage
collecting it is not a simple matter. My guess is that:

1.  If you constantly load the memory, then eventually it will be
garbage collected.
2.  If it is not garbage collected in that case, there is a reference
leak, something is keeping a reference to either the class loader or
to an object that was loaded by from it.

Tomcat is releasing references to objects on its side, but the user
code can do other things.

If the web app contains one servlet and one JSP page, that should be
easy to follow. Tomcat keeps references to those objects (both should
be servlets), but also releases them when you redeploy. You can verify
that the objects are gone. The actual instances should be gone very
quickly since they are simple objects. JSP page is turned into a
class, you should see it in the memory management tool.

Notice that if the web app is reloaded, the new class loader will load
the same classes again, so they will have the same class name, but
they will have separate Class instances. You will have two objects
that have the same class name, but are different class.

Other possible reference leaks from the webapp to the outside:
Threads that are left running
JNDI
Sessions
Thread local
Any library in a class loader above the webapp (in class loaders app,
system, common and shared, possibly even in Catalina but less likely)
Logging and reflection libraries always star as favorite leakers.

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


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



Re: WebappClassLoader and undeploy

2009-11-09 Thread Mark Thomas
Gerwood Stewart wrote:
 Mark
 
 2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
 successfully but seems to 'hang-on' to the WebappClassLoader instance?
 My money is on it being JVM code rather than Tomcat code that is hanging
 onto the WebappClassLoader. Are you testing with JDK 1.6.0_15 or later
 by any chance?
 
 Yes. I'm using Apple's JVM and Suns (on Ubuntu 9.04)

As I suspected.

 I traced the webappclassloader gcroot. It appears to be connected via 
 sun.awt.AppContext?

Yep - also what I expected to see.

 Any thoughts.

Give this a go:
http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java

You'll need to add
Listener
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /

to your server.xml (adjust class name as necessary - it doesn't have to
be in a Tomcat package)

It should help with JAR file locking too. The plan is to add more
work-arounds to this listener as they are identified.

For those of you that like your humour with an ironic twist, you may be
amused by the first commit messages for this class:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=logpathrev=830908

Mark




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



Re: WebappClassLoader and undeploy

2009-11-09 Thread Mark Thomas
Gerwood Stewart wrote:
 Elli 
 
 I understand most of this. I do several things such as forcing a GC before 
 doing the heap dump, from what you are say this may not be enough?
 Either way I'm not looking for an instance of the class to simply be there 
 I'm looking at the GC Roots.
 
 I also tried an additional step of after undeploying and finding I still had 
 2 GC roots I did a redeploy/undeploy. The results are:
 
 redeploy WebappClassLoader +1 (total 3) 
 undeploy WebappClassLoader -1 (total 2)
 
 So generally the behaviour appears to be correct after the initial issue with 
 the 1 class loader. It would also appear that at that point some form of GC 
 has occured and cleaned up other instances. What I'm left with is that the 
 rogue instance is is reachable and that it probably shouldn't be. As per the 
 response to Mark and the JDK version it appears the gcroot is though 
 sun.awt.AppContext
 
 Any thoughts?
 
 Additionally I'm going to try and find a slightly old version of java and 
 check it's behaviour...

I'll save you the effort. You won't see it in 1.6.0_14 and earlier.

Mark




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



RE: WebappClassLoader and undeploy

2009-11-09 Thread Gerwood Stewart
Mark

Thanks. I suppose I'd better get back to identifying the real problems then. :D

Gerwood

From: Mark Thomas [ma...@apache.org]
Sent: Tuesday, 10 November 2009 10:48 AM
To: Tomcat Users List
Subject: Re: WebappClassLoader and undeploy

Gerwood Stewart wrote:
 Elli

 I understand most of this. I do several things such as forcing a GC before 
 doing the heap dump, from what you are say this may not be enough?
 Either way I'm not looking for an instance of the class to simply be there 
 I'm looking at the GC Roots.

 I also tried an additional step of after undeploying and finding I still had 
 2 GC roots I did a redeploy/undeploy. The results are:

 redeploy WebappClassLoader +1 (total 3)
 undeploy WebappClassLoader -1 (total 2)

 So generally the behaviour appears to be correct after the initial issue with 
 the 1 class loader. It would also appear that at that point some form of GC 
 has occured and cleaned up other instances. What I'm left with is that the 
 rogue instance is is reachable and that it probably shouldn't be. As per the 
 response to Mark and the JDK version it appears the gcroot is though 
 sun.awt.AppContext

 Any thoughts?

 Additionally I'm going to try and find a slightly old version of java and 
 check it's behaviour...

I'll save you the effort. You won't see it in 1.6.0_14 and earlier.

Mark




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


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



Re: WebappClassLoader and undeploy

2009-11-09 Thread Mark Thomas
Gerwood Stewart wrote:
 Mark
 
 Thanks. I suppose I'd better get back to identifying the real problems then. 
 :D

See my other mail - it has a fix for the problem you are seeing. The fix
even has comments so you'll get an explanation too :)

Mark

 
 Gerwood
 
 From: Mark Thomas [ma...@apache.org]
 Sent: Tuesday, 10 November 2009 10:48 AM
 To: Tomcat Users List
 Subject: Re: WebappClassLoader and undeploy
 
 Gerwood Stewart wrote:
 Elli

 I understand most of this. I do several things such as forcing a GC before 
 doing the heap dump, from what you are say this may not be enough?
 Either way I'm not looking for an instance of the class to simply be there 
 I'm looking at the GC Roots.

 I also tried an additional step of after undeploying and finding I still had 
 2 GC roots I did a redeploy/undeploy. The results are:

 redeploy WebappClassLoader +1 (total 3)
 undeploy WebappClassLoader -1 (total 2)

 So generally the behaviour appears to be correct after the initial issue 
 with the 1 class loader. It would also appear that at that point some form 
 of GC has occured and cleaned up other instances. What I'm left with is that 
 the rogue instance is is reachable and that it probably shouldn't be. As per 
 the response to Mark and the JDK version it appears the gcroot is though 
 sun.awt.AppContext

 Any thoughts?

 Additionally I'm going to try and find a slightly old version of java and 
 check it's behaviour...
 
 I'll save you the effort. You won't see it in 1.6.0_14 and earlier.
 
 Mark
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




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



Re: Tomcat Coyote HTTP11Protocol Pause

2009-11-09 Thread Arunkumar Janarthanan
There was no other error reported apart from sequence of Pause, stop
destroyed messages from catalina.

Please advice.

Arun J

On Mon, Nov 9, 2009 at 4:16 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Arunkumar Janarthanan [mailto:arunkumar.webad...@gmail.com]
  Subject: Tomcat Coyote HTTP11Protocol Pause
 
  on tomcat server instances, they were giving below errors on all 3
  machines.

 What errors?  All the messages are marked INFO.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


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




Re: WebappClassLoader and undeploy

2009-11-09 Thread Elli Albek
Thomas, what is the issue with javax.imageio? Do they really use
context class loader for loading static variables?

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



RE: Tomcat Coyote HTTP11Protocol Pause

2009-11-09 Thread Caldarale, Charles R
 From: Arunkumar Janarthanan [mailto:arunkumar.webad...@gmail.com]
 Subject: Re: Tomcat Coyote HTTP11Protocol Pause
 
 There was no other error reported apart from sequence of Pause, stop
 destroyed messages from catalina.

Something shut down Tomcat, and what you see is the normal result of that.  If 
the shutdown was unexpected, then either someone sent the shutdown password 
over the shutdown port - or you've got a rogue webapp that's calling 
System.exit().  The latter can be prevented by employing a security manager, 
such as what's described here:
https://www.securecoding.cert.org/confluence/display/java/EXC04-J.+Prevent+against+inadvertent+calls+to+System.exit%28%29+or+forced+shutdown

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: Want to customise the tomcat's session logic

2009-11-09 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Want to customise the tomcat's session logic
 
 No, you can't customize the session id

Well, you can, sort of.  The StandardManager can be configured to use a 
specific algorithm for the message digest calculation.  If you create a custom 
security provider, you could generate whatever digest value desired.  However, 
it would probably be easier just to create a custom manager class, thereby 
allowing pretty much any session id desired.
http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.




Re: [OT] Tomcat startup exception

2009-11-09 Thread André Warnier

Pid wrote:

On 09/11/2009 21:04, Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Tomcat startup exception


Goo goo g'joob.


Sirs, you've got me smacked, two episodes ago already.


Hint: I am the Walrus (Lennon, not Carroll - although there are 
numerous similarities).


  - Chuck


@Andre, Chuck cunningly employed a naked shunt to convert the box into a 
half grip, thus neatly ending the game - as everyone will recognise.


And me thinking until now that I had a pretty decent command of the 
English language, for a continental foreigner anyway.  Whereto have my 
illusions gone..



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



Re: Want to customise the tomcat's session logic

2009-11-09 Thread André Warnier

Christopher Schultz wrote:


I wish you'd tell us what the heck you're trying to do because I'm
certain there's an easier way to do it.

Like maybe just add an attribute to the session, containing the path 
where the session was begat ?

(if I remember the original exposé correctly)


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



remote debug

2009-11-09 Thread maven apache
hi:
I am so sorry to ask this problem again but I do can not make it work. I
have seen the faq, and the doc pages,also I go to the goole to search but
..

I am using tomcat6.0.zip,and my project is managed by maven,so the web
module I do not know how to debug,although I know how to debug a
common dynamic web project and add breakpoints .
But the web module is not a common web project.I have no idea.
Someone tell me I can use remote debug for the web module ,however when I
try to connect the server,it can not connect .

So I want to know if the remote debug can be used for the web module in
maven,if it is,how to config the debug?

Thanks.


Re: Deploying and building a war file

2009-11-09 Thread Ziggy
Hi Ken,

I do use eclipse but only for development. I cant really deploy from eclipse
for several reasons. One of them being that the deployment server is a
different machine from where i do the development.


Thanks

On Mon, Nov 9, 2009 at 7:12 PM, Ken Bowen kbo...@als.com wrote:

 If you use Eclipse (www.eclipse.org/   free; runs on Wins/Mac/Linux) with
 the web plugins, it records your deploy target, and allows you to deploy
 with either a war file, or in exploded form.  In the latter case, you can
 usually leave your web server running, make a code change, save the file,
 and it is automatically re-compiled  re-deployed to the running server.  At
 worst, you only need to hit a refresh button.  It makes life much simpler,
 and the syntax-directed editor saves me from many stupidities.

 --Ken


 On Nov 9, 2009, at 7:04 AM, Ziggy wrote:

  Hi all,

 I've got a query on the way web applications are deployed. I have an
 application that has several jsp files and serlvets that are in
 WEB-INF/classes.

 When i deploy the application all i do is do a checkout on CVS, make the
 changes, rebuild the war using ANT and redeploy manually. This works fine
 but now i am having some doubts on this approach.

 Basicaly if i even change one file i have to rebuild the war file meaning
 i
 have to recompile everything. I think this is unecessary. i would like to
 be
 able to just recompile the one file and redeploy the one file without
 having
 to rebuild the whole war file.

 1. How do you deploy your application? If you deploy as a war file, do you
 recompile everything even if the change is to a single file or a
 configuration file.

 2. Could you provide an example on the approach you use from the point a
 source file comes out from CVS to the point it get to the production
 environment. (An example with a single file change would be usefull)

 2. Do you use any tool to manage this?

 I am thinking that if i change one file i should be able to just compile
 that one file and move it to the WEB-INF/classes folder into the relevant
 folder. This might work but is there a better way of doing this instead of
 moving it manually?


 Thanks



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




Re: A question about mod_jk 1.2.28 configuration

2009-11-09 Thread thomas2004

Hi,



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Just to confirm: you have a single request that takes 20-40 minutes to
fulfill? Or do you issue a request to generate the report and then,
later, issue a request to retrieve the (already-generated) report?

I issue a request to generate the report (click the button Create Report)
which is done in Jboss. The report-generation takes very long since it will
hold data from the database and process them. As the Jboss sends back the
PDF-report stream back to the browser, it failed. From the log message this
means the way return to client (browser) is closed.

I've set reply_timeout in workers.properties but it doesn't help.


If you are not using a load-balancing configuration, these lines are not
useful.

I know. But this doesn't sturb.



I have a feeling that this problem has something to do with cache. But I
don't know where and which one.

-- 
View this message in context: 
http://old.nabble.com/A-question-about-mod_jk-1.2.28-configuration-tp26264069p26279572.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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