Re: keeping same session via apache2 mod_jk2 and tomcat5

2006-03-22 Thread Vahid Hedayati
Hi all

I had as a test used seperate engines for each virtual host but instead it
loaded up  one of the virtual hosts on both and the site that had the wrong
virtual host loaded up seemed to keep the session ID .

Anyhow here are the configs.
The first 2 is what is currently running the last 2 are what i tried as
seperate engines.

__
current server.xml
Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.jk.config.ApacheConfig
modJk=/usr/lib/apache2/modules/mod_jk.so
WorkersConfig=/etc/apache2/workers.properties /

  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/
  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina


!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 --
Connector className=org.apache.coyote.tomcat5.CoyoteConnector
   port=8180 minProcessors=5 maxProcessors=75
   enableLookups=false acceptCount=10 debug=0
   connectionTimeout=2 useURIValidationHack=false /

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector className=org.apache.coyote.tomcat5.CoyoteConnector
   port=8009 minProcessors=5 maxProcessors=75
protocol=AJP/1.3
   enableLookups=false acceptCount=10 debug=0
   connectionTimeout=2 useURIValidationHack=false
   protocolHandlerClassName=
org.apache.jk.server.JkCoyoteHandler/

Engine name=Catalina defaultHost=localhost debug=0
jvmRoute=worker1
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_ suffix=.log timestamp=true/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/
  DefaultContext reloadable=true debug=4/

  Host name=localhost debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=localhost_ suffix=.log
timestamp=true/
  /Host
  Host name=www.greenlightproductions.co.uk debug=0
appBase=/apache_sites/servlets/
unpackWARs=true autoDeploy=true
   Context path=/servlets  docBase=greenlight debug=0
reloadable=true/
 parameter
   namedriverClassName/name
   valueorg.gjt.mm.mysql.Driver/value
 /parameter
  Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=green_log. suffix=.txt pattern=common
resolveHosts=true/
  /Host

   Host name=www.pro.org.uk debug=0 appBase=/apache_sites/servlets/
  unpackWARs=true autoDeploy=true
  Context path=/vahidservlets  docBase=vservlets debug=0
reloadable=true/
  Context path=/servlets  docBase=vservlets debug=0
reloadable=true/
  parameter
   namedriverClassName/name
   valueorg.gjt.mm.mysql.Driver/value
 /parameter
  Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=pro_log. suffix=.txt pattern=common
resolveHosts=true/
  /Host
  /Engine
  /Service
/Server

___
current workers.properties.
workers.tomcat_home=/var/lib/tomcat5
workers.java_home=/usr/bin/java
ps=/
worker.list=worker1,worker2,worker3

# Definition for local worker using AJP 1.3
#
#worker.foo.type=ajp13
#worker.foo.host=www.pro.org.uk
#worker.foo.port=8009
#worker.foo.cachesize=20

worker.balancer.sticky_session=true

[uri:www.pro.org.uk/servlets/*]
worker.worker1.balancer.sticky_session=true
worker.worker1.tomcatId=worker1
#worker.foo=ajp13:www.pro.org.uk:8009
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300

[uri:www.greenlightproductions.co.uk/servlets/*]
worker.worker2.tomcatId=worker2
worker.worker2.balancer.sticky_session=true
#worker.foo=ajp13:www.pro.org.uk:8009
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8009
worker.worker2.lbfactor=50
worker.worker2.cachesize=10

Re: Data Truncation Error

2006-03-22 Thread Jon Wingfield

Try replacing the ampersand character with the xml entity amp;

HTH,

Jon

Mark Whitby wrote:
Further to my email earlier I've discovered I can either have the 
truncation on or the reconnect on, but I can't include both in the url 
otherwise Tomcat doesn't start up.  Also, if I take off the 
autoreconnect I get a null pointer error on my connection class.


I'm getting desperate so does anyone know how I can set the truncation 
to false and still have the auto reconnect on?


Mark

- Original Message - From: Mark Whitby [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, March 21, 2006 8:59 PM
Subject: Data Truncation Error


Hello all,

I am using a MySQL 5.0.18 server with the 
mysql-connector-java-3.1.12-bin Connector/J driver to connect to it on a 
Tomcat 5.5.15 server.  The connection works fine but occasionally when I 
try to add a Java double value to the database (a row set to 
DECIMAL(10,2))I get the following error:


com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for 
column 'TotalCost' at row 1


Now I believe to solve this you have to turn data truncation off in the 
connection url.  However, when I try


url=jdbc:mysql://localhost:3306/fyp?jdbcCompliantTruncation=falseautoReconnect=true 



Tomcat fails to start and I have to remove the truncation bit so it just 
reads url=jdbc:mysql://localhost:3306/fyp?autoReconnect=true with 
which Tomcat does start up.


So how can I get rid of this error?

Many thanks

Mark Whitby

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



connections not freed

2006-03-22 Thread Edward Quick

Hi,

I have the following scenerio:

I'm running a jsp on tomcat 4.1.31 fronted by apache 2.0.54. This jsp uses a 
tomcat jdbc pool connection with maxWait set to 1ms. At the moment the 
database is screwed up because one of the filesystems on there has filled up 
from an archive job.


Now when I run the jsp, the code stops after successfully getting the 
datasource, and hangs indefintely on getConnection.


DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/pol);
Connection conn = ds.getConnection();= gets stuck 
here


The browser also hangs, and when maxClients have logged onto the jsp, 
apache doesn't take anymore connections even after the browser has been 
shut.


Are there any timeouts or other settings on Apache/Tomcat I need to 
configure to avoid this behaviour?


Thanks for any help.

Ed.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer instructions

2006-03-22 Thread Edoardo Causarano
Alle Tuesday 21 March 2006 18:05, Filip Hanik - Dev Lists ha scritto:

Thank you Filip, please bear me one more time. I understand that only the 
tomcat cluster master should have a watchDir configured and watchEnabled 
set to true. The deployDir of all tomcat cluster members should point to 
the clustered Host appBase attribute; in case the Cluster element is 
defined on the Service, the directory should be the parent of the enclosed 
Host appBase attributes. Is this correct?

The watchDir doesn't have anything to do with the appBase folders and can be 
exposed using any network filesystem (eg. CIFS, DAV or NFS) as long as the 
tomcat cluster master process can access it. Is this correct?

In order to get the farm deployment running I do not have to download the 
tomcat-deployer package. Right?

If directories don't exist (especially the tempDir) will Tomcat crash and burn 
or silently fail to farm deploy?

e


 only one server should have (watchEnabled=true), this is the location
 where you deploy all your files.
 if you enable it on all servers, then just be careful so that you don't
 deploy the same file in two locations and end up with a deployment
 collission.

 tempDir=/tmp/war-temp/ -- The directory the deployer uses to assemble
 file transfers
 deployDir=/tmp/war-deploy/ -- the directory where the deployer
 deploys the WAR file to
 watchDir=/tmp/war-listen/  -- the listen directory, this is where you
 drop in a new file so that the deployer can pick it up
 watchEnabled=false --true means we are watching for new deployments,
 false means we act as a slave, only get deployments from other nodes.

 Filip

 Edoardo Causarano wrote:
  Hello list,
  I've managed to get a test cluster working. ATM all cluster members have
  their own copy of deployed servlets and jsp pages. as well as the apache
  httpd frontend that contains an unpacked copy of the war file for static
  file serving.
  The current config is awkward to maintain but apparently the
  org.apache.catalina.cluster.deploy.FarmWarDeployer class takes care of
  replicating the wars across the cluster.
 
  Ideally (unlesss I don't have a clue) the apache cluster lead has a
  tomcat running in JNI mode where deploys are performed. The other tomcat
  only cluster members are notified of the new deployment and get their
  local copy syncronized. Does tomcat sync on the multicast channel or must
  I export the lead's webapps dir on NFS and point the other members' watch
  dir to it?
 
  Can anyone post their (sanitized) config so I can get the gist of it?
 
  Thanks,
  e
 
  (btw, yesterday it wouldn't work because one of the two test machines
  didn't have mcast in the kernel... grrr)
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- Disclaimer --
Ai sensi del D. Lgs. n. 196/2003, si precisa che le informazioni contenute in 
questo messaggio e negli eventuali allegati sono riservate e per uso esclusivo 
del destinatario.
Qualsiasi diffusione, distribuzione o copia della presente comunicazione non 
autorizzata per iscritto è severamente proibita ed espongono il responsabile 
alle relative conseguenze civili e penali.
Chiunque riceva questo messaggio per errore, è pregato di distruggerlo insieme 
agli eventuali allegati, non trattenendone copia, e di informare immediatamente 
Laziomatica S.p.A.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-22 Thread Tim Lucia
You will probably want to set emptySessionPath to true

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
http://marc.theaimsgroup.com/?l=tomcat-userm=114082698006999w=2

Otherwise, the browser will send the cookie for /mywebapp as that is the
context which Tomcat will set JSESSIONID under.

Unless you don't need sessions.

Tim

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 2:21 AM
To: Tomcat Users List
Subject: Re: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

Xin Herbert Wu wrote:
 
 (1) Assume I have a web app called mywebapp.war and I deployed it to the
 jboss server(http1.1 connector listens on port 8080). I can access this
web
 app with the URL http://localhost:8080/mywebapp/index.html (easy for
 development)
 (2) Now I want to add the apache server(assuming on port 80) as the
 front-end to access mywebapp.war with shorter url
 http://localhost:80/index.html (nice for production)


JkMount /mywebapp/* yourworker


RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(.*)$
#You can have Apache serve static content
#for example /mywebapp/images/*
#RewriteCond %{REQUEST_URI} !^/images/.*$
RewriteRule ^/(.*) /mywebapp/$1 [PT]


Regards,
Mladen.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AppServer Comparison metrics

2006-03-22 Thread Martin Gainty
Good Morning All-

Has anyone come across any studies detailing comparisons of AppServers 
(supported name algorithms, supported security models, how many max threads are 
supported, J2EEversion support Servletversion spec support?) etc ?

Sorry for the O/T thread

Many Thanks,

Martin-

Re: SSL

2006-03-22 Thread ngolehung84

Thanks, I saw APR, but in the Tomcat Documentation I can't find the doc which
tell how to configure Tomcat with OpenSSL ( just some guide lines!:( ).
Now I want to customize the cipher algorithms, can I do this with OpenSSL?
How can I configure Tomcat to use OpenSSL?
Thanks in advance!
Hung.
--
View this message in context: http://www.nabble.com/SSL-t1318762.html#a3531876
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SSL

2006-03-22 Thread Caldarale, Charles R
 From: ngolehung84 [mailto:[EMAIL PROTECTED] 
 Subject: Re: SSL
 
 Thanks, I saw APR, but in the Tomcat Documentation I can't 
 find the doc which tell how to configure Tomcat with OpenSSL
 ( just some guide lines!:( ).

Did you look at the APR doc?
http://tomcat.apache.org/tomcat-5.5-doc/apr.html

 Now I want to customize the cipher algorithms, can I do this 
 with OpenSSL?

Read the OpenSSL docs:
http://www.openssl.org/docs/

Or use Google, buy a book, etc.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SSL

2006-03-22 Thread ngolehung84

I have saw that file http://tomcat.apache.org/tomcat-5.5-doc/apr.html:
The server.xml file
Connector port=443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 scheme=https secure=true
   SSLEngine=on 
   SSLCertificateFile=${catalina.base}/conf/localhost.crt
   SSLCertificateKeyFile=${catalina.base}/conf/localhost.key
/

But I don't know what is localhost.crt and  localhost.key ? How can I
create 2 file?
--
View this message in context: http://www.nabble.com/SSL-t1318762.html#a3532758
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Controlling contents of the localhost.date.log file

2006-03-22 Thread Davidian

I've posed this question recently, but I am going to try to phrase it better,
as I think last time it may have been poorly worded...

My web application logs information to the localhost.date.log file.  The
information that is being logged is doing so correctly.  However, here is my
problem:

In between every line of logging, an additional line is ADDED, which looks
like the following:

Mar 22, 2006 4:05:04 AM org.apache.catalina.core.ApplicationContext log

Again, a line like this appears every other line in the localhost.date.log
file.  The lines that I want logged already include the date, so these lines
are uneeded, and clutter up the log file quite a bit.

My question: how do I get rid of these lines?  I have already written my own
java.util.logging.Formatter subclass, but this doesn't work.  It appears
that the formatter does not insert these lines.  My Formatter only affected
the lines that my webapp is logging, not the lines in question.

Does someone know how to stop these extra lines from being logged?

Thank you very much.
--
View this message in context: 
http://www.nabble.com/Controlling-contents-of-the-localhost.%3Cdate%3E.log-file-t1324188.html#a3533134
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SSL

2006-03-22 Thread ngolehung84

Thank you very much!!
I have configured successful!!
--
View this message in context: http://www.nabble.com/SSL-t1318762.html#a3534884
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Desupport for Tomcat 4?

2006-03-22 Thread TroyGeek
Hello,
Do you know when the tomcat development group plans on not releasing any new
patches for Tomcat 4? Does this ever happen? If a bug is found in Tomcat 4
is it fixed in Tomcat 4 or are we forced to upgrade to Tomcat 5?

Thank you for your time!

~ T r o y ~


Re: Tomcat 5.5.16 - Confirmation of Extra bytes at the end of class file listeners/ContextListener error

2006-03-22 Thread Adam Hill
Thanks for confirming I wasn't crazy :-)

adam...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Desupport for Tomcat 4?

2006-03-22 Thread Markus Schönhaber
TroyGeek wrote:
 Do you know when the tomcat development group plans on not releasing any
 new patches for Tomcat 4? Does this ever happen? If a bug is found in
 Tomcat 4 is it fixed in Tomcat 4 or are we forced to upgrade to Tomcat 5?

Look at this:
http://tomcat.apache.org/whichversion.html
The fact that this section
http://tomcat.apache.org/whichversion.html#Apache%20Tomcat%204.x
cantains twice the encouragement to upgrade to Tomcat 5.x whenever possible, 
you might want to consider following this advice.

I know, this is not an answer to your question. It is simply a hint.

Regards
  mks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Supporting maximum number of keep-alive connections

2006-03-22 Thread Rajeev Jha
 On 3/17/06, Rajeev Jha [EMAIL PROTECTED] wrote:


 What's your ratio of Apache to Tomcat instances? You may want to look
 into using squid as a reverse proxy to Tomcat, it is very good at
 supporting a huge number of concurrent clients without having to spawn
 a thread or process for each one.

I think that may not be possible in our case. see one aspect of
keep-alive is you keep the pipe open because the same client can
request for more resources. But all such requests are alive for a
finite amount of time only ,so performance is always talked in terms
of through-put.

In our case,the servlet is interfacing to the back-end that sends
async events from time to time. So we really need to hold on to a
thread to receive notifications from the backend. The container spwans
a thread that enters the doGet() of servlet

doGet(){

initial_processing();
  while(pipeOpen) {
 data = pipe.read(); // will block for backend events
 process(data);
outputStream.flush();
}

outputStream.close();
}

Now we can not return this thread to some pool, because I do not know
when the events will arive. And I need to keep the connection open to
push the data + need one thread to block on events.

So I need one thread to server one request. The difference  from
previous case is , our processing of a request is not over in finite
time. we have to keep the same connection open.

I really donot see a way out w/o some support from the container itself.

Jetty has a feature called continuation that is supposed to solve this
issue.But for the moment, I want to try tomcat first. i want to see
how many threads i can support in such a scenario.

I will put a separate mail for that.

Thanks

Rajeev.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



return (HexUtils.convert(md.digest())) in RealmBase

2006-03-22 Thread Alessandro Colantoni
Hi All!
I saw that both method Digest(..) and digest(..) in RealmBase return (
HexUtils.convert(md.digest())) and not just
md.digest().toString.

My problem is that user table is maintained by another application developed
in an other technology.
My application uses this table just to authenticate.
The password of user table is encrypted with an algorithm I've been done.
I wrote a MessageDigestSpi for that algorithm, I wrote my provider, I
registered it and everything looks work fine.
Except that of course if I do:
 RealmBase.Digest(myCredentials,myAlgorithm);

I get a result different from doing
MessageDigest md = MessageDigest.getInstance(myAlgorithm);
md.update(myCredentials.getBytes());
md.digest().toString;

but the same result of
 MessageDigest md = MessageDigest.getInstance(myAlgorithm);
 md.update(myCredentials.getBytes());
HexUtils.convert(md.digest())

So the problem is that the other application stores without using the
HexUtils.convert method
but when tomcat authenticates it uses it.

One solution could be write a Realm class that extends the JDBCRealm (the
one I'm using) and overwrite these methods.
But I'm afraid that in different versions of Tomcat (i don't want link to
one) could be different signature of these methods.
There's another solution?
At least avoiding overwriting these very important methods?

And just for curiosity, why HexUtils.convert has been utilized?

Thanks in advance for help and have a nice springtime
Alessandro


RE: return (HexUtils.convert(md.digest())) in RealmBase

2006-03-22 Thread Jay Burgess
I think this is the right answer:

digest() returns a sequence of bytes.  Depending on the values of the individual
bytes, if you were to try and convert it to String, you can end up with
non-printable characters, etc. 

I'm assuming that HexUtils.convert() turns each 4 bits of each byte into a hex
character, so that you end up with a proper String representation of the digest
that can be sent as part of a URL.

Jay

| Jay Burgess [Vertical Technology Group]
| http://www.vtgroup.com/


-Original Message-
From: Alessandro Colantoni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 12:12 PM
To: Tomcat Users List
Subject: return (HexUtils.convert(md.digest())) in RealmBase

Hi All!
I saw that both method Digest(..) and digest(..) in RealmBase return (
HexUtils.convert(md.digest())) and not just
md.digest().toString.

My problem is that user table is maintained by another application developed
in an other technology.
My application uses this table just to authenticate.
The password of user table is encrypted with an algorithm I've been done.
I wrote a MessageDigestSpi for that algorithm, I wrote my provider, I
registered it and everything looks work fine.
Except that of course if I do:
 RealmBase.Digest(myCredentials,myAlgorithm);

I get a result different from doing
MessageDigest md = MessageDigest.getInstance(myAlgorithm);
md.update(myCredentials.getBytes());
md.digest().toString;

but the same result of
 MessageDigest md = MessageDigest.getInstance(myAlgorithm);
 md.update(myCredentials.getBytes());
HexUtils.convert(md.digest())

So the problem is that the other application stores without using the
HexUtils.convert method
but when tomcat authenticates it uses it.

One solution could be write a Realm class that extends the JDBCRealm (the
one I'm using) and overwrite these methods.
But I'm afraid that in different versions of Tomcat (i don't want link to
one) could be different signature of these methods.
There's another solution?
At least avoiding overwriting these very important methods?

And just for curiosity, why HexUtils.convert has been utilized?

Thanks in advance for help and have a nice springtime
Alessandro





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Supporting maximum number of keep-alive connections

2006-03-22 Thread Remy Maucherat
On 3/22/06, Rajeev Jha [EMAIL PROTECTED] wrote:
 In our case,the servlet is interfacing to the back-end that sends
 async events from time to time.

As you may have noticed, the HTTP protocol (and the Servlet API) are
not designed for this kind of usage. You can try to hack your way
through if you like, but most likely you'll run into some issues with
servers in between and a variety of timeouts.

A protocol like SIP, OTOH, is designed for this and handles it very cleanly.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Inc
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Supporting maximum number of keep-alive connections

2006-03-22 Thread Rajeev Jha
On 3/22/06, Remy Maucherat [EMAIL PROTECTED] wrote:
 On 3/22/06, Rajeev Jha [EMAIL PROTECTED] wrote:
  In our case,the servlet is interfacing to the back-end that sends
  async events from time to time.

 As you may have noticed, the HTTP protocol (and the Servlet API) are
 not designed for this kind of usage. You can try to hack your way
 through if you like, but most likely you'll run into some issues with
 servers in between and a variety of timeouts.

 A protocol like SIP, OTOH, is designed for this and handles it very cleanly.


I totally agree. Doing this with http is a lot of unnecessary sit-ups.
However, The existing application runs on a web server   that has
support for resuming/suspending requests and things work out well. we
need to migrate the app to some modern-day container and  trashing the
exisitng application is really not an option.

on the brigther side, hardware is not a big issue with us. if we can
run around 4k threads/box then we are okay. but i do not know if even
that is possible. most of the configurations i had used earlier were
like ~ 100 threads/box.

Thanks

Rajeev.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



running two instances of tomcat

2006-03-22 Thread Jim the Standing Bear
Hi,

Is there a way to run two instances of tomcat 5.5 on the same machine?
Because me and a coworker were developing some webapps using the same node,
but under two different tomcat instances.  We just learned a painful lesson
that as soon as the second instance of tomcat is launched, the first one
dies.  Is there a way to get around the problem? Thank you.

-- Jim


Re: running two instances of tomcat

2006-03-22 Thread Nic Daniau
That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows
platform, because of the way the service is set up from the nsi scrip (that
you can read from tomcat source). I've written down a procedure to overcome
this and I will post it tomorrow (its on my laptop which I left at the
office tonight). I've tested it on live servers it works fine.

Ideally I hope the guys who write the windows deployer will one day allow
the installer to ask for
1) the name of the servive and not force it to Tomcat5 (whic is the main
issue)
2) use that service name for setting up the reg keys (and not use constants)
3) let the user choose the name of the Program menu it's copying the
shortucut to
If I have the time I will post a feature request on bugzilla...

Will definitively post my step-by-step procedure tomorrow
Nic

On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:

 Jim the Standing Bear wrote:

 Hi,
 
 Is there a way to run two instances of tomcat 5.5 on the same machine?
 Because me and a coworker were developing some webapps using the same
 node,
 but under two different tomcat instances.  We just learned a painful
 lesson
 that as soon as the second instance of tomcat is launched, the first one
 dies.  Is there a way to get around the problem? Thank you.
 
 -- Jim
 
 
 
 I'm running about 4 instances of tomcat on a single machine, so yes it's
 no problem.  But they need to all be listening on different ports, and
 might need to be supporting different contexts.




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: running two instances of tomcat

2006-03-22 Thread David Kerber
I got it working no problem on Windows, running 5.5.12.  Just had to 
mess with the service installation scripts a bit to give each of them 
different names.  A little hassle, but not a big one.



Nic Daniau wrote:


That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows
platform, because of the way the service is set up from the nsi scrip (that
you can read from tomcat source). I've written down a procedure to overcome
this and I will post it tomorrow (its on my laptop which I left at the
office tonight). I've tested it on live servers it works fine.

Ideally I hope the guys who write the windows deployer will one day allow
the installer to ask for
1) the name of the servive and not force it to Tomcat5 (whic is the main
issue)
2) use that service name for setting up the reg keys (and not use constants)
3) let the user choose the name of the Program menu it's copying the
shortucut to
If I have the time I will post a feature request on bugzilla...

Will definitively post my step-by-step procedure tomorrow
Nic

On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:
 


Jim the Standing Bear wrote:

   


Hi,

Is there a way to run two instances of tomcat 5.5 on the same machine?
Because me and a coworker were developing some webapps using the same
 


node,
   


but under two different tomcat instances.  We just learned a painful
 


lesson
   


that as soon as the second instance of tomcat is launched, the first one
dies.  Is there a way to get around the problem? Thank you.

-- Jim



 


I'm running about 4 instances of tomcat on a single machine, so yes it's
no problem.  But they need to all be listening on different ports, and
might need to be supporting different contexts.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   



 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: robust Failover, mod_jk

2006-03-22 Thread Vidya TR

Our application which runs on Apache HTTP Server 2.0.54, TOMCAT 5.0.28 with
mod_jk 1.2.15 connector. In production while our application was running.
Our application had a thread dead Lock hosing up all the users trying to
connect our application. So started investigating the failover setup in
mod_jk. I have two tomcat instances nodeA (active node )  and nodeB
(failover node). When I run my test scenario of a thread dead lock on nodeA
it doesn't seem to be failing over to nodeB. Instead whole site becomes
inaccessible and based on the reply_timeout setting I have I receive a
Service Temporarily Unavailable message. It is very critical for me to
find an answer to this. Is mod_jk the best option? Or should I be
investigating at other High Availability Clustering solutions like Heartbeat
etc...? Please help.  Following is my worker.properties .



worker.list=loadbalancer

# --
# Load Balancer worker
# --

worker.loadbalancer.type=lb   # ajp13, aj14,
jni, lb or status (lb = loadbalancer)
worker.loadbalancer.balance_workers=nodeA,nodeB#
worker.loadbalancer.sticky_session=1   #
worker.loadbalancer.prepost_timeout=5 #

# 
# First worker
# 

worker.nodeA.port=38009# connector port
worker.nodeA.host=localhost# ipaddress
worker.nodeA.type=ajp13# connector type
worker.nodeA.cachesize=1
worker.nodeA.retries=3
# below are in seconds worker.nodeA.cache_timeout=60
worker.nodeA.socket_timeout=30
worker.nodeA.recycle_timeout=60
# Advanced ping-pong options
# 0 (full recovery)
worker.nodeA.recovery_options=0
# below are in milliseconds
worker.nodeA.prepost_timeout=5000
worker.nodeA.connect_timeout=5000
# under load it can take awhile to get a reply when doing an initial JSP
compile
worker.nodeA.reply_timeout=6

worker.nodeA.redirect=nodeB


# 
# Second worker
# 

worker.nodeB.port=48009
worker.nodeB.host=localhost
worker.nodeB.type=ajp13
worker.nodeB.cachesize=1
worker.nodeB.retries=3
# below are in seconds worker.nodeB.cache_timeout=60
worker.nodeB.socket_timeout=30
worker.nodeB.recycle_timeout=60
# Advanced ping-pong options
# 0 (full recovery)
worker.nodeB.recovery_options=0
# below are in milliseconds
worker.nodeB.prepost_timeout=5000
worker.nodeB.connect_timeout=5000
# under load it can take awhile to get a reply when doing an initial JSP
compile
worker.nodeB.reply_timeout=6

worker.nodeB.disabled=true


-- tr123
--
View this message in context: 
http://www.nabble.com/robust-Failover%2C-mod_jk-t572871.html#a3539521
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: running two instances of tomcat

2006-03-22 Thread Caldarale, Charles R
 From: Nic Daniau [mailto:[EMAIL PROTECTED] 
 Subject: Re: running two instances of tomcat
 
 That was the case in 4.1 yes, but it doesn't work with 5.5
 on Windows platform, because of the way the service is set
 up from the nsi scrip (that you can read from tomcat source).

The service.bat script that comes with the .zip download allows you to
specify any arbitrary service name - no special procedures required.
You can use it to install any number of Tomcats running as services.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



caldav implementation in webdavServlet

2006-03-22 Thread jirina
Goog day, my name is George and Im student of IT, and I should create calendar 
server application suporting CalDAV protocol (as an extension to WebDAV to 
publish calendaring data). And I would like to ask, about implementation.

I write it in java (servlet application working on tomcat server), but the 
problem is, that I have not found how to extend WebDAV servlet, to support 
CalDAV extension like MKCALENDAR, REPORT or other CalDAV requests? I tryed to 
find it myself, looking to many documentations or Tomcat's FAQ but I have't 
found, how to implement it.

So, If you know, how to work with servlet container or how to expand 
WebdavServlet to make some interface to recognize CalDAV requests or if you 
know about some useful links I would be very grateful to you. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: running two instances of tomcat

2006-03-22 Thread Jim the Standing Bear
Thanks, Chuck.  I will take a closer look at RUNNING.txt.  However, i still
think there is something else causing our problems..  We installed two
copies of the tomcat code, one running at root, and the other running as a
regular user.  Now, even if the ports were conflicting, it would prevent one
instance from being launched, instead of killing another instance, would
it?  At one time when i was playing with it on a testing platform (also
linux), the launching of the 2nd instance of tomcat 5.5 even killed a
running tomcat 4.1.31! It was incredible :P

-- Jim



On 3/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

  From: Jim the Standing Bear [mailto:[EMAIL PROTECTED]
  Subject: Re: running two instances of tomcat
 
  Is there anything special we need to configure to
  allow the co-existence (other than the port numbers)?

 That should be it, just make sure yout get _all_ the ports.  By default,
 there are three for each Tomcat, one more if you enable SSL.  Also, you
 might want to look at RUNNING.txt in the distribution for hints about
 running multiple Tomcats with only one copy of the code installed.

 - 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
--
Standing Bear Has Spoken
--


Tomcat 5.5.16 Virtual Hosting Problem

2006-03-22 Thread Vamsidhar
Hi all:

I have posted for help yesterday, but I think the post was poorly worded. So
I am posting again.

I am using Tomcat 5.5.16 (stand-alone) with JDK 5.0 on Windows XP and trying
to setup virtual hosting (to start with two hosts + localhost). Once I start
the tomcat server, three host folders are being created inside the work
directory.

As expected the localhost host has all the webapps that come with tomcat
5.5.16 installation like examples, etc. The work directory also has two
other host folders test1.mymachine.com and test2.mymachine.com. There is a
single root context for each of these hosts as shown below. The problem is
along with a folder for these root contexts tomcat is also serving up all
folders present in CATALINA_HOME as contexts. This is happening for both
test1.mymachine.com and test2.mymachine.com. Any help is appreciated.

Thanks in advance.

Context path= docBase=c:\websites\test1\webapps\test1
debug=5 reloadable=true crossContext=true

DB resources

/Context

Context path= docBase=c:\websites\test2\webapps\test2
debug=5 reloadable=true crossContext=true

DB resources

/Context

Following is the engine tag of my server.xml file

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

  /Host

  Host name=test1.mymachine.com debug=0
appbase=c:\websites\test1\webapps
unpackWARs=true deployOnStartup=true
Aliastest1.mymachine.com/Alias

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=c:\websites\test1\webapps\logs
prefix=test1_access_log. suffix=.txt
 pattern=common resolveHosts=false/

Logger className=org.apache.catalina.logger.FileLogger
directory=c:\websites\test1\webapps\logs
prefix=test1_catalina_log. suffix=.txt
timestamp=true/

  /Host

  Host name=test2.mymachine.com debug=0
appbase=c:\websites\test2\webapps
unpackWARs=true deployOnStartup=true
Aliastest2.mymachine.com/Alias

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=c:\websites\test2\webapps\logs
prefix=test2_access_log. suffix=.txt
 pattern=common resolveHosts=false/

Logger className=org.apache.catalina.logger.FileLogger
directory=c:\websites\test2\webapps\logs
prefix=test2_catalina_log. suffix=.txt
timestamp=true/

  /Host

/Engine

Vamsi.


Run Tomcat in W2k3 as service

2006-03-22 Thread Ryan Daly
Has anyone successfully set environment variables for the Tomcat process
when it's running as a service?

Is it possible to start the service with the -security option, as in
Linux?

Thanks in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Connector Installation

2006-03-22 Thread Scott Gravenhorst
More stuff.  I found a tutorial (one of the many) and
in that it was said that the prefork .so file is the
one to copy as mod_jk.so to the directory containing
modules.  It also said to set the chmod permissions to
755.  After I added the loadmodule directive to
httpd.conf, I now get an error when starting Apache:

]# /etc/rc.d/init.d/httpd start
Starting httpd: Syntax error on line 191 of
/etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_jk.so into server:
/etc/httpd/modules/mod_jk.so: cannot open shared
object file: No such file or directory

What's odd at first is that the directory it's looking
(/etc/httpd/modules) is not where the file is and if I
spell out the entire path to mod_jk.so, I still get
the same error message except that the path to file is
correct.  However, the file does exist! 

Help?




--- Scott Gravenhorst [EMAIL PROTECTED] wrote:

 Greetings from a new guy...
 
 I have Tomcat 5.5 running under FC3.  I would like
 to
 install and configure the mod_jk connector, but I'm
 finding the documentation somewhat unclear.
 
 I know tomcat is working because I can display the
 samples via port 8080.  The Apache web server is
 also
 installed and it is working on port 80.
 
 In the docs for the connector, it suggests that it
 is
 better to use the precompiled binaries instead of
 compiling them from source.  I have no problem with
 that and I found the binaries for my platform, they
 are:

jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
 and 

jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-worker.so
 
 The docs talk about a mod_jk.so, which is not what
 I
 have (by name).  Perhaps I'm supposed to rename one
 of
 these files to mod_jk.so ?  If so, which one and
 what
 happens to the other one?  The docs don't mention a
 pre-fork module (that I can see).
 
 Thanks for your help, 
 
 -- ScottG
 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Running webapp as root context

2006-03-22 Thread Ryan Di Francesco
Hello -
 
I've just finished my first installation of Tomcat 5.5 along with
Meeting Maker.  Right now the URL to access Meeting Maker is
http://localhost/mmwebclient.  As this is the only application this
server will be running, ideally I'd like to configure it so just
accessing http://localhost will direct one to Meeting Maker, instead of
the default Tomcat webpage.  D:\Tomcat 5.5\webapps\mmwebclient is where
the Meeting Maker application resides.  If anyone can provide me with
details on how to do this or point me in the right direction, it would
be greatly appreciated.
 
Thanks in advance for your time and consideration.
 
Ryan DiFrancesco
Information Systems Specialist
Systems Group - Library ITS
New York University


Re: Desupport for Tomcat 4?

2006-03-22 Thread Mark Thomas
TroyGeek wrote:
 Hello,
 Do you know when the tomcat development group plans on not releasing any new
 patches for Tomcat 4? Does this ever happen? If a bug is found in Tomcat 4
 is it fixed in Tomcat 4 or are we forced to upgrade to Tomcat 5?

I am currently working my way through all reported TC4 bugs (there is
just one left if you ignore the enhancement requests) and back porting
some connector enhancements that should make most of the connector
options in 5.5.x available in 4.1.x. Once this is complete I intend to
do a 4.1.32 release. Unless 4.1.32 has a major problem, it will almost
certainly be security fixes only after that point.

To pre-empt your next question, I am not working to any particular
date for 4.1.32. The job that pays the bills is taking up a lot of
time at present so 4.1.32 will happen when it happens.

Between now and 4.1.32, if a bug is reported against 4.1.x my
intention is that it will get fixed. If a flood of 4.1.x bugs appear
in bugzilla, then all of the above may change.

HTH,

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem configuring webapp with Tomcat 5.0.28 on RHE3

2006-03-22 Thread Rachel McConnell
I've got a web application that runs succesfully on Win/Tomcat 5.0 and 
on RH/resin 2.x.  I am pretty sure my problem is with the container 
configuration.  I need to run several versions of the app and I'd like 
to do this using several different Tomcat instances, with different 
$CATALINA_BASE directories.  (There is an Apache front-end but that 
isn't relevant yet.)


I cannot seem to get the app to start.  I have a directory set up as the 
CATALINA_BASE with the following content (I've left out a couple 
unrelated dirs for simplicity):


base_dir
  apps
myWebAppBaseDir (which contains WEB-INF and so forth)
  conf
Catalina
  localhost
ROOT.xml
context.xml (the default that comes with Tomcat)
server.xml
web.xml (the default that comes with Tomcat)
(other default files: catalina.properties, tomcat-users.xml, etc)
  logs
  temp
  webapps (empty)
  work


I believe the necessary configuration is only in the server.xml and the 
ROOT.xml files, and the rest are OK to use the defaults.  I've pasted 
the server.xml and ROOT.xml files below for reference.  As you'll 
notice, I am attempting to run the app from a directory structure, not 
from a WAR file, and it is intended to run as the root application with 
no context path.


Using the configuration I've currently got (below), I can start Tomcat 
and no errors show up in the logs, although the startup process my app 
normally goes through does not seem to occur (that is, the messages from 
it don't show up).  If I try to hit a page on the server, I get an 
exception (below) that I can't find anywhere on Google nor in this 
list's archives.


I tried configuring the app by placing the content of ROOT.xml into the 
host element of server.xml, as is recommended AGAINST in the Tomcat 
docs.  This produced the same exception.


In all cases I start Tomcat using a script I wrote that sets JAVA_HOME 
and CATALINA_BASE and then calls CATALINA_HOME/bin/catalina.sh (full 
script below).


Any ideas on what to do, or pointers to further research, are much 
appreciated!


Thanks,
Rachel McConnell


Exception stack trace:
-
java.lang.UnsupportedClassVersionError: org/apache/jsp/setup/index_jsp 
(Unsupported major.minor version 49.0)

at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at 
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:156)
at 
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:69)
at 
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:548)
at 
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:136)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
com.enginegreen.denali.interceptor.HibernateFilter.doFilter(HibernateFilter.java:39)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
com.enginegreen.denali.action.DenaliFilter.doFilter(DenaliFilter.java:33)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
com.enginegreen.denali.setup.servlet.SetupFilter.doFilter(SetupFilter.java:58)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 

RE: Run Tomcat in W2k3 as service

2006-03-22 Thread Tim Lucia
You can specify parameters on the various tabs under the servicew app (the
tray monitor).  You probably want Startup in this case, so it would go
alongside the start option.

Tim


-Original Message-
From: Ryan Daly [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 4:26 PM
To: Tomcat Users List
Subject: Run Tomcat in W2k3 as service

Has anyone successfully set environment variables for the Tomcat process
when it's running as a service?

Is it possible to start the service with the -security option, as in
Linux?

Thanks in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: overheads on multiple connectors

2006-03-22 Thread Chris Fong
Thanks for the replies.

 : Where are you getting this 20 connection count from? Those must be
 : currently open connections to clients?

Actually, I am talking about connector (Http Connector) instead of
connection.  

 To the Chris, I personally don't think it is the norm since your
average
 site usually don't get that kind of load. I would start with 2 or 3
and
 scale up as needed.

I have gotten request to separate traffic to multiple ports so that
Network Engineer can manage/debug network traffic easier (by port).  I
totally agree this will make troubleshooting easier, but I am also
afraid there is performance cost in implementing this.

The tomcat instance could get very busy some times with only 1
connector.  (3k+ requests every minute)  Therefore, I am wondering once
I starts having 20 connectors (listening on 20 different ports), will
the performance be affected by a lot.

Thanks,

--Chris



 -Original Message-
 From: Long [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 21, 2006 8:52 PM
 To: Tomcat Users List
 Subject: Re: overheads on multiple connectors
 
 : From: David Rees [EMAIL PROTECTED]
 :
 : On 3/21/06, Chris Fong [EMAIL PROTECTED] wrote:
 :  Let me rephrase original my question.
 : 
 :  Is it an abnormal configuration to have roughly 20 connectors all
 :  listening on different ports for 5.5.15?  Have anyone had similar
 :  configuration for their production environment with heavy traffic?
 :
 : You're going to have to clarify your question. You should only see
 : Tomcat listening on a couple (2-3) of ports at any time depending on
 : your connector setup. One for Tomcat administration (shutdown, by
 : default port 8005), One for HTTP (by default port 8080) and another
 : for AJP (by default port 8009 if configured).
 :
 : Where are you getting this 20 connection count from? Those must be
 : currently open connections to clients?
 
 Well, it is possible to configure multiple AJP connectors, each
listening
 on a different port. It typically is used with JK2 workers and/or a
load
 balancer.
 
 To the Chris, I personally don't think it is the norm since your
average
 site usually don't get that kind of load. I would start with 2 or 3
and
 scale
 up as needed.
 
 Long
 www.edgesoft.ca


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem configuring webapp with Tomcat 5.0.28 on RHE3

2006-03-22 Thread Markus Schönhaber
Rachel McConnell wrote:

 Exception stack trace:
 -
 java.lang.UnsupportedClassVersionError: org/apache/jsp/setup/index_jsp
 (Unsupported major.minor version 49.0)

You're trying to run a Java 1.5 class on a Java =1.4 VM. Either start Tomcat 
with a JVM 1.5 or recompile your WebApp with the target VM's compiler.

Regards
  mks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem configuring webapp with Tomcat 5.0.28 on RHE3

2006-03-22 Thread Rachel McConnell
You know I just worked that out!  Forgot to change the JAVA_HOME 
variable.  *sigh*


Now I have a different problem (app can't find the data source) but I'll 
whang on it a bit before asking here.


Thanks,
Rachel

Markus Schönhaber wrote:

Rachel McConnell wrote:



Exception stack trace:
-
java.lang.UnsupportedClassVersionError: org/apache/jsp/setup/index_jsp
(Unsupported major.minor version 49.0)



You're trying to run a Java 1.5 class on a Java =1.4 VM. Either start Tomcat 
with a JVM 1.5 or recompile your WebApp with the target VM's compiler.


Regards
  mks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



multiple Tomcat realm

2006-03-22 Thread Colin . Lew
Hi all,

We are currently using the JNDIRealm in Tomcat to allow user to connect 
through LDAP. all users with the userBase attribute OU=Internal can log 
in. However, we also have a OU=External, which are unable to get 
authenticated. Is there any way we can have multiple Tomcat realm? or any 
other suggestions?

userBase=OU=Internal,DC=myURL

we also need to have another line like

userBase=OU=External,DC=myURL

We are currently using  tomcat-4.1.31. in our server.xml , below is the 
context in the server.xml file:

Context path=/Web docBase=Web debug=99

Realm name=MyAuth
   className=org.apache.catalina.realm.JNDIRealm
   debug=99
   connectionURL=ldap://myURL:444;
   connectionName=LDAP_RO
   connectionPassword=HelloWorld
   userBase=OU=Internal,DC=myURL
   userSubtree=true
   userSearch=(sAMaccountName={0})
   roleBase=OU=Global 
Groups,OU=Groups,OU=Resources,DC=myURL,
   roleName=CN
   roleSearch=(member={0})
   /

 /Context

Thank you for help.

Cheers,
Colin

This email and any attachments transmitted with it are confidential, intended 
solely for use
by the named addressee and may contain information protected by privilege.  If 
you are not the
intended recipient of this email, please notify the sender immediately (by 
return email to the
sender or by telephone on (613) 1800 02 4778), erase this email and do not 
disseminate,
distribute or reproduce it.
This email has been scanned for the presence of computer viruses by Mimesweeper.



Would like to track googlebots, or spiders from site

2006-03-22 Thread Scott Purcell
Not necessarily a tomcat problem, but I have created a webapp on Tomcat 5.x. I 
would like to be able to track any robot activity in a log file, but not really 
sure where to begin looking for this functionality? If this is possible, is 
there  a debug level that could be used so I could find out what pages it hits, 
etc? Or is this something that needs to be written and tired into the 
container. This is Tomcat standalone, no Apache front end.


If anyone has this knowledge, links, etc. I would certainly appreciate.

Regards
Scott


RE: Would like to track googlebots, or spiders from site

2006-03-22 Thread Tim Lucia
Try here:

http://www.robotstxt.org/wc/robots.html


-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 8:00 PM
To: Tomcat Users List
Subject: Would like to track googlebots, or spiders from site

Not necessarily a tomcat problem, but I have created a webapp on Tomcat 5.x.
I would like to be able to track any robot activity in a log file, but not
really sure where to begin looking for this functionality? If this is
possible, is there  a debug level that could be used so I could find out
what pages it hits, etc? Or is this something that needs to be written and
tired into the container. This is Tomcat standalone, no Apache front end.


If anyone has this knowledge, links, etc. I would certainly appreciate.

Regards
Scott


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk failover loadbalancing doesn't recognize hung tomcat

2006-03-22 Thread Vidya TR

Our application which runs on Apache HTTP Server 2.0.54, TOMCAT 5.0.28 with
mod_jk 1.2.15 connector. In production while our application was running.
Our application had a thread dead Lock hosing up all the users trying to
connect our application. So started investigating the failover setup in
mod_jk. I have two tomcat instances nodeA (active node )  and nodeB
(failover node). When I run my test scenario of a thread dead lock on nodeA
it doesn't seem to be failing over to nodeB. Instead whole site becomes
inaccessible and based on the reply_timeout setting I have I receive a
Service Temporarily Unavailable message. It is very critical for me to
find an answer to this. Is mod_jk the best option? Or should I be
investigating at other High Availability Clustering solutions like Heartbeat
etc...? Please help.  Following is my worker.properties .



worker.list=loadbalancer

# --
# Load Balancer worker
# --

worker.loadbalancer.type=lb   # ajp13, aj14,
jni, lb or status (lb = loadbalancer)
worker.loadbalancer.balance_workers=nodeA,nodeB#
worker.loadbalancer.sticky_session=1   #
worker.loadbalancer.prepost_timeout=5 #

# 
# First worker
# 

worker.nodeA.port=38009# connector port
worker.nodeA.host=localhost# ipaddress
worker.nodeA.type=ajp13# connector type
worker.nodeA.cachesize=1
worker.nodeA.retries=3
# below are in seconds worker.nodeA.cache_timeout=60
worker.nodeA.socket_timeout=30
worker.nodeA.recycle_timeout=60
# Advanced ping-pong options
# 0 (full recovery)
worker.nodeA.recovery_options=0
# below are in milliseconds
worker.nodeA.prepost_timeout=5000
worker.nodeA.connect_timeout=5000
# under load it can take awhile to get a reply when doing an initial JSP
compile
worker.nodeA.reply_timeout=6

worker.nodeA.redirect=nodeB


# 
# Second worker
# 

worker.nodeB.port=48009
worker.nodeB.host=localhost
worker.nodeB.type=ajp13
worker.nodeB.cachesize=1
worker.nodeB.retries=3
# below are in seconds worker.nodeB.cache_timeout=60
worker.nodeB.socket_timeout=30
worker.nodeB.recycle_timeout=60
# Advanced ping-pong options
# 0 (full recovery)
worker.nodeB.recovery_options=0
# below are in milliseconds
worker.nodeB.prepost_timeout=5000
worker.nodeB.connect_timeout=5000
# under load it can take awhile to get a reply when doing an initial JSP
compile
worker.nodeB.reply_timeout=6

worker.nodeB.disabled=true



--
View this message in context: 
http://www.nabble.com/mod_jk-failover-loadbalancing-doesn%27t-recognize-hung-tomcat-t1328176.html#a3545763
Sent from the Tomcat - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: overheads on multiple connectors

2006-03-22 Thread Long
 To the Chris, I personally don't think it is the norm since your
average
 site usually don't get that kind of load. I would start with 2 or 3
and
 scale up as needed.

I have gotten request to separate traffic to multiple ports so that
Network Engineer can manage/debug network traffic easier (by port).  I
totally agree this will make troubleshooting easier, but I am also
afraid there is performance cost in implementing this.

 Chris, I think it is fair to say each connector instance will take up
 a finite amount of computing resources so the more you have
 they will push the server towards its upper limit. Whatever that
 might be depends on CPU speed and RAM.


The tomcat instance could get very busy some times with only 1
connector.  (3k+ requests every minute)  Therefore, I am wondering once
I starts having 20 connectors (listening on 20 different ports), will
the performance be affected by a lot.

 Well 3000 / 60 is 50 requests per second. If you know how long
 it takes to service a request then you are in a better position to
 tackle the performance issue.

 Let's assume, conservatively, your server can do 10 per second.
 Then having the load balancer with 5 workers (linked to 5 connectors)
 should cover your situation. So having 20 might be a bit excessive at
 this point.
 
 Note that workers don't have to link to a local tomcat. If you find
 that your server is maxing out, you can add another server to scale up
 further.

 Long
 www.edgesoft.ca


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running webapp as root context

2006-03-22 Thread Amila Suriarachchi
remane the folder mmwebclient as ROOT


SSL handshake times out on Tomcat 5.5

2006-03-22 Thread Aust, Christian
Hi,

although I've read all the docs and FAQs I could find, I can't get Tomcat 
5.5.15 to do SSL on Windows with SUN JDK 1.5.

I've imported the keys according to the docs, starting with the root CA cert 
and going all the way up until the cert that matches my key request. Then I've 
copied the keystore file keystore into CATALINA_HOME and configured Tomcat 
like such:

!-- Define a SSL HTTP/1.1 Connector on port 443 --
Connector port=443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=99
   scheme=https secure=true clientAuth=false sslProtocol=TLS
   keystoreFile=keystore keystorePass=changeit
/

All environment variables are set, JAVA_HOME plus CATALINA_HOME pointing to the 
right directories. When I start Tomcat, there's nothing special in the logs. 
Pointing a browser to https://localhost/ just times out. Doing the same using 
the OpenSSL tool gives me

$ openssl s_client -connect localhost:443 -showcerts -state
CONNECTED(0003)
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
2644:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake 
failure:s23_lib.c:188:

Interesting point: Pointing the browser to http://localhost:443/ works. Since I 
don't find anything in the logs, I'm lost. Remaining issues are:

1) Should I import the server certificate under the alias tomcat oder the 
name of the host? There's different documentation about this.

2) Can I increase logging somehow, to see what's going on inside the SSL 
factory/connector?

Any help is appreciated...

Kind regards 

Christian Aust
Development mySAP Human Resources

Pecaso Deutschland
Im Breitspiel 5 - 69126 Heidelberg - Germany
Phone: +49 (0) 6221 3106-270 - Fax: +49 (0) 6221 3106-275
Mobil: +49 (0) 151 171 56 191
mailto:[EMAIL PROTECTED] - http://www.pecaso.com/



This email has been scanned for all viruses by the MessageLabs SkyScan
service.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Realm defined within my webapp

2006-03-22 Thread Dustin Sallings


	I have several webapps I am trying to bring over from Resin that  
make use of various types of authentication that needs to live solely  
within my webapp (I may have multiple deployed instances of one with  
different versions, for example).


	I have attempted to add it to META-INF/context.xml in my web  
application, but I get a ClassNotFoundException when the app starts up.


	I would think it'd be common for applications to have code to  
perform their own authentication.  Is this possible?


--
SPY  My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings dustin@spy.net
|Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L___ I hope the answer won't upset her. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running webapp as root context

2006-03-22 Thread Per Johnsson
Hi!
I think the easiest way is to put all the contents in your folder 
mmwebclient in the webapps/ROOT. Not put the whole folder just the 
contents.


/Per Jonsson




Ryan Di Francesco [EMAIL PROTECTED] 
2006-03-22 22:57
Please respond to
Tomcat Users List users@tomcat.apache.org


To
users@tomcat.apache.org
cc

Subject
Running webapp as root context






Hello -
 
I've just finished my first installation of Tomcat 5.5 along with
Meeting Maker.  Right now the URL to access Meeting Maker is
http://localhost/mmwebclient.  As this is the only application this
server will be running, ideally I'd like to configure it so just
accessing http://localhost will direct one to Meeting Maker, instead of
the default Tomcat webpage.  D:\Tomcat 5.5\webapps\mmwebclient is where
the Meeting Maker application resides.  If anyone can provide me with
details on how to do this or point me in the right direction, it would
be greatly appreciated.
 
Thanks in advance for your time and consideration.
 
Ryan DiFrancesco
Information Systems Specialist
Systems Group - Library ITS
New York University




This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information 
it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the 
material from your computer.