Tomcat doesn't stop if a java thread is running

2009-04-20 Thread Paolo Gambetti
I have this problem. If in my web application running in Tomcat there is a
java thread running when i stop Tomcat with shutdown.bat or shutdown.sh
tomcat process doesn't end and i have to kill it manually. How can i solve
this problem? Is there anything to change in java threads code?
thank you.


Re: Tomcat doesn't stop if a java thread is running

2009-04-20 Thread Markus Schönhaber
Paolo Gambetti:

 I have this problem. If in my web application running in Tomcat there is a
 java thread running when i stop Tomcat with shutdown.bat or shutdown.sh
 tomcat process doesn't end and i have to kill it manually. How can i solve
 this problem? Is there anything to change in java threads code?
 thank you.

The JVM won't terminate until all non-daemon threads have ended. If your
webapp starts such a thread it has the responsibility to stop it when
needed. You can use a ServletContextListener to do this.

Regards
  mks

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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Liraz Siri
Christopher Schultz wrote:
 On 4/13/2009 1:55 PM, Liraz Siri wrote:
 We're proud to announce the release of TurnKey Apache Tomcat, an
 installable live CD of Apache Tomcat that can run on real hardware in
 addition to most types of virtual machines (e.g., VMWare, VirtualBox,
 Parallels, Xen HVM). It is designed to provide users with a
 pre-integrated, auto-updating, turn-key operating system environment
 that is carefully built from the ground up with the minimum components
 needed to run Apache Tomcat with maximum usability, efficiency, and
 security.
 
 If your goal was a minimal set of components, why did you choose to
 include Apache httpd + mod_jk, neither of which are required to run Tomcat.

You're right Chris, you don't _need_ Apache, and therefore mod_jk to run
Tomcat. Tomcat can listen (and does by default, though we turned it off
for security reasons) and answer requests directly.

OTOH, we consulted with a few Java people who told us you usually (in a
production setting) want a load-balancer (eg. Apache) in front of your
Tomcat node[s] to:

A) improve performance
B) make the setup easier to maintain
C) provide a way to serve static content

In the future we might create a more minimal Tomcat node appliance to
which a front-end load balancer appliance could offload traffic, but
that needs more thought...

Cheers,
Liraz

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



Tomcat 5.5 Trust Stores and Client Authentication

2009-04-20 Thread Ron Perkins
Hi All,

I have done the following to create a Trust Store for Tomcat to use:

Created a keystore with new certificate:

keytool -genkey -alias mycert -keyalg RSA -kaypass changeit -keystore
keystore.jks -storepass changeit

Exported certificate:

keytool -export -alias mycert -file mycert.cer -keystore keystore.jks
-storepass changeit

Imported certificate into trust store:

keytool -import -v -trustcacerts alias mycert -keypass changeit -file
mycert.cer -keystore cacerts.jks -storepass changeit

Added the following Connector into server.xml to allow Client Authentication:

Connector
   port=443
   scheme=https
   secure=true
   keystoreFile=C:/keystore.jks
   keystorePass=changeit
   keystoreType=JKS
   keyAlias=mykey
   truststoreFile=C:/cacerts.jks
   truststorePass=changeit
   truststoreType=JKS
   sslProtocol=TLS
   maxSpareThreads=75
   maxThreads=350
   uRIEncoding=UTF-8
   minSpareThreads=25
   clientAuth=true
/Connector

After starting Tomcat up, using netstat I can see that port 443 is listening...

When using IE to test the connection to the https default page I get
IE's no communication web page displayed. If I use Firefox this gives
me the following error: SSL peer cannot verify your certificate (Error
code: ssl_error_bad_cert_alert)

I was expecting a message to say that the client needs a client
certificate? I then installed the client certificate mycert.cer into
the client browsers, but has no effect and I still recevie the same
error messages.

To check that I have SSL correctly installed, if I change
clientAuth=true to clientAuth=false then default Tomcatwebpage is
displayed within the browsers.

What have I done wrong? I am thinking that it is the way that I have
created the Trust store that is the problem?

Thanks for any help in advance...

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



Re: Building Tomcat 5.5.27 tomcat-native

2009-04-20 Thread Mark Thomas
Andre-John Mas wrote:
 
 On 19-Apr-2009, at 16:45, Mark Thomas wrote:
 
 Andre-John Mas wrote:
 the only thing which seems odd is the generated tar balls are marked as
 5.5.26. Is this normal?

 No :). That is a bug.
 
 I suppose it is the wrong time to open a ticket for this, but for 5.5.28
 would it be worth opening a ticket to make sure that 5.5.28 doesn't
 generate tarballs marked '5.5.27'?

Already dealt with in r766513 [1].

Mark

[1]
http://svn.apache.org/viewvc/tomcat/build/tc5.5.x/build.properties.default?view=log


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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Leon Rosenberg
On Mon, Apr 20, 2009 at 10:17 AM, Liraz Siri li...@turnkeylinux.org wrote:
 Christopher Schultz wrote:
 If your goal was a minimal set of components, why did you choose to
 include Apache httpd + mod_jk, neither of which are required to run Tomcat.

 You're right Chris, you don't _need_ Apache, and therefore mod_jk to run
 Tomcat. Tomcat can listen (and does by default, though we turned it off
 for security reasons) and answer requests directly.

 OTOH, we consulted with a few Java people who told us you usually (in a
 production setting) want a load-balancer (eg. Apache) in front of your
 Tomcat node[s] to:

Apparently you haven't consulted any tomcat-using java developers, since


 A) improve performance

tomcat standalone performs better in most setups (yes, yes sendfile
myth is there too, but the performance measurements shows that tomcats
plain old java connector performs better)

 B) make the setup easier to maintain

how can adding unneeded complexitty make things easier?

 C) provide a way to serve static content

See A)


 In the future we might create a more minimal Tomcat node appliance to
 which a front-end load balancer appliance could offload traffic, but
 that needs more thought...

If you are really looking for a useful load-balanced appliance check
for keepalived or pound.

regards
Leon


 Cheers,
 Liraz

 -
 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 doesn't stop if a java thread is running

2009-04-20 Thread Leon Rosenberg
On Mon, Apr 20, 2009 at 9:29 AM, Paolo Gambetti
gambetti.pa...@gmail.com wrote:
 I have this problem. If in my web application running in Tomcat there is a
 java thread running when i stop Tomcat with shutdown.bat or shutdown.sh
 tomcat process doesn't end and i have to kill it manually. How can i solve
 this problem? Is there anything to change in java threads code?
 thank you.


Make this thread a daemon (setDaemon(true)) in constructor.
This will tell the VM that its ok to exit without waiting for this thread.
If you want to give the Thread the possibility to finish some job
before shutting down, don't make it daemon, but register a
ShutdownHook instead.
Also, in the latter case, check for Executor patterns in java 1.5

regards
Leon

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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Liraz Siri
Leon Rosenberg wrote:
 Apparently you haven't consulted any tomcat-using java developers, since

That's sort of why we posted to tomcat-users. We're not Apache Tomcat
experts ourselves, so we figured the community would have some good
feedback on our first stab at a Tomcat appliance.

 tomcat standalone performs better in most setups (yes, yes sendfile
 myth is there too, but the performance measurements shows that tomcats
 plain old java connector performs better)

Ah. We seem to have been misinformed.

 If you are really looking for a useful load-balanced appliance check
 for keepalived or pound.

Thanks for the feedback. Really, this is exactly what we need to improve
the next version.

If anyone else has any feedback on our beta appliance or good ideas for
the next version, speak up!

Cheers,
Liraz


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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Leon Rosenberg
2009/4/20 Markus Schönhaber tomcat-us...@list-post.mks-mail.de:
 Leon Rosenberg:

 tomcat standalone performs better in most setups (yes, yes sendfile
 myth is there too, but the performance measurements shows that tomcats
 plain old java connector performs better)

 Which performance measurements do show that?

Tomcat: The Definitive Guide, Second Edition
http://oreilly.com/catalog/9780596101060/chapter/index.html


 Regards
  mks

regards
Leon

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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Markus Schönhaber
Leon Rosenberg:

 tomcat standalone performs better in most setups (yes, yes sendfile
 myth is there too, but the performance measurements shows that tomcats
 plain old java connector performs better)

Which performance measurements do show that?

Regards
  mks

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



SEVERE: Manager [/signifotest]: Unable to receive message through TCP channel

2009-04-20 Thread Sarath Polavarapu
Hi,

 

Can anyone address me how to fix the below log error:

SEVERE: Manager [/signifotest]: Unable to receive message through TCP
channel

 

 

 

Full Stack Trace Log is as follows:

 

Apr 17, 2009 9:31:20 AM org.apache.catalina.core.AprLifecycleListener init

INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/jdk1.5.0_17/jre/lib/i386/client:/usr/java/jdk1.5.0_17/jre/lib/i386
:/usr/java/jdk1.5.0_17/jre/../lib/i386

Apr 17, 2009 9:31:20 AM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

Apr 17, 2009 9:31:20 AM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 2314 ms

Apr 17, 2009 9:31:21 AM org.apache.catalina.core.StandardService start

INFO: Starting service Catalina

Apr 17, 2009 9:31:21 AM org.apache.catalina.core.StandardEngine start

INFO: Starting Servlet Engine: Apache Tomcat/6.0.18

Apr 17, 2009 9:31:21 AM org.apache.catalina.ha.tcp.SimpleTcpCluster start

INFO: Cluster is about to start

Apr 17, 2009 9:31:21 AM org.apache.catalina.tribes.transport.ReceiverBase
bind

INFO: Receiver Server Socket bound to:/10.233.10.96:4000

Apr 17, 2009 9:31:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket

INFO: Attempting to bind the multicast socket to /228.0.0.5:45564

Apr 17, 2009 9:31:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket

INFO: Setting multihome multicast interface to:/10.233.10.96

Apr 17, 2009 9:31:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket

INFO: Setting cluster mcast soTimeout to 500

Apr 17, 2009 9:31:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers

INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:4

Apr 17, 2009 9:31:21 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -23, 10,
-13}:4000,{10, -23, 10, -13},4000, alive=211338,id={-13 93 45 12 -86 -50 75
-8 -119 81 107 78 -5 -57 90 114 }, payload={}, command={}, domain={}, ]

Apr 17, 2009 9:31:22 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers

INFO: Done sleeping, membership established, start level:4

Apr 17, 2009 9:31:22 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers

INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:8

Apr 17, 2009 9:31:23 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers

INFO: Done sleeping, membership established, start level:8

Apr 17, 2009 9:31:23 AM org.apache.catalina.ha.deploy.FarmWarDeployer start

INFO: Cluster FarmWarDeployer started.

Apr 17, 2009 9:31:23 AM org.apache.catalina.ha.session.JvmRouteBinderValve
start

INFO: JvmRouteBinderValve started

Apr 17, 2009 9:31:23 AM org.apache.catalina.tribes.io.BufferPool
getBufferPool

INFO: Created a buffer pool with max size:104857600 bytes of
type:org.apache.catalina.tribes.io.BufferPool15Impl

Apr 17, 2009 9:31:30 AM org.apache.catalina.core.StandardContext
addApplicationListener

INFO: The listener com.signifo.webapp.listener.StartupListener is already
configured for this context. The duplicate definition has been ignored.

Apr 17, 2009 9:31:30 AM org.apache.catalina.ha.session.DeltaManager start

INFO: Register manager /signifotest to cluster element Host with name
localhost

Apr 17, 2009 9:31:30 AM org.apache.catalina.ha.session.DeltaManager start

INFO: Starting clustering manager at /signifotest

Apr 17, 2009 9:31:30 AM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions

WARNING: Manager [/signifotest], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, -23, 10,
-13}:4000,{10, -23, 10, -13},4000, alive=261355,id={-13 93 45 12 -86 -50 75
-8 -119 81 107 78 -5 -57 90 114 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.

Apr 17, 2009 9:31:30 AM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions

INFO: Manager [/signifotest]; session state send at 4/17/09 9:31 AM received
in 150 ms.

Apr 17, 2009 9:31:31 AM org.apache.catalina.ha.session.DeltaManager
messageReceived

SEVERE: Manager [/signifotest]: Unable to receive message through TCP
channel

java.lang.NullPointerException

at
com.opensymphony.oscache.base.algorithm.LRUCache.itemPut(LRUCache.java:157)

at
com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.put(Abst
ractConcurrentReadCache.java:1577)

at
com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.put(Abst
ractConcurrentReadCache.java:863)

at
com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.readObje
ct(AbstractConcurrentReadCache.java:1199)

at 

org.apache.axis.InternalException: org.apache.axis.ConfigurationException:.....??

2009-04-20 Thread shashidhar velagandula
HI ,

I am using , apache-tomcat-6.0.18 ,,, i have deployed one application ,
while accessing the application , it is throwing some configuration error as


org.apache.axis.InternalException: org.apache.axis.ConfigurationException:
org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute
for Handler deployment! org.apache.axis.deployment.wsdd.WSDDException: Must
include type attribute for Handler deployment! at
org.apache.axis.deployment.wsdd.WSDDHandler.(WSDDHandler.java:50) at
org.apache.axis.deployment.wsdd.WSDDChain.(WSDDChain.java:66) at
org.apache.axis.deployment.wsdd.WSDDRequestFlow.(WSDDRequestFlow.java:44) at
org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration.(WSDDGlobalConfiguration.java:62)
at org.apache.axis.deployment.wsdd.WSDDDeployment.(WSDDDeployment.java:244)
at
org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
at org.apache.axis.deployment.wsdd.WSDDDocument.(WSDDDocument.java:65) at
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:180)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at
org.apache.axis.AxisEngine.(AxisEngine.java:156) at
org.apache.axis.client.AxisClient.(AxisClient.java:61) at
org.apache.axis.client.Service.getAxisClient(Service.java:110) at
org.apache.axis.client.Service.(Service.java:119) at
org.globus.ogsa.impl.core.service.ServiceLocator.(ServiceLocator.java:55) at
gov.lbl.srm.StorageResourceManager.SRMServiceGridLocator.(SRMServiceGridLocator.java:10)
at gov.lbl.srm.client.wsdl.SRMServer.connect(SRMServer.java:357) at
SRMAPI.SRMFileList.ListFilesFromSRM(SRMFileList.java:29) at
org.apache.jsp.srmFlist_jsp._jspService(srmFlist_jsp.java:65) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute
for Handler deployment! org.apache.axis.deployment.wsdd.WSDDException: Must
include type attribute for Handler deployment! at
org.apache.axis.deployment.wsdd.WSDDHandler.(WSDDHandler.java:50) at
org.apache.axis.deployment.wsdd.WSDDChain.(WSDDChain.java:66) at
.



Kindly , provide solution to avoid the above configuration problem .

Thanks  Regards ,
shashidhar


Re: org.apache.axis.InternalException: org.apache.axis.ConfigurationException:.....??

2009-04-20 Thread Mark Thomas
shashidhar velagandula wrote:
 HI ,
 
 I am using , apache-tomcat-6.0.18 ,,, i have deployed one application ,
 while accessing the application , it is throwing some configuration error as
 
 
 org.apache.axis.InternalException: org.apache.axis.ConfigurationException:
 org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute
 for Handler deployment!

That is an Axis error, not a Tomcat one. You'll have more luck on the
Axis users list.

Mark

 org.apache.axis.deployment.wsdd.WSDDException: Must
 include type attribute for Handler deployment! at
 org.apache.axis.deployment.wsdd.WSDDHandler.(WSDDHandler.java:50) at
 org.apache.axis.deployment.wsdd.WSDDChain.(WSDDChain.java:66) at
 org.apache.axis.deployment.wsdd.WSDDRequestFlow.(WSDDRequestFlow.java:44) at
 org.apache.axis.deployment.wsdd.WSDDGlobalConfiguration.(WSDDGlobalConfiguration.java:62)
 at org.apache.axis.deployment.wsdd.WSDDDeployment.(WSDDDeployment.java:244)
 at
 org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
 at org.apache.axis.deployment.wsdd.WSDDDocument.(WSDDDocument.java:65) at
 org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:180)
 at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at
 org.apache.axis.AxisEngine.(AxisEngine.java:156) at
 org.apache.axis.client.AxisClient.(AxisClient.java:61) at
 org.apache.axis.client.Service.getAxisClient(Service.java:110) at
 org.apache.axis.client.Service.(Service.java:119) at
 org.globus.ogsa.impl.core.service.ServiceLocator.(ServiceLocator.java:55) at
 gov.lbl.srm.StorageResourceManager.SRMServiceGridLocator.(SRMServiceGridLocator.java:10)
 at gov.lbl.srm.client.wsdl.SRMServer.connect(SRMServer.java:357) at
 SRMAPI.SRMFileList.ListFilesFromSRM(SRMFileList.java:29) at
 org.apache.jsp.srmFlist_jsp._jspService(srmFlist_jsp.java:65) at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
 org.apache.axis.deployment.wsdd.WSDDException: Must include type attribute
 for Handler deployment! org.apache.axis.deployment.wsdd.WSDDException: Must
 include type attribute for Handler deployment! at
 org.apache.axis.deployment.wsdd.WSDDHandler.(WSDDHandler.java:50) at
 org.apache.axis.deployment.wsdd.WSDDChain.(WSDDChain.java:66) at
 .
 
 
 
 Kindly , provide solution to avoid the above configuration problem .
 
 Thanks  Regards ,
 shashidhar
 



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



Re: JK 1.2.28 - load balancer worker fails on startup with one worker down ?

2009-04-20 Thread János Löbb


On Apr 17, 2009, at 8:28 AM, André Warnier wrote:


Rainer Jung wrote:
[...]

What remains for me is your suggestion, that the error is not a fatal
one, since there are other balanced workers left. We could include  
such

a check in the startup code, although I'm not really convinced, that
your problem is a good reason for this.
I'm open to more argumntation and suggestions :)

Argumentation #1 against a change in logic:
The OP argues that one single unresolvable balanced worker should  
not stop the other 4 from working, hence that the balancer should  
start anyway, since 80% of the capacity is still available.  It  
sounds reasonable in principle.
But what if there are only 2 balanced workers in total, of which one  
is unresolvable at start ? would it be normal to start with only one  
balanced worker available anyway ?

If not, then where's the limit of acceptable ?

Argumentation #2 against a change in logic:
Suppose the balancer would start, with the resolved workers only.
Suppose the resolving problem comes from a typo, not the fact that  
the given host is temporarily out of the DNS system, but a definite  
non-existing host.  It will not be retried, so there will never be  
another error/warning message. The host itself may be ok and respond  
to pings etc.., it will just never be hit by Apache's mod_jk, so  
this would be a very quiet error.
How is the sysadmin going to figure out that there is, basically, a  
problem ?


Argumentation for a change in logging:
It would be clearer if the error message stated explicitly that the  
balancer worker was not started due to a /configuration/ error, see  
above message(s).


But then, if even I could figure it out from the existing error  
message, then just about everyone should be able to.
And what would be the use of the likes of me, if everything was  
clear ?

;-)



Perheps with a variable:

JkQuorum

This could be set between two and the number of workers under the  
command of the loadbalancer.  If it is not set, then old behavior can  
be followed, or be set internally to 2 or to the tomcat instances  
balanced.


János

RE: Tomcat 5.5 Trust Stores and Client Authentication

2009-04-20 Thread Jorge Medina

I have not used client certificates, but in order to use SSL with
self-generated certificates you need to add your server self-signed
certificate to the trusted roots of your Windows account or computer
account. Use the Certificates plug-in on an MMC console to perform the
operation.

The operation above guarantees that IE can verify the identity of your
server.

When using client-certificates, you need to guarantee the opposite too:
your server needs to be able to verify the identity of the client.

After installing the client certificate on IE, you also need to install
the client-certificate -or the CA root of the client certificate- into
the store used by Tomcat. I would assume that Tomcat uses the JVM trust
store, so you would need to specify:

CATALINA_OPTS=-Djavax.net.ssl.trustStore=your_path_to/cacerts.jks
-Djavax.net.ssl.trustStorePassword=your_password

But the documentation indicates to use the attributes:
   truststoreFile=C:/cacerts.jks
   truststorePass=changeit
   truststoreType=JKS

...that you already have tried.

So, try setting the variables above.

-Jorge


 

-Original Message-
From: Ron Perkins [mailto:ronperkins...@googlemail.com] 
Sent: Monday, April 20, 2009 4:14 AM
To: users@tomcat.apache.org
Subject: Tomcat 5.5 Trust Stores and Client Authentication

Hi All,

I have done the following to create a Trust Store for Tomcat to use:

Created a keystore with new certificate:

keytool -genkey -alias mycert -keyalg RSA -kaypass changeit -keystore
keystore.jks -storepass changeit

Exported certificate:

keytool -export -alias mycert -file mycert.cer -keystore keystore.jks
-storepass changeit

Imported certificate into trust store:

keytool -import -v -trustcacerts alias mycert -keypass changeit -file
mycert.cer -keystore cacerts.jks -storepass changeit

Added the following Connector into server.xml to allow Client
Authentication:

Connector
   port=443
   scheme=https
   secure=true
   keystoreFile=C:/keystore.jks
   keystorePass=changeit
   keystoreType=JKS
   keyAlias=mykey
   truststoreFile=C:/cacerts.jks
   truststorePass=changeit
   truststoreType=JKS
   sslProtocol=TLS
   maxSpareThreads=75
   maxThreads=350
   uRIEncoding=UTF-8
   minSpareThreads=25
   clientAuth=true
/Connector

After starting Tomcat up, using netstat I can see that port 443 is
listening...

When using IE to test the connection to the https default page I get
IE's no communication web page displayed. If I use Firefox this gives me
the following error: SSL peer cannot verify your certificate (Error
code: ssl_error_bad_cert_alert)

I was expecting a message to say that the client needs a client
certificate? I then installed the client certificate mycert.cer into the
client browsers, but has no effect and I still recevie the same error
messages.

To check that I have SSL correctly installed, if I change
clientAuth=true to clientAuth=false then default Tomcatwebpage is
displayed within the browsers.

What have I done wrong? I am thinking that it is the way that I have
created the Trust store that is the problem?

Thanks for any help in advance...

-
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: 15 second for redeployment is to much

2009-04-20 Thread Gregor Schneider
On Sun, Apr 19, 2009 at 9:43 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:

 How about pointless?  Somewhat akin to debating the number of angels that can 
 dance on the head of a pin.

Why pointless? The answer is obvious: 42

scnr...

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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



RE: Tomcat 5.5 Trust Stores and Client Authentication

2009-04-20 Thread Jason Smith
I think by installing the .cer file, you installed the public part of the 
client certificate. A .cer file is supposed to contain the publicly 
distributable portion of the client certificate.  

The browsers need the private part. That's why it's called a client 
certificate.  You import the .cer file into your Java JKS keystore on the 
server, and that lets the server know it can trust the client.  You also have 
to set up a user account matching the certificate in tomcat-users.xml for the 
server portion to function.  And there is a web.xml part too.  You'll need to 
import a .p12 file that is generated as part of the whole process into the 
browsers.  If you don't have a .p12 file handy, you need to figure out how to 
get one from somewhere. You double click on a .p12 file to import it into 
Window's keystore.  FireFox also allows you to directly import a .p12 file.  

-Original Message-
From: Jorge Medina [mailto:jmed...@e-dialog.com] 
Sent: Monday, April 20, 2009 9:49 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 Trust Stores and Client Authentication


I have not used client certificates, but in order to use SSL with
self-generated certificates you need to add your server self-signed
certificate to the trusted roots of your Windows account or computer
account. Use the Certificates plug-in on an MMC console to perform the
operation.

The operation above guarantees that IE can verify the identity of your
server.

When using client-certificates, you need to guarantee the opposite too:
your server needs to be able to verify the identity of the client.

After installing the client certificate on IE, you also need to install
the client-certificate -or the CA root of the client certificate- into
the store used by Tomcat. I would assume that Tomcat uses the JVM trust
store, so you would need to specify:

CATALINA_OPTS=-Djavax.net.ssl.trustStore=your_path_to/cacerts.jks
-Djavax.net.ssl.trustStorePassword=your_password

But the documentation indicates to use the attributes:
   truststoreFile=C:/cacerts.jks
   truststorePass=changeit
   truststoreType=JKS

...that you already have tried.

So, try setting the variables above.

-Jorge


 

-Original Message-
From: Ron Perkins [mailto:ronperkins...@googlemail.com] 
Sent: Monday, April 20, 2009 4:14 AM
To: users@tomcat.apache.org
Subject: Tomcat 5.5 Trust Stores and Client Authentication

Hi All,

I have done the following to create a Trust Store for Tomcat to use:

Created a keystore with new certificate:

keytool -genkey -alias mycert -keyalg RSA -kaypass changeit -keystore
keystore.jks -storepass changeit

Exported certificate:

keytool -export -alias mycert -file mycert.cer -keystore keystore.jks
-storepass changeit

Imported certificate into trust store:

keytool -import -v -trustcacerts alias mycert -keypass changeit -file
mycert.cer -keystore cacerts.jks -storepass changeit

Added the following Connector into server.xml to allow Client
Authentication:

Connector
   port=443
   scheme=https
   secure=true
   keystoreFile=C:/keystore.jks
   keystorePass=changeit
   keystoreType=JKS
   keyAlias=mykey
   truststoreFile=C:/cacerts.jks
   truststorePass=changeit
   truststoreType=JKS
   sslProtocol=TLS
   maxSpareThreads=75
   maxThreads=350
   uRIEncoding=UTF-8
   minSpareThreads=25
   clientAuth=true
/Connector

After starting Tomcat up, using netstat I can see that port 443 is
listening...

When using IE to test the connection to the https default page I get
IE's no communication web page displayed. If I use Firefox this gives me
the following error: SSL peer cannot verify your certificate (Error
code: ssl_error_bad_cert_alert)

I was expecting a message to say that the client needs a client
certificate? I then installed the client certificate mycert.cer into the
client browsers, but has no effect and I still recevie the same error
messages.

To check that I have SSL correctly installed, if I change
clientAuth=true to clientAuth=false then default Tomcatwebpage is
displayed within the browsers.

What have I done wrong? I am thinking that it is the way that I have
created the Trust store that is the problem?

Thanks for any help in advance...

-
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: 15 second for redeployment is to much

2009-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andre-John,

On 4/19/2009 7:25 PM, Andre-John Mas wrote:
 This is one reason I would like to see a file change listener as
 standard in Java.

You'd have to wait for a file change listener as standard in an OS, too.

 The idea is that for systems providing a native file
 listener, such as Unix system which offer kernel notifications this
 would be used, and as a fall-back a timer task would be used. I am not
 aware of any current cross-platform implementations of this approach.

Are there any such standards?

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

iEYEARECAAYFAkns0JgACgkQ9CaO5/Lv0PBZtQCgj6SmEuTzaOcqzNRSbKi/JOe5
TicAniYk/sLUc7tah8YZVi3WJ25TxJDx
=XcGV
-END PGP SIGNATURE-

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



Re: 15 second for redeployment is to much

2009-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 4/19/2009 2:57 PM, André Warnier wrote:
 There must exist a more efficient mechanism for [redeploying webapps in 
 Tomcat].
 One should probably check how the Tomcat Manager deploys an application
 on-demand, and use the same mechanism e.g.

Or, since the OP is using Maven (which can use/is using ant), you could
use the ant task for Tomcat redeployment on demand, rather that relying
on Tomcat's auto-redeployment to pick up webapp changes and to its own
redeployment.

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

iEYEARECAAYFAkns0P8ACgkQ9CaO5/Lv0PDhPQCfbShzOfkMxurAPdUO1Wur2yD4
eqoAoJj/VGTA/B5OVl0aXPxaVnQpz60N
=ZOJm
-END PGP SIGNATURE-

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



RE: catalina errors

2009-04-20 Thread Walter Thompson
Nope, that had little to do with the problem. 
 
I did figure out what was causing the problems.
 
1) There were two libraries that I needed to put in the widows\system32 
directory that eliminated most of the INFO: messages.
 
2) The other was that I didn't need the root directory because nothing was 
being accessed in that directory and 
there wasn't any valid content in it, (all http is being handled by Apache) 
this caused the context[] error, null
pointer exceptions and SSI errors (deleted root directory to solve problem).
 
3) Now the log just shows startup and/or shutdown information.
 
4) The reason I began looking in the logs in the first place was because the 
server was hanging when parts of it were trying to send mail.
This was due to our mail server having issues with black list servers.

Thanks for you help. 

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Friday, April 17, 2009 10:52 AM
To: Tomcat Users List
Subject: Re: catalina errors

Walter Thompson wrote:
  
 I am running the following configuration:
  
 Windows Server 2003
 Apache 2.2.6 front end
 Tomcat 6.0.16.0 backend for servlets
 Java 1.6.0_13-b03
 mod_SSL 2.2.6
 openSSL 0.9.8g
  
Thanks for mentioning that. Few people do without prodding.


 The SSL Certificates are installed in Apache so I may not need to 
 enable SSL in Tomcat (now tomcat ssl is enabled).
  
 Catalina log shows following:
  
...
 Apr 17, 2009 8:59:48 AM org.apache.catalina.core.AprLifecycleListener
 init
 INFO: The APR based Apache Tomcat Native library which allows optimal 
 performance in production environments was not found on the
 java.library.path:
 C:\www\Tomcat6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WI
 ND 
 OWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\ATI Technologies\ATI Control Panel;C:\Program 
 Files\Intel\DMIX;C:\www\openssl\bin;C:\www\Apache22\bin;C:\www\php5;C:
 \w 
 ww\mysql5\bin;C:\www\perl\bin;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROG
 RA ~1\CA\ETRUST~1;C:\Program Files\Executive 
 Software\Diskeeper\;C:\Program Files\java\jdk1.6.0_13;C:\Program 
 Files\java\jre6;C:\www\Tomcat6;C:\www\Tomcat6\lib
 Apr 17, 2009 8:59:48 AM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 487 ms Apr 17, 2009 8:59:48 AM 
 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 Apr 17, 2009 8:59:48 AM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Apr 17, 2009 
 8:59:48 AM org.apache.catalina.startup.HostConfig
 deployDirectory
 SEVERE: Error deploying web application directory ROOT
 java.lang.SecurityException: Servlet of class 
 org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded 
 by this web application

Well, that sounds pretty clear.
Maybe here : http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
privileged ?

-
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: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Liraz,

On 4/20/2009 4:17 AM, Liraz Siri wrote:
 You're right Chris, you don't _need_ Apache, and therefore mod_jk to run
 Tomcat. Tomcat can listen (and does by default, though we turned it off
 for security reasons) and answer requests directly.
 
 OTOH, we consulted with a few Java people who told us you usually (in a
 production setting) want a load-balancer (eg. Apache) in front of your
 Tomcat node[s] to:
 
 A) improve performance
 B) make the setup easier to maintain
 C) provide a way to serve static content

I would argue that A is best achieved by a hardware load balancer
rather than Apache httpd, B is actually /not/ achieved by the addition
of Apache httpd (more components means more complexity which means
higher maintenance costs), and C is served perfectly by Tomcat alone.

If I were you, I would provide a Tomcat-only appliance and a separate
load-balancer appliance that could be trivially combined to achieve
all your goals.

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

iEYEARECAAYFAkns1UQACgkQ9CaO5/Lv0PCxxACggT1ClMwEmKjqGFPh8qrcd9eM
rmcAoJeLt1OvGliOJVZ0OrwMQknE1MZ1
=Pcjo
-END PGP SIGNATURE-

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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Liraz Siri
Christopher Schultz wrote:
 I would argue that A is best achieved by a hardware load balancer
 rather than Apache httpd, B is actually /not/ achieved by the addition
 of Apache httpd (more components means more complexity which means
 higher maintenance costs), and C is served perfectly by Tomcat alone.
 
 If I were you, I would provide a Tomcat-only appliance and a separate
 load-balancer appliance that could be trivially combined to achieve
 all your goals.

Quite right. We forwarded some of the feedback we received on the list
to some of the people consulted with and it seems there was a
misunderstanding on our part. It doesn't make sense for the load
balancer and Tomcat to be in the same appliance. We'll be fixing that in
the next version.

Cheers,
Liraz





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



Re: 15 second for redeployment is to much

2009-04-20 Thread János Löbb

 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed


If You run quartz it can look in a shorter time if Your webapp  
deployed or not.




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



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Liraz,

On 4/20/2009 4:25 PM, Liraz Siri wrote:
 Christopher Schultz wrote:
 I would argue that A is best achieved by a hardware load balancer
 rather than Apache httpd, B is actually /not/ achieved by the addition
 of Apache httpd (more components means more complexity which means
 higher maintenance costs), and C is served perfectly by Tomcat alone.

 If I were you, I would provide a Tomcat-only appliance and a separate
 load-balancer appliance that could be trivially combined to achieve
 all your goals.
 
 Quite right. We forwarded some of the feedback we received on the list
 to some of the people consulted with and it seems there was a
 misunderstanding on our part. It doesn't make sense for the load
 balancer and Tomcat to be in the same appliance. We'll be fixing that in
 the next version.

Sounds good!

Don't get me wrong: I hadn't intended to merely complain. I'm just
applying some of the best practices I've learned through the years both
working on my own projects and helping out folks on this list. I think a
Tomcat appliance is a great idea.

Remember to use APR for SSL! :)

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

iEYEARECAAYFAkns5PsACgkQ9CaO5/Lv0PDEGQCfZtjPc28OsS9Tt+dIAty2RCI+
vWIAn17EENMpkbQdI6XF7+dWhPL6XbpR
=uuRA
-END PGP SIGNATURE-

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



Tomcat is idle when Oracle crashed

2009-04-20 Thread shak.shaik

We've production environment as follows.
We have two web servers with load balancing capability. We've two Oracle DB
servers and we are using Virtual IP to connect to one of the db servers. our
web server is tomcat 6.0

br

Our application should up and running even there is no DB connectivity and
it is tested and proved.
Also we use TAF (Transparent Application Failover. if one db server is down,
all db connections has to rout to another db server) as part of its db URL.
br
But last week, one of our DB server got crashed and from the moment db got
crashed, our website is not reachable.

br
When I checked the logs, I didn't see any JDBC exceptions or any other
generic exceptions. . Same time I saw the status as started for tomcat
service in windows service (Control Panel - Services). 
br
Our network people argue that there are no issues from their side. Why the
tomcat is Idle and web site is not found in case of DB crash?
br
Any suggestions or work around will be greatly appreciated.

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Tomcat-is-idle-when-Oracle-crashed-tp23145324p23145324.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: what can Tomcat be doing that a profiler can't see?

2009-04-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nikita,

On 4/16/2009 3:09 PM, dukehoops wrote:
 In brief:
 I am load-testing an app running on Tomcat 6 NIO and am observing a big
 discrepancy between avg request latency as reported by JMeter (660ms) and
 the profiler (19ms). I would like to understand where is the delta being
 spent.

 JMeter is simulating 40 users, each repeatedly hitting the server with the
 same request (against port 8080), with 50ms think time. The response for
 each request is in plain text, about 10-20k worth. The request hits
 app-level cache 100% of the time, so JDBC connection aren't even being
 checked out of the cxn pool and no DB work is being done.

Assuming this is true, here is your raw data:

Simultaneous “users”  40
Request Think Time (ms)   50
Response size (kB)15
Network speed (ideal kbps)  1024

 Given the huge discrepancy, I would like to determine where is 642ms
 (=661-19) being spent. Network latency should not be an issue.

Not latency, but perhaps bandwidth:

Request Freq (1/sec) 800
Response size (bits)  122880
Response bits per second98304000
Network speed (bps)  1048576

You are trying to shove ~100 times more data through your network per
second than it can handle. Also don't forget that actual ethernet
bandwidth is more like 30% of the the ideal, so you're talking about a
network that can actually run at something around 315,000bps.

Did you think that you wouldn't clog Teh Tubes with all that data? The
Internet isn't like a big truck.

 Is it
 possible that Tomcat is spending time doing something in NIO poller - before
 Tomcat's exec threads are engaged?

Try backing-off your tests to the point where your network can keep up,
and then see what your test report.

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

iEYEARECAAYFAkns7BQACgkQ9CaO5/Lv0PCVGACgqA/umJr4kgXBSmPlCHl6LChe
3ksAn004amc0l6oCUi+u6y9dvhgtxhMM
=mTzH
-END PGP SIGNATURE-

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



Re: what can Tomcat be doing that a profiler can't see?

2009-04-20 Thread dukehoops

The network's nominal bandwith is 1GB (gigabit with a G). Even @ 30% util,
that's 300mbit/sec. In your calc bandwith required is ~98mbit -or 1/3 of
practical available. Not sure why you asserted that the bandwith is 1mbps.
btw, windows says network utilization is  2% during said test.

FWIW, we've discovered that replacing NIO with the old blocking connector
improved latency by a factor of 4-5 times. Digging deeper...

thanks
-nikita



Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Nikita,
 
 On 4/16/2009 3:09 PM, dukehoops wrote:
 In brief:
 I am load-testing an app running on Tomcat 6 NIO and am observing a big
 discrepancy between avg request latency as reported by JMeter (660ms) and
 the profiler (19ms). I would like to understand where is the delta being
 spent.
 
 JMeter is simulating 40 users, each repeatedly hitting the server with
 the
 same request (against port 8080), with 50ms think time. The response for
 each request is in plain text, about 10-20k worth. The request hits
 app-level cache 100% of the time, so JDBC connection aren't even being
 checked out of the cxn pool and no DB work is being done.
 
 Assuming this is true, here is your raw data:
 
 Simultaneous “users”40
 Request Think Time (ms) 50
 Response size (kB)  15
 Network speed (ideal kbps)1024
 
 Given the huge discrepancy, I would like to determine where is 642ms
 (=661-19) being spent. Network latency should not be an issue.
 
 Not latency, but perhaps bandwidth:
 
 Request Freq (1/sec)   800
 Response size (bits)122880
 Response bits per second  98304000
 Network speed (bps)1048576
 
 You are trying to shove ~100 times more data through your network per
 second than it can handle. Also don't forget that actual ethernet
 bandwidth is more like 30% of the the ideal, so you're talking about a
 network that can actually run at something around 315,000bps.
 
 Did you think that you wouldn't clog Teh Tubes with all that data? The
 Internet isn't like a big truck.
 
 Is it
 possible that Tomcat is spending time doing something in NIO poller -
 before
 Tomcat's exec threads are engaged?
 
 Try backing-off your tests to the point where your network can keep up,
 and then see what your test report.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAkns7BQACgkQ9CaO5/Lv0PCVGACgqA/umJr4kgXBSmPlCHl6LChe
 3ksAn004amc0l6oCUi+u6y9dvhgtxhMM
 =mTzH
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/what-can-Tomcat-be-doing-that-a-profiler-can%27t-see--tp23084469p23145723.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: Tomcat is idle when Oracle crashed

2009-04-20 Thread David Fisher
I've been investigating Oracle configuration myself - this page was  
helpful to me for Oracle 10g -

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/readme_10201.html

It contains a reference to the following bug -


BUG-3209390
JDBC OCI Driver's TAF functionality will not work, when used
in conjunction with JDBC Fast Connection Failover. The problem is
that when TAF is enabled, JDBC Fast Connection Failover
will likely remove connections, that were actually detected
and failed over by TAF. There is no work-around. Users cannot
use TAF and Fast Connection Failover together.


This is also stated for 11g:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/111070_readme.html

So I guess you'll need to figure out how - if possible - to  
reestablish your connections after the Oracle failover.


Or, maybe you should use the thin client instead of the OCI? I don't  
know the details you should be talking to an Oracle expert on metalink.


Regards,
Dave


On Apr 20, 2009, at 2:30 PM, shak.shaik wrote:



We've production environment as follows.
We have two web servers with load balancing capability. We've two  
Oracle DB
servers and we are using Virtual IP to connect to one of the db  
servers. our

web server is tomcat 6.0

br

Our application should up and running even there is no DB  
connectivity and

it is tested and proved.
Also we use TAF (Transparent Application Failover. if one db server  
is down,
all db connections has to rout to another db server) as part of its  
db URL.

br
But last week, one of our DB server got crashed and from the moment  
db got

crashed, our website is not reachable.

br
When I checked the logs, I didn't see any JDBC exceptions or any other
generic exceptions. . Same time I saw the status as started for  
tomcat

service in windows service (Control Panel - Services).
br
Our network people argue that there are no issues from their side.  
Why the

tomcat is Idle and web site is not found in case of DB crash?
br
Any suggestions or work around will be greatly appreciated.

Thanks.

--
View this message in context: 
http://www.nabble.com/Tomcat-is-idle-when-Oracle-crashed-tp23145324p23145324.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




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



Re: Tomcat is idle when Oracle crashed

2009-04-20 Thread shak.shaik

Thanks Dave,

We are using JDBC thin driver. I think there is work around in tomcat called
ValidationQuery to make sure connection is not dead (which might cause the
idle stage of tomcat as per various discussion forums) which needs to
configure in  context.xml( in tomcat/conf folder).

But I want to confirm whether TAF is compatible with Thin driver or not. I
remember our DB talked to oracle support and they supported the OCI driver.
but due to other performance issues, we are not looking at OCI driver.

Thanks for your response.

Shakeel.



David Fisher wrote:
 
 I've been investigating Oracle configuration myself - this page was  
 helpful to me for Oracle 10g -
 http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/readme_10201.html
 
 It contains a reference to the following bug -
 
 BUG-3209390
 JDBC OCI Driver's TAF functionality will not work, when used
 in conjunction with JDBC Fast Connection Failover. The problem is
 that when TAF is enabled, JDBC Fast Connection Failover
 will likely remove connections, that were actually detected
 and failed over by TAF. There is no work-around. Users cannot
 use TAF and Fast Connection Failover together.
 
 This is also stated for 11g:
 http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/111070_readme.html
 
 So I guess you'll need to figure out how - if possible - to  
 reestablish your connections after the Oracle failover.
 
 Or, maybe you should use the thin client instead of the OCI? I don't  
 know the details you should be talking to an Oracle expert on metalink.
 
 Regards,
 Dave
 
 
 On Apr 20, 2009, at 2:30 PM, shak.shaik wrote:
 

 We've production environment as follows.
 We have two web servers with load balancing capability. We've two  
 Oracle DB
 servers and we are using Virtual IP to connect to one of the db  
 servers. our
 web server is tomcat 6.0

 br

 Our application should up and running even there is no DB  
 connectivity and
 it is tested and proved.
 Also we use TAF (Transparent Application Failover. if one db server  
 is down,
 all db connections has to rout to another db server) as part of its  
 db URL.
 br
 But last week, one of our DB server got crashed and from the moment  
 db got
 crashed, our website is not reachable.

 br
 When I checked the logs, I didn't see any JDBC exceptions or any other
 generic exceptions. . Same time I saw the status as started for  
 tomcat
 service in windows service (Control Panel - Services).
 br
 Our network people argue that there are no issues from their side.  
 Why the
 tomcat is Idle and web site is not found in case of DB crash?
 br
 Any suggestions or work around will be greatly appreciated.

 Thanks.

 -- 
 View this message in context:
 http://www.nabble.com/Tomcat-is-idle-when-Oracle-crashed-tp23145324p23145324.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

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

-- 
View this message in context: 
http://www.nabble.com/Tomcat-is-idle-when-Oracle-crashed-tp23145324p23147710.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



Apache / Tomcat Load Balanced mode

2009-04-20 Thread Karthik Nanjangude
Hi

Would the same work with Apache / Tomcat   Load Balanced mode

Configuration for single installation of the web application acme


www.acme.com  being exposed to INTERNET

www.acme.com/adminbeing exposed to INTRANET


Reason :  The application uses a single DB  to request of orders  (from 
Subscribers) and  same URL  with
  *admin*  would process the orders ( Internal Employees)
  and  should not be exposed to outside world.


Is there any Configuration with in Apache or Tomcat to achieve the same?



With regards
Karthik



Deploying to Tomcat Server

2009-04-20 Thread Richard Coutinho
Hello:

I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat
server cannot be registered with the Netbeans tool as it is an older version
of Tomcat.

I follow the instructions and try to start the Tomcat server from the IDE
[see syntax below]. If I run it from the IDE or simply run the startup.bat
file I get the following error:-
-Dsun.io.useCanonCaches=false

How can I fix this problem, so that I can start the Tomcat 4.1 server? 

Thanks 
Richard


target name=startcat4 depends=init
exec
executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat
env key=CATALINA_HOME
value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/
env key=CATALINA_BASE
value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/
/exec

/target


target name=run depends=compile
exec executable=C:\Program Files\Mozilla Firefox\firefox.exe
arg value=http://localhost:8080/WebApplication4/${client.urlPart}/
/exec

/target


target name=stopcat4 depends=init
exec
executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat
env key=CATALINA_HOME
value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/
env key=CATALINA_BASE
value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/
/exec

/target