Re: Tomcat 4.1.12 hanging under stress?

2002-10-28 Thread Ben Ricker
On Mon, 2002-10-28 at 14:38, William Lee wrote:
 I'm running a Tomcat 4.1.12 (with the coyote connectors running SSL) on 
 RH Linux with a 2.4.9 kernel and IBM JRE 1.3.1 build cxia32131-20020622.

I am wondering about the kernel version here; you have rather old
kernel, a version which is considered unstable. I would suggest
upgrading the kernel, especially since you have SMP.

This is just a small suggestion.anything in the logs?

Ben Ricker
Wellin.com
 
 I initiated around 50 concurrent https connections from JMeter to the 
 test server I have (which is a moderately powerful dual PIII 500 with 
 512 MB RAM and Ultra-SCSI drives) and I realized some random hangings 
 after running for a while.  When the hanging happened, I could still 
 connect to the port that I opened.  However, I couldn't do anything once 
 I connected to the port.  The JVM seemed to be running still, but tomcat 
 wouldn't response.
 
 BTW, I tried connecting to the port using openssl s_client ... and I 
 was able to connect to the port when it hung, but I can't issue any HTTP 
 commands.
 
 I can, however, shutdown the server from the control port with no problem.
 
 Can somebody tell me how to address / debug this problem?
 
 -- 
 William Lee (Will)| Sendmail Inc.
 Email:  [EMAIL PROTECTED] | http://www.sendmail.com
 Tel:(510) 594-5505|
 
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Tomcat 4.1.12 hanging under stress?

2002-10-29 Thread Ben Ricker
On Mon, 2002-10-28 at 20:24, William Lee wrote:
 
 Hmm, it may have something to do with the kernel, I'll try later to see 
 whether this is the case.  I don't think the log gives me much though. 
 Anyhow, I've made a weird discovery that I found interesting.

After the other info you gave me, I am less concerned with the kernel
now. I would still upgrade it, though. There is a nasty networking bug
in the 2,4,9 kernel, I believe, that effects scalability.

 It seems like there's a barrier when the JVM consume around 90MB of 
 RAM.  Once the JVM got over that barrier, then things will keep working.

You may be dealing with garbage collection issues. If the GC gets going
before that, it will lock everything up while it GCs.

Try messing with the following options:

-Xms and  -Xmx using CATALINA_OPTS set in the startup script. For
example: 

CATALINA_OPTS=-Xms128M -Xmx2048M

would set the heap size minimum to 128meg and would force garbage
collection at 2048meg. Play with that and see how it affects the
slowdown.

You can alos set two other options to help out debugging:

-Xincgc and -Xloggc:gcinfo.log

I forgot what the first setting does (ingrease GC?) but the second one
turns on logging when it garbage collects. If you watch that file as the
failure happens, you can tell if garbage collecting is having an effect
or not.

HTH,

Ben Ricker
Wellinx, Inc.




--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: MOD_JK.SO

2002-10-29 Thread Ben Ricker
I got this on Apache 1.3.27. I assume you downloaded the binary
mod_jk.so. Make sure that you got that fits your use or non-use of SSL
in the server. Not sure where you got the binary, but there is a note on
the jakarta connector download page that lists which binary is for
which.

I myself just compiled the connector from source; I could not get the
binary connector to work with Apache without getting that error.

Ben Ricker
Wellinx.com

On Tue, 2002-10-29 at 12:02, [EMAIL PROTECTED] wrote:
 
 Hi,
 
 We are trying to get Tomcat 4.1.12 and Apache 1 3 26 working together using
 mod_jk.so.
 
 We are receiving the followitng error :
 
 Starting httpd: Syntax error on line 224 of /etc/httpd/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_jk.so into server:
 /usr/local/apache/libexec/mod_jk.so:
  undefined symbol: ap_ctx_get
 
 Never done this before, and im probably just plain wrong !
 
 Any replys would be apperciated,
 
 Cheers,
 
 M
 
 Mehdi Nejad - Senior Developer
 [EMAIL PROTECTED]
 ~~
 Bluewave Ltd - Online Creations
 http://www.bluewave.com
 Tel. +44 (0)20 7479 8394
 ~~
 
 
  
   
   Jordi Guijarro   
   
   jordi.guijarro@uTo:   
[EMAIL PROTECTED]   
   ab.es   cc:   
   
Subject:  Run Tomcat 4.1.2 on Novell  
   
   29/10/2002 17:38   
   
   Please respond to  
   
   Tomcat Users  
   
   List  
   
  
   
  
   
 
 
 
 
 Hi,
 
 How can I run Tomcat 4.1.2 on Novell Netware 5.1 ¿?  Nowadays I've a
 script (ncf file)  to start catalina in Tomcat 4.0.4 version. This
 script is not included in Tomcat 4.1.2. Someone knows about it ?
 
 Thank you,
 
 Jordi
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: MOD_JK.SO

2002-10-29 Thread Ben Ricker
On Tue, 2002-10-29 at 12:22, [EMAIL PROTECTED] wrote:
 
 
 according to this :
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html
 
 i should need mod_jk2 and not mod_jk (well, mod_jk may also work, but
 hey,..) - and its enabled by default on the appserver im using..

I use the mod_jk version for stability reasons: mod_jk2 is rather new,
so I would rather use the mostly tried-and-true mod_jk 1.x. That is my
personal opinion, though. Others use mod_jk2 without any problems.
 
 If by any chance i am right, can someone tell me why I cant find a humble
 link to download the file ?  maybe jakarta are having webserver problems.

Try http://jakarta.apache.org/builds/jakarta-tomcat-connectors/ for
connetor downloads, or go to John Turner's wonderful page:
http://www.johnturner.com/howto/apache-tomcat-howto.html.

Ben Ricker
Wellinx.com


 
 I quote from the site :
 
 
 
 (Do not hesitate to ask for the binary needed for your platform to  
 the Tomcat mail lists, but be patient). 
 
 
 
 
 so here goes : im using linux - can i have this file - please..
 
 thanks 4 reading this far.
 
 Mehdi
 
 
 
 
 
 
 
  
   
   Mehdi.Nejad@bluew  
   
   ave.com  To:   Tomcat Users List 
[EMAIL PROTECTED]   
cc:   
   
   29/10/2002 18:02 Subject:  MOD_JK.SO   
   
   Please respond to  
   
   Tomcat Users  
   
   List  
   
  
   
  
   
 
 
 
 
 
 Hi,
 
 We are trying to get Tomcat 4.1.12 and Apache 1 3 26 working together using
 mod_jk.so.
 
 We are receiving the followitng error :
 
 Starting httpd: Syntax error on line 224 of /etc/httpd/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_jk.so into server:
 /usr/local/apache/libexec/mod_jk.so:
  undefined symbol: ap_ctx_get
 
 Never done this before, and im probably just plain wrong !
 
 Any replys would be apperciated,
 
 Cheers,
 
 M
 
 Mehdi Nejad - Senior Developer
 [EMAIL PROTECTED]
 ~~
 Bluewave Ltd - Online Creations
 http://www.bluewave.com
 Tel. +44 (0)20 7479 8394
 ~~
 
 
 
   Jordi Guijarro
 
   jordi.guijarro@uTo:
 [EMAIL PROTECTED]
   ab.es   cc:
 
Subject:  Run Tomcat 4.1.2
 on Novell
   29/10/2002 17:38
 
   Please respond to
 
   Tomcat Users
 
   List
 
 
 
 
 
 
 
 Hi,
 
 How can I run Tomcat 4.1.2 on Novell Netware 5.1 ¿?  Nowadays I've a
 script (ncf file)  to start catalina in Tomcat 4.0.4 version. This
 script is not included in Tomcat 4.1.2. Someone knows about it ?
 
 Thank you,
 
 Jordi
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
 mailto:tomcat-user-help;jakarta.apache.org
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Custom Error Page Issue

2002-10-30 Thread Ben Ricker
On Wed, 2002-10-30 at 12:57, Jaimes Blunt wrote:
 Hey Guys,
  
 I am trying to create a custom error page for my webapps, and I am encountering the 
following message when I try to force an error.
 Error page location myerror.jsp must start with a /

Just as it says: you must begin the locations with a '/'.

Ben Ricker
Wellinx.com

 My webapp file has the following included:
  error-page
error-code404/error-code
locationmyerror.jsp/location
  /error-page
  error-page
error-code400/error-code
locationmyerror.jsp/location
  /error-page
  error-page
error-code200/error-code
locationmyerror.jsp/location
  /error-page
 
 Any ideas?
 
 Jaimes Blunt 
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Will Upgrade from one cpu to Dual CPU benefit tomcat 3.2.4 ?

2002-11-01 Thread Ben Ricker
I find that with databases in general, and MySQl in particular, that you
CPU is bound up in a io wait state, that is, waiting for disk reads
and/or writes. You may be disk bound. In that case, adding another CPU
will only give you nominal improvement.

You would need to check to see if I/O is the issue by checking the I/O
wait states and see if the kernel is just blocking the CPU waiting for
disk read/writes. If so, are you using SCSI? IDE? Got RAID? Striping
will improve the situation, as well as turning off mirroring disks, if
you have that setup.

Ben Ricker
Wellinx.com

On Fri, 2002-11-01 at 14:50, Brandon Cruz wrote:
 
 I have an overloaded linux server running ApacheTomcat 3.2.4MySQL.  It has
 512MB Ram, which seems to be doing fine, but the 1Ghz CPU being used by
 Tomcat is constantly 35-60%.  Before I spend the money, does tomcat take
 advantage of multiple processors, and will it help me to upgrade to a Dual
 1Ghz CPU machine?
 
 Brandon
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: Access log - single file, or multi day files

2002-11-07 Thread Ben Ricker
How about running a merge? Someone on the Apache list mentioned that 
Multisort http://www.xach.com/multisort/  it's a nice tool for merging
logs.Would help in archiving also: merge, then compress, then backup.

Ben Ricker
Wellinx.com

On Thu, 2002-11-07 at 07:13, neal wrote:
 My ISP admin is setting up an app to consume and interperet my log files.
 He asked if I can have Tomcat spit out a single log file rather than
 breaking it up day by day but I am hesistent.  To me it seems like a bad
 idea. First, I guess depending upon how Tomcat appends the file, couldn't it
 start to slow down as the file exponentially grows? Second, if there's any
 bad data it could throw of the whole log history, not just a single day.
 Third, if the file was to be damaged same thing. Fourth, it seems pruning
 the old data wouldn't be as easy.
 
 But he seems to feel this would make setting up that app a lot easier.  I
 don't know.  Does anyone have any opinion in this regard?
 
 Also, how do you have it write to a single file?  Is there some timestamp
 attribute I can set?  I didn't see one?
 
 Thanks.
 Neal
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Error in mod_jk.log

2002-11-11 Thread Ben Ricker
I see the following error logged into the mod_jk log intermittently. I
do not get any calls or anything like that, but I am wonderign what the
error is saying? Anyone have any idea Here is the error:

[jk_ajp_common.c (961)]: Error ajp_process_callback - write failed


Thanks,

Ben Ricker
Wellinx.com



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




mod_jk error and Header dumping

2002-11-20 Thread Ben Ricker
I am running using Apache 1.2.6 talking to two Tomcat 4.0.5 (I think
that is the version number; how do you verify it? The Tomcat default
page comes up with just '4.0') listening on two separate ports. 

I am seeing a strange problem. We have a customized web application
which we run through Tomcat. In one particular module, we have an issue:
on several pages sent from Apache, there is HTTP protocol header
information displayed at the top of the page. Here is some text from it:

HTTP/1.1 200 OK Date: Yue, 19 Nov 2002 22:31:05 GMT Server:
Apache/1.3.26 (Unix) mod_jk/1.2 Keep-Alive:...

At roughly the same time we get that text on the client's screen, we see
the following logged to mod_jk.log:

[Wed Nov 20 09:06:38 2002]  [jk_ajp_common.c (679)]: ajp_connection_tcp_get_message: 
Error - jk_tcp_socket_recvfull failed
[Wed Nov 20 09:06:38 2002]  [jk_ajp_common.c (1041)]: Error reading reply
[Wed Nov 20 09:06:38 2002]  [jk_ajp_common.c (1178)]: In jk_endpoint_t::service, 
ajp_get_reply failed in send loop 0

I cannot verify that the error thrown in mod_jk is exactly correlated
with the dumping of the strange text on the screen, but it does look
like it happens at the roughly the same time (within 3 minutes or so).

Any guidance would be appreciated.

Ben Ricker
Wellinx.com


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




Re: Tomcat Newsgroup?

2002-11-20 Thread Ben Ricker
No need for a newsgroup. Just go to:

http://mikal.org/interests/java/tomcat/index.js

for complete, searchable archives of Tomcat (and a mighty fast one too).

Ben Ricker
Wellinx.com

On Wed, 2002-11-20 at 14:41, Daniel Hellstrand wrote:
 A newsgroup would be great.. I´m surprised there isn´t one already...
 
 /Dan
 
 David White wrote:
 
  Just curious, since this mailing list gets so much traffic, is there any
  desire to create a newsgroup instead?  It would be great to be able to
  search old posts using a newsreader or google groups.
 
  cheers,
  David White
 
  -Original Message-
  From: David Wall [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, November 20, 2002 10:25 AM
  To: Tomcat Users List
  Subject: Tomcat List Duplicates?
 
  Is anybody else getting duplicate emails from the Tomcat list?  I not only
  seem to get duplicates, but I even get messages that I'm sure I saw
  yesterday arrive again today (such as my own postings).
 
  David
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 



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




jk1.2 load-balancing help needed

2002-11-21 Thread Ben Ricker
I am running a web application that has 2 Apache instances listening on
4 total interfaces (to account for NIC failure) using mod_jk to
load-balance across 4 tomcat instances.I have two boxes with two tomcats
on each box listening on seprate interfaces (again, for Nic failure).

Apache is version 1.3.27 with mod_jk 1.2. Tomcat is version 4.0.6.

Picture it like this:

Apache 1Apache 2
--  --
+ Apache +  + Apache +
+ mod_jk +  + mod_jk +
--  --

Java Server 1   Java Server 2
--  --
+ Tomcat 1   +  + Tomcat 3   +
+ Tomcat 2   +  + Tomcat 4   +
--  --

We ran into a production issue due to a hung query that was run a number
of times. It caused a number of users to get hung requests. They were
able to fix the problem by restarting their browser.

What normally happens is that our load is such that Tomcat1 gets almost
all the requests. When Tomcat1 gets too busy (all the ajp13 processors
are full and a new session is requested, the request gets routed to
Tomcat2, and so on for Tomcat 2, 3, and 4. Because our load is low right
now, we never get requests to Tomcats 3 and 4.

However, once a hung query started eating up database (and therfore,
AJP13 connections which were waiting for the DB to return) the new
connections got routed to the other Tomcats. Tomcat failed over,
basically.

This leads me to my request: I would like to do true round-robin
load-balancing on all four tomcats to minimize the impact of problems
like we just saw. Since all connections are normally handled by Tomcats
1 and 2, a problem that occurs in Tomcats 1 and 2 has an effect on amost
all the users. However, if the users were round-robin load-balanced and
Tomcat 1 hit the bad query enough to hose all its connections it had,
only those in Tomcat1 would be affected; the ones in Tomcats 2,3, and 4
would be unaffected.

How can one change the weights to get new request, round-robin
load-balancing from mod_jk?

Does this make sense to anyone? I checked the connectors documentation,
but nothing explains why Tomcat1 gets all the new connections. It
appears to me that round-robin is not working?

Here is my workers.properties file. it is identical on both Apache
servers:

--Begin workers.properties
#
# workers.properties
#

# In Unix, we use forward slashes:
ps=/

# list the workers by name

worker.list=tomcat1,tomcat2,tomcat3,tomcat4,loadbalancer

# 
# First tomcat server
# 
worker.tomcat1.port=11009
worker.tomcat1.host=10.1.2.45
worker.tomcat1.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat1.lbfactor=100


# 
# Second tomcat server
# 
worker.tomcat2.port=12009
worker.tomcat2.host=10.1.2.145
worker.tomcat2.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100

# 
# Third tomcat server
# 
worker.tomcat3.port=11009
worker.tomcat3.host=10.1.2.12
worker.tomcat3.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100

# 
# Fourth tomcat server
# 
worker.tomcat4.port=12009
worker.tomcat4.host=10.1.2.112
worker.tomcat4.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100
# 
# Load Balancer worker
# 
#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#   If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1,tomcat2,tomcat3,tomcat4

#
# END workers.properties
#








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

Re: urgent - servlet not found.

2002-11-21 Thread Ben Ricker
On Thu, 2002-11-21 at 13:50, Triptpal Singh Lamba wrote:
 This has taken too long so someone pls see if you can help me.
 
 My form in index.jsp says
 
 form method=post name=indexForm action=servlet/com.osp.servlet.Router 
 
 If index.jsp can find the servlet ,my job is done.
 
 My web.xml has defined this in WEB-INF
 
 webapps/osp  // context  = osp
 
 in osp I have a WEB-INF which has web.xml with only this entry
 
 servlet
   servlet-nameRouter/servlet-name
   servlet-classcom.osp.servlet.Router/servlet-class
 load-on-startup1/load-on-startup
 /servlet
 
 index.jsp is coming up , server.xml has the context entry.
 What should the action be changed to ??

Looks like the idex.jsp should be changed to:

form method=post name=indexForm action=servlet/Router 
 
You might also need to add a '/' in front of 'servlet', depending on how
you set up your server.xml.

The 'servlet-name' directive tells Tomcat what alias to give to the
'servlet-class'. You could do the full path, but looks better to the
client to use the alias.

Ben Ricker
Wellinx.com


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




Error message meaning?

2002-11-22 Thread Ben Ricker
I am using mod_jk 1.2 with Apache 1.2.27 talking with 4 Tomcat 4.0.6
instances.

Every once in while, I get tthe following error logged to mod_jk:

[jk_ajp_common.c (961)]: Error ajp_process_callback - write failed

What exactly does this mean? Is it that mod_jk had an error writing to
the stream to Tomcat? If so, does it retry the request it sent? How does
one know it was successful? Also, this occurs fairly rarely and
intermittently. Out of 26,000 requests, I see it 70 times on one day.

Thanks,

Ben Ricker
Wellinx.com




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




Sun JDK 1.4 production quality?

2002-11-22 Thread Ben Ricker
I have heard a number of differing opinions about the stability of 1.4.x
version of Sun's JDK. I wanted to see if anyone runs Tomcat using 1.4.x
and how they have found its stability, speed, etc. 

I know there have been a number of enhancements in 1.4 which sound
intriguing; additionally, its jdbc driver fixes a bug that is curretnly
vexing us. Our Tomcat installation gets roughly 25,000 hits a day; if
you can include an approximate idea of how many hits your app takes,
this information would be helpful.

I would, of course, test this with load testing, but the management here
seems to think we do not need it*sigh*

Thanks,

Ben Ricker




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




Meaning of mod_jk.log times

2002-11-22 Thread Ben Ricker
I see a lot of msgs logged to mod_jk.log on the Apache servers we have
setup using mod_jk 1.2 (with Apache 1.3.27). It is talking to 4 Tomcat
instances running Tomcat 4.0.6.

I am wondering what exactly the time stamped at the end of the line says
exactly:

[Fri Nov 22 14:42:36 2002] loadbalancer web2.wellinx.com 0.018557

Namely, the 0.18557.I am assuming it is the amount of time it takes
the transaction from when mod_jk makes the request to Tomcat to when it
gets that info back.

Also, notice the web2.wellinx.com; that is the ServerName from the
Apache server. Is there a way to actually log the Tomcat instance the
request is going to? I know what Apache server I am looking at when I am
reading the lod, so the information there seems rather trivial.

Thanks,

Ben Ricker
Wellinx.com




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




Does web.xml inherit?

2002-11-25 Thread Ben Ricker
I am running Tomcat 4.0.6 on Solaris. We are getting complaints of
session timeouts from users. Looking around I found the Default Session
Configuration section of the web.xml in the /conf directory. The app is
in its own context defined by its own web.xml.

So my question is: does the web.xml inherit the values from the web.xml
in the /conf directory (let us call it the main web.xml)? Or are the
default values listed in the main web.xml the default values for ALL
other contexts if they are not explicitely changed in the other
contexts?

Thanks,

Ben Ricker
Wellinx.com




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




RE: Does web.xml inherit?

2002-11-26 Thread Ben Ricker
On Tue, 2002-11-26 at 04:19, Roberts, Eric wrote:
 As far as I know the sequence is:
 
 Default Context
 App Context
 /conf/web.xml
 /WEB-INF/web.xml
 
 So your /WEB-INF/web.xml has the final say, provided that overrides to the previous 
settings have been allowed.

Actually, we found that this is not correct. The Default Session
Configuration section is only definable in the /conf/web.xml. We tried
putting it into the /WEB_INF/web.xml and it did nothing to change the
session timeout.

I did not try removing the session timeout parameter, however. Anyway,
at least for the session parameters, the /conf/web.xml has the final
say.

Thanks for the help,

Ben Ricker
Wellinx.com

 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Montag, 25. November 2002 23:24
 To: Tomcat Users List
 Subject: Does web.xml inherit?
 
 
 I am running Tomcat 4.0.6 on Solaris. We are getting complaints of
 session timeouts from users. Looking around I found the Default Session
 Configuration section of the web.xml in the /conf directory. The app is
 in its own context defined by its own web.xml.
 
 So my question is: does the web.xml inherit the values from the web.xml
 in the /conf directory (let us call it the main web.xml)? Or are the
 default values listed in the main web.xml the default values for ALL
 other contexts if they are not explicitely changed in the other
 contexts?
 
 Thanks,
 
 Ben Ricker
 Wellinx.com
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
 



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




RE: Does web.xml inherit?

2002-11-26 Thread Ben Ricker
On Tue, 2002-11-26 at 09:01, [EMAIL PROTECTED] wrote:
 hey i am facing they same problem
 sometime we are facing session  time outs
 in spite of me setting  session to never expire on first jsp page
  session.setMaxInactiveInterval (-1);
 DO U THINK I SHOULD CHANGE THIS Conf/web.xml

Possibly. Timeouts can be a tricky business because of all the issues
involved. In conf/web.xml there is a session properties where the
default session timeout is 30 minutes. If that is not long enouhg, you
can change it there. It does work; we tested it thoroughly (setting it
to one minute, 30 minutes, and 60 minutes. It worked).

Ben Ricker
Wellinx.com
 
 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 26, 2002 9:49 AM
 To: Tomcat Users List
 Subject: RE: Does web.xml inherit?
 
 
 On Tue, 2002-11-26 at 04:19, Roberts, Eric wrote:
  As far as I know the sequence is:
  
  Default Context
  App Context
  /conf/web.xml
  /WEB-INF/web.xml
  
  So your /WEB-INF/web.xml has the final say, provided that overrides to the
 previous settings have been allowed.
 
 Actually, we found that this is not correct. The Default Session
 Configuration section is only definable in the /conf/web.xml. We tried
 putting it into the /WEB_INF/web.xml and it did nothing to change the
 session timeout.
 
 I did not try removing the session timeout parameter, however. Anyway,
 at least for the session parameters, the /conf/web.xml has the final
 say.
 
 Thanks for the help,
 
 Ben Ricker
 Wellinx.com
 
  
  -Original Message-
  From: Ben Ricker [mailto:[EMAIL PROTECTED]]
  Sent: Montag, 25. November 2002 23:24
  To: Tomcat Users List
  Subject: Does web.xml inherit?
  
  
  I am running Tomcat 4.0.6 on Solaris. We are getting complaints of
  session timeouts from users. Looking around I found the Default Session
  Configuration section of the web.xml in the /conf directory. The app is
  in its own context defined by its own web.xml.
  
  So my question is: does the web.xml inherit the values from the web.xml
  in the /conf directory (let us call it the main web.xml)? Or are the
  default values listed in the main web.xml the default values for ALL
  other contexts if they are not explicitely changed in the other
  contexts?
  
  Thanks,
  
  Ben Ricker
  Wellinx.com
  
  
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  
  
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 



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




RE: Thread dump

2002-12-06 Thread Ben Ricker
I am intrigued by this feature; it would help with the debugging of a
application. I tried to test it against tomcat but I get nothing on
stderr (i.e., nothing in /var/log/messages, terminal, directory I am in,
catalina.out, or any of the logs for Tomcat).

Could you expand on what behavior you see when you send the -3 to
Tomcat's PID?

Thanks,

Ben Ricker
Wellinx.com

On Fri, 2002-12-06 at 12:29, Schnitzer, Jeff wrote:
 FYI, no it doesn't, it just causes the (Sun, at least) JVM to dump a
 list of threads and their stacks to stderr.  Note that it's the real
 stderr, not System.err.  This is a JVM feature.  It can be done anytime
 and is a *really* useful debugging feature.
 
 Jeff
 
  -Original Message-
  From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 06, 2002 8:01 AM
  To: Tomcat Users List
  Subject: RE: Thread dump
  
  Beg your pardon? would that not actually kill the process, rather than
  displaying the thread dump?
  
  And what if one wants to see the thread dump right from the moment
 tomcat
  starts up?
  
  Thanks,
  manav.
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 06, 2002 9:18 PM
  To: Tomcat Users List
  Subject: Re: Thread dump
  
  
  
  kill -3 pid
  
  RS
  
  
  
Manavendra
Gupta   To:   Tomcat Users
  List
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
 cc:
12/06/02 09:53 AMSubject:  Thread dump
Please respond to
Tomcat Users
List
  
  
  
  
  
  
  I have tomcat 4.1 running on Linux. How do i see the thread dump? The
  startup.sh on linux just starts it in the background, while i could
 use
  startup.bat on windows and get the thread dump.
  
  thanks,
  manav.
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
  
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Tomcat 4.1.3 beta - Admin Interface

2002-07-01 Thread Ben Ricker

Is there any documentation on the Admin interface? I ran into any number
of error messages...am I to assume that it more beta then everything
else?

Thanks,

Ben Ricker
Web Security System Administrator
Wellinx.com


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




Problem with Tomcat 4

2002-05-14 Thread Ben Ricker

I have a installation of Apache/Tomcat which is working...sort of.

I have everything configured according to the snippets I will post
below. Here is the strangeness: I initially configured Tomcat as
standalone and was able to pull up the servlet app perfectly well.
Everything performed as expected. Now when I call the URL mapped to
Tomcat, I get a blank, well-formed HTML page! That is
'HTMLBODY/BODY/HTML'.

My pertinent configs are below. I setup the workers.properties as
loadbalanced because I could only find a complete config in this form.

--First, My httpd.conf stuff--

# Mod_jk configuration
LoadModulejk_module  libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /usr/local/apache/conf/workers.properties
JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogLevelinfo
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /servlets/* loadbalancer
JkMount /*.jsp loadbalancer

--Next,my workers.properties--

# Using Single Tomcat Instance using AJPV13
#
#workers.tomcat_home=/usr/local/tomcat
#workers.java_home=/usr/local/jdk
ps=/
worker.list=tomcat1, loadbalancer

# Definition for Ajp13 worker (Ajp12 left to readers imagination)
#
worker.tomcat1.port=8009
worker.tomcat1.host=remotehost.wellinx.com
worker.tomcat1.type=ajp13

# Specifies the load balance factor when used with a load balanced
# worker
#
# Note:
# - lbfactor must be  0
# - The lower the lbfactor the less work done by worker
worker.tomcat1.lbfactor=100

# 
# Load Balancer worker
# 

#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#   If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1

#
# END workers.properties
#

--Finally, my server.xml stuff--

!-- Define an AJP 1.3 Connector on port 8009 --

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=10 maxProcessors=75
   acceptCount=10 debug=0/

Context path=/servlets
 docBase=/usr/local/tomcat/webapps/servlets
 debug=0
 reloadable=false
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=wellinx- suffix = .log
   timestamp=true/

 /Context


Any ideas why I get a blank page? The logs show that the connection is
being made from the apache server to the java server through port 8009.
Debugging showed that the request was received and finished by Tomcat,
but the response was the blank page.

Thanks!

Ben Ricker
Web Security System Administrator
Wellinx.com



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




Re: Installation on Linux

2002-06-05 Thread Ben Ricker

You need mod_jk or mod_webapp in order to hava Apache forward servlet
requests to Tomcat.

The major difference between mod_jk and mod_webapp is that mod_jk allows
for load balancing over multiple Tomcat instances while mod_webapp does
not. I hava also heard that mod_webapp should have that capability
(soon?) but does not have it now.

I have heard of people using Apache 2.x with Tomcat, but I have not done
that myself.

Ben Ricker
Web Security System Administrator
Wellinx.com


On Wed, 2002-06-05 at 08:53, Iain Downie wrote:
 Want to upgrade from Tomcat 3.3 to 4.0 (been told it is easier to administer
 etc. etc. and has the manager web application) on a Linux (redhat7.2)
 server, working as a add-on to Apache. Bit confused by the download.
 
 I will be getting 'jakarta-tomcat-4.0.3.tar.gz' at
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/. No
 problems there.
 
 However, do I need any additional Linux extensions? When I click into
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/linux
 /i386, I see a warning file saying Only for Apache 1.3.
 
 Can someone confirm that this is indeed the case, or should I also get the
 mod_jk-01.so module too? Do I need the mod_webapp.so?
 
 Regards, any help much appreciated
 Iain
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: Other question

2002-06-14 Thread Ben Ricker

On Solaris, you can use 'pgrep' which will return the PID based upon a
grep. Do a man on it; it has saved my bacon when writing process
monitors.

Ben Ricker
Web Security System Administrator
Wellinx.com


On Fri, 2002-06-14 at 11:05, Laura wrote:
 On linux,
 
 ps -ef | grep java | grep myapp | awk '{print $1}'
 
 I'm trying it.
 
 Laura
 
 
 Alle 17:59, venerdì 14 giugno 2002, hai scritto:
  Hi,
  Yepp, you're right ;)  Forgot that part.  For us on Solaris 2.8 it's
  ps -ef | grep java | grep myapp | awk '{print $2}'
 
  Yoav Shapira
  Millennium ChemInformatics
 
  -Original Message-
 
  From: Turner, John [mailto:[EMAIL PROTECTED]]
 
  Sent: Friday, June 14, 2002 11:41 AM
  To: 'Tomcat Users List'
  Subject: RE: Other question
  
  
  Just for clarification, doing  tomcat.pid wouldn't really work, because
  all you would get is the ps entry for that value.  You'd have to use cut
   or awk and grab the actual PID from the PID column in the listing that
   resulted
  from ps -ef | grep java | grep myapp  and redirect it to tomcat.pid.
  
  John Turner
  [EMAIL PROTECTED]
  http://www.aas.com
  
  -Original Message-
 
  From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
 
  Sent: Friday, June 14, 2002 10:45 AM
  To: Tomcat Users List
  Subject: RE: Other question
  
  
  Howdy,
  A relatively unix-flavor-independent way to do it is to give your process
  an
  identifier via the first argument, i.e. the first thing in CATALINA_OPTS,
  for example -Da=myapp.
  
  You would then do ps -ef | grep java | grep myapp  tomcat.pid.
  
  Yoav Shapira
  Millennium ChemInformatics
  
  -Original Message-
  From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 14, 2002 10:41 AM
  To: Tomcat Users List
  Subject: AW: Other question
  
  What operating system do you have ?
  
   -Ursprüngliche Nachricht-
   Von: Laura [mailto:[EMAIL PROTECTED]]
   Gesendet: Freitag, 14. Juni 2002 13:59
   An: Tomcat Users List
   Betreff: Re: Other question
  
  
   But it doesn't seem to be correct. It writes in tomcat.pid a
   PID that doesn't  seem to be correct: I have tried to do:
  
   kill -9 PID (which is in the tomcat.pid)
  
   and the system tells me:
  
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: tomcat.log

2001-05-02 Thread Ben Ricker

You want to turn down the logging level in the server.xml file; if it is 
info, change it to 'warn'. Also, you could use logrotate running at a 
certain time frame to watch the log for a specific size and then roll 
it. I am not sure what issues this raises with Tomcat alone. With 
apache, you have to HUP it (on Unix).

Ben Ricker
System Administrator
Wellinx.com

Georges Boutros wrote:

 hi,
 
 i'm testing the durability of tomcat under a heavy attack of users ,
 
 i got a problem with the tomcat.log and jasper.log , those 2 files got so
 big they took all the available space on my harddisk
 
 which have failed my test.
 
 
 does anyone know how to manage the log files not to get so big.
 
 thanks
 
 Georges
 
 




Re: Developing on a different platform from production

2001-05-09 Thread Ben Ricker

It depends on what you mean by 'test'. If you are doing load testing, 
then obviously this will not do as the platform and OS can dictate 
performance. Also, there are differing problems in the jdks based on 
platform: Sun jdk w/Hotspot has had some problems lately which do not 
crop up on the other jdks (Sun's jdk is usually ahead of Linux's, or so 
I have noticed. 1.3 was in beta well after 1.3 was released for Sun).

However, if you are just talking about functional testing, I think going 
to a Linux box is Ok.

Btw, have you seen the new Netra series of Sun boxes? They are damn 
cheap and may be an alternative to Linux. I myself suport a web app that 
runs on Linux is production but will move to a Linux/Sun load balanced 
solution soon.

Ben Ricker
System Administrator
Wellinx.com

Penberthy, Bill wrote:

 Generally, we try to to develop and test on the same platforms (Solaris)
 that we will be deploying on - but I am curious as to whether that is really
 necessary.  Has anyone ran into issues of developing and testing on one
 platform and deploying on another?  I would like to put some Linux machines
 out there (a bit cheaper...) for development and testing - but am wondering
 if this could cause problems as we deploy onto the Sunboxes.  Your thoughts,
 experiences, and comments would be welcome.
 
 Thanks!
 
 Bill Penberthy
 Sr. Functional Architect
 IQNavigator




Re: How to setProperty with checkbox group

2001-02-01 Thread Ben Ricker

Hey! Are you seeing other admins behind my back!!

Heh...actually, a small clarification: I am using 1.3 for Tomcat. I 
thought we might as well upgrade to the latest and the greatest for the 
Tomcat install.

Ben

Carl Bacher wrote:

 Actually, on NT I'm using jdk1.3 and on Linux I'm using 1.2.2. Maybe that's the 
difference.
 
 I did manage to get it to work by using the Request object and setting it explicitly
 %
String[] selectedItems = request.getParameterValues("selectedItems");
myBean.setSelectedItems(selectedItems);
 %
 
 Thanks, Carl
 
 Stefan Langer wrote:
 
 I really have no idea why it doesn't work in Linux. Btw which SDK are you using on 
NT and which on Linux??
 BUt here a suggestion:
 Try putting the setProperty tag inside the useBean tag.
 Something like this
 
 jsp:useBean ...
 jsp:setProperty .../
 jsp:useBean/
 
 Might work.
 
 hope that helps
 
 Stefan
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 


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




Re: Why use apache

2001-02-01 Thread Ben Ricker

As the "minimalist" manual says, Apache should be used when serving a 
heavy load of static content as well as the dynamic java content. Apache 
is MUCH more extensible, scalable, and robust of a http daemon then 
Tomcat's built-in http server.

Ben Ricker
Senior Web Administrator
US-Rx, Inc.

Cybercity_Egen wrote:

 Hi, I am new at tomcat.
 
 Why use Apache with tomcat, is it not enough just to use Tomcat. It
 works for me, but will it be a problem if i get high traffic on my
 server, or is there any other disadvanteges?
 
 Thanks
 Jimmy
mailto:[EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 


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




Re: Why use apache

2001-02-01 Thread Ben Ricker

You would probably want to switch to a Perl script using the Net::http 
module which includes a 'get' command which will rquest a URL and then 
parse the response code to trigger the restart script.

Ben Ricker
Senior Web Administrator
US-Rx, Inc.

Randy Layman wrote:

   The only real way that I could think to do this (would looking into
 the AJP12 and AJP13 specs) is to do a program/script thing that would:
   while (true) {
   request http://localhost:8080
   if request not valid
   tomcat start
   }
 
   It doesn't seem like it would be all that difficult.  Doing it in a
 shell script might be a little tricky.  (Can you make lynx get only one page
 and return an error code if the URL is not responding?)
 
   Just a few thoughts.
 
   Randy
 
 -Original Message-
 From: Dennis Doubleday [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 01, 2001 3:57 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Why use apache
 
 
 At 03:06 PM 2/1/01, you wrote:
 
 So, the answer is it really depends.  Look at your usage patterns
 
 -
 
 if its almost exclusively Tomcat-served dynamic content then go with just
 Tomcat.  If its mostly static with a few dynamic pages the go with Apache
 and Tomcat.  If its in between, experiment and test to determine what's
 
 best
 
 for your application.
 
 
 My Apache/Jserv app serves only dynamic requests, but I continue to front 
 it with Apache because Apache will restart Jserv if it dies (if started in 
 automatic mode.) I have thought of switching to Tomcat standalone, but is 
 there a way to replace that restart-on-failure feature?
 
 -
 Dennis Doubleday  email: [EMAIL PROTECTED]
 yourfit.com, Inc.   web: http://www.yourfit.com/
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 


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




Re: runaway threads eating cpu cycles on Solaris 7

2001-02-15 Thread Ben Ricker

This sounds like garbage collection by the JVM. I know there is a way to
control when the JVM garbage collects, but I amnot sure how. Anybody
else know how to do that?

Ben Ricker
Senior System Administrator
US-Rx, Inc.


On 15 Feb 2001 15:43:22 -0500, Kelly Kleinfelder wrote:
 We are running Tomcat 3.2.1 and Solaris 7 on a Sun e250 with 4 400Mhz processors. 
The problem we're having is that one thread is chewing up the majority of the cpu 
cycles and sometimes causes tomcat to hang.
 
 I have included sample mpstat data and the output from ps -L -p PID:
 
 ps -L -p 26361
PID   LWP TTY LTIME CMD
  26361 1 ?0:03 java
  2636122 ?1:02 java
  2636123 ?   40:57 java
  2636124 ?1:43 java
  2636126 ?0:09 java
  2636167 ?0:03 java
  (24 entries deleted for brevity. All were at 0:00 LTIME)
 
 mpstat 30
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
   0   12   0   12 64   170100750   3   1  96
   16   06 41   14300052   59   1   1  39
   20   0064   62   12200020   41   1   1  57
   34   0   14   2033   270100260   0   0 100
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
   00   01 32   160110511   3   1  95
   10   00 5164000 3   81   0   0  19
   20   0219   19   170100160   0   0 100
   34   0   13   2022   15110041   19   2   0  78
 CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
   04   05 55   170110701   2   1  96
   14   00 51   11400036   84   0   0  15
   22   0426   26   280100812   0   0  98
   30   0   20   2044   19100024   14   0   0  86
 
 Before today, this was happening about every 3 days. Today it happened 5 hours 
apart. By going through our logs, we have determined that this is not caused by any 
specific user action. It is also not caused by server load, as it mostly happens with 
less than 5 users accessing the application. It is also not a gradual thing. Our sar 
statistics show that our processor idle time is 98% and then 5 minutes later it's 
down to 83% and in another 5 minutes, it's at 49%.
 
 Is there any way that I can tell exactly what is happening in the offending thread?
 
 Any other ideas on what's causing this problem?
 
 Thanks,
 Kelly


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




Re: Tomcat won't auto-start on RedHat 7.3

2002-09-17 Thread Ben Ricker

On Tue, 2002-09-17 at 14:06, Kenny G. Dubuisson, Jr. wrote:
 Very good question...I bet they aren't.  Do you know where I would set those
 for boot (or should I just put them in the script I wrote)?  Thanks,
 Kenny

Put them in the script.

Ben Ricker
Wellinx.com
 
 - Original Message -
 From: Turner, John [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, September 17, 2002 2:04 PM
 Subject: RE: Tomcat won't auto-start on RedHat 7.3
 
 
 
  When run during boot, are JAVA_HOME and CATALINA_HOME set?
 
  John
 
   -Original Message-
   From: Kenny G. Dubuisson, Jr. [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 17, 2002 3:01 PM
   To: Tomcat Users List
   Subject: Tomcat won't auto-start on RedHat 7.3
  
  
   I have successfully installed Apache 2.0.40, Tomcat 4.0.4,
   and mod_jk and
   all works fine.  The problem I have is that I wrote a simple
   startup script
   for Tomcat to be executed upon init level 5 entrance.  If I
   run the script
   from a shell prompt, it works fine.  If it runs when Linux is booting,
   though it says OK when starting, Tomcat doesn't actually
   get started.
  
   The script is:
  
   #!/bin/sh
   case $1 in
  start)
 echo -n Starting Tomcat: 
 /usr/local/jakarta-tomcat-4.0.4/bin/startup.sh
 echo
 ;;
  stop)
 echo -n Stopping Tomcat: 
 /usr/local/jakarta-tomcat-4.0.4/bin/shutdown.sh
 echo
 ;;
  restart)
 $0 stop
 $0 start
 ;;
  *)
 echo Usage: $0 {start|stop|restart}
 exit 1
   esac
   exit 0
  
   Any Ideas?
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




RE: two instances of tomcat (in diferent ports) on the same machi ne

2002-09-19 Thread Ben Ricker

On Thu, 2002-09-19 at 14:52, Turner, John wrote:
 
 Yes, this is absolutely possible.  I have 13 instances (Tomcat 3.1) running
 on a single server at the moment.
 
 You will need a different server.xml for each, a different work directory
 for each, and each must be on its own connector port (whichever connector
 you choose to use).  At least, that is how it is set up on my server.
 
 John

How do you have multiple server.xmls? Do you use the same startup
script?  Did you use a specific How-To?

Thanks,

Ben Ricker
Wellinx.com
 
  -Original Message-
  From: Christian J. Dechery [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 19, 2002 3:48 PM
  To: [EMAIL PROTECTED]
  Subject: two instances of tomcat (in diferent ports) on the 
  same machine
  
  
  How can I achieve this? Is it possible?
   
  .:| Christian J. Dechery
  .:| FINEP - Depto. de Sistemas
  .:| [EMAIL PROTECTED]
  .:| (21) 2555-0332
  




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




RE: Running multiple tomcat instances ?????

2002-09-24 Thread Ben Ricker

If that script works, then great.

A less elegant way to do it would be to utilize pgrep. Do a man on it
(not sure what platform you are running on). You can pgrep for the
earliest PID that was run with a number of options. I use it for a Jserv
installation and it works quite nice.

I have not tested it with Tomcat, though.

Good luck,

Ben Ricker
Wellinx, Inc.

On Mon, 2002-09-23 at 15:17, Raj Mettai wrote:
 Hi John,
 
 I have compiled the code and copied to $CATALINA_HOME$/bin
 then added the following snippet into server.xml
 
   !-- Define the Tomcat Stand-Alone Service --
   Service name=Tomcat-Standalone
 
 Listener className=PidLifeCycle /
 
 
 when I start the tomcat, I am not seeing any tomcat.pid and I am getting
 the following error in catalina.out
 
 ERROR reading /opt/tomcat1/conf/server.xml
 At Line 28 /Server/Service/Listener/ className=PidLifeCycle 
 
 Catalina.start: java.lang.ClassNotFoundException: PidLifeCycle
 java.lang.ClassNotFoundException: PidLifeCycle
 at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1127)
 at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at
 org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616)
 at
 org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)
 at
 org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91)
 at
 org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
 at
 org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
 at
 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
 at
 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
 at
 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
 at
 org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 at
 org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
 at
 org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
 at
 org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
 at
 org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at
 org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at java.lang.reflect.Method.invoke(Native Method)
 at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 
 
 thanks 
 
 -Raj
 
 
  [EMAIL PROTECTED] 09/23/02 12:50PM 
 
 Well, in that case, I will include here the content of a message posted
 by
 Tim Funk on 6/13/2002, which has his solution for this, which I find
 pretty
 neat.  Hopefully Tim doesn't mind, and I should add that this would
 break
 portability, most notably on Windows machines.
 
 On 6/13/2002, Tim Funk wrote:
 
 For what its worth - I created (and use) a LifecycleListener that runs 
 on startup which logs the process ID into a file called tomcat.pid. 
 Which is created by a shell script called writepid.sh. Below is all the 
 code to get this to work. This code also assumes your current working 
 directory is $CATALINA_HOME.
 
 --Begin code
 import org.apache.catalina.LifecycleEvent;
 
 /**
   * A helper for getting the PID of java so shutting down tomcat is MUCH
   * easier.
   */
 public class PidLifeCycle implements
 org.apache.catalina.LifecycleListener {
   public void lifecycleEvent(LifecycleEvent event)  {
  if (start.equals(event.getType())) {
 try {
  Runtime.getRuntime().exec(/bin/sh bin/writepid.sh);
 } catch(Throwable e) {
e.printStackTrace();
 }
  }
   }
 }
 --End Code
 
 The code above will launch the following shell script. Should be in the 
 bin/ directory of your tomcat installation.
 --Begin Shell script
 echo $PPID  logs/tomcat.pid
 --End Shell script
 
 Then add the following into server.xml
 --Begin server.xml snippet
 Listener className=PidLifeCycle /
 --End server.xml snippet
 
 -Tim
 
 == end ===
 
 Thanks, Tim!
 
 John
 
 
  -Original Message-
  From: Anthony Milbourne [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 12:45 PM
  To: 'Tomcat Users List'
  Subject: RE: Running multiple tomcat instances ?
  
  
  Hi John
  
  I don't think this option is available under Solaris :-(.
  
  Anthony.
  
   -Original Message-
   From:Turner, John [SMTP:[EMAIL PROTECTED]]
   Sent:23

Problem with mod_jk.so

2002-09-30 Thread Ben Ricker

I downloaded the binary of mod_jk.so from Jakarta's downloads in
/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/linux/i386. I am
running Apache 1.3.26 with Tomcat 4.05 on Red Hat Linux release 7.1
(Seawolf). The binary is compiled for 7.2, however. That may explain the
following error when trying to start Apache:


[root@dev bin]# ./apachectl configtest
Syntax error on line 208 of /usr/local/apache-new/conf/httpd.conf:
Cannot load /usr/local/apache-new/libexec/mod_jk.so into server: 
/usr/local/apache-new/libexec/mod_jk.so: undefined symbol: ap_ctx_get

Any ideas? Do I need to upgrade gcc, possibly? What do the binaries rely upon?

Thanks in advance,

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Problem with mod_jk.so

2002-09-30 Thread Ben Ricker

On Mon, 2002-09-30 at 11:53, Turner, John wrote:
 Which one did you download?  EAPI or no EAPI?

No EAPI...As the download site says:

  * mod_jk-1.3-noeapi.so is for Apache 1.3.x without mod_ssl

I do not have mod_ssl installed. Verified that through httpd-l.

Ben

 John
 
 
  -Original Message-
  From: Ben Ricker [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 30, 2002 12:27 PM
  To: Tomcat Users List
  Subject: Problem with mod_jk.so
  
  
  I downloaded the binary of mod_jk.so from Jakarta's downloads in
  /builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/linux/
  i386. I am
  running Apache 1.3.26 with Tomcat 4.05 on Red Hat Linux release 7.1
  (Seawolf). The binary is compiled for 7.2, however. That may 
  explain the
  following error when trying to start Apache:
  
  
  [root@dev bin]# ./apachectl configtest
  Syntax error on line 208 of /usr/local/apache-new/conf/httpd.conf:
  Cannot load /usr/local/apache-new/libexec/mod_jk.so into 
  server: /usr/local/apache-new/libexec/mod_jk.so: undefined 
  symbol: ap_ctx_get
  
  Any ideas? Do I need to upgrade gcc, possibly? What do the 
  binaries rely upon?
  
  Thanks in advance,
  
  Ben Ricker
  
  -- 
  Ben Ricker [EMAIL PROTECTED]
  Wellinx.com
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Problem with mod_jk.so

2002-09-30 Thread Ben Ricker

On Mon, 2002-09-30 at 12:08, Turner, John wrote:
 The reason I ask is that the ap* functions are 1.3, and I usually see error
 messages about ap_table_get and similar when either an Apache 2.0 module is
 being used with Apache 1.3, or vice versa.
 
 John

This may add some info: I compiled Apache with ApacheToolbox. The
modules are static but it has DSO support in it. Then again, I would
expect an error much earlier in the load process then an undefined
symbol.

I cannot guarantee that it IS the 1.3 connectorthe filename suggests
it is.

Ben Ricker

 
  -Original Message-
  From: Ben Ricker [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 30, 2002 1:01 PM
  To: Tomcat Users List
  Subject: RE: Problem with mod_jk.so
  
  
  On Mon, 2002-09-30 at 11:53, Turner, John wrote:
   Which one did you download?  EAPI or no EAPI?
  
  No EAPI...As the download site says:
  
* mod_jk-1.3-noeapi.so is for Apache 1.3.x without mod_ssl
  
  I do not have mod_ssl installed. Verified that through httpd-l.
  
  Ben
  
   John
   
   
-Original Message-
From: Ben Ricker [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 12:27 PM
To: Tomcat Users List
Subject: Problem with mod_jk.so


I downloaded the binary of mod_jk.so from Jakarta's downloads in
/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/linux/
i386. I am
running Apache 1.3.26 with Tomcat 4.05 on Red Hat Linux 
  release 7.1
(Seawolf). The binary is compiled for 7.2, however. That may 
explain the
following error when trying to start Apache:


[root@dev bin]# ./apachectl configtest
Syntax error on line 208 of /usr/local/apache-new/conf/httpd.conf:
Cannot load /usr/local/apache-new/libexec/mod_jk.so into 
server: /usr/local/apache-new/libexec/mod_jk.so: undefined 
symbol: ap_ctx_get

Any ideas? Do I need to upgrade gcc, possibly? What do the 
binaries rely upon?

Thanks in advance,

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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

   
   --
   To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 -- 
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Load balancing + replicated sessions

2002-10-01 Thread Ben Ricker

See http://www.theserverside.com/resources/article.jsp?l=Tomcat. you can
do in memmory session replication across JVMs through TCP.

Ben Ricker

On Tue, 2002-10-01 at 09:29, Luiz Ricardo wrote:
 Hi,
 
 I would like to know if there is a way to configure Tomcat + Apache to
 replicate sessions under a load balancing configuration.
 
 Example, I have two Tomcat instances (TC1 and TC2) and the session in TC1
 would be replicated in TC2 and the sessions in TC2 would be replicated in
 TC1, so if TC1 crashes the requests would be redirected to TC2 without lost
 sessions and vice-versa.
 
 Luiz Ricardo
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Problem with mod_jk.so

2002-10-01 Thread Ben Ricker

Just to let everyone know, I downloaded John Turner's mod_jk.so and the
problem went away (have not finished testing, however). The URL is:
http://www.johnturner.com/howto/apache-tomcat-howto.html.

Thanks to John!

Ben Ricker 

On Mon, 2002-09-30 at 12:53, Ben Ricker wrote:
 On Mon, 2002-09-30 at 12:08, Turner, John wrote:
  The reason I ask is that the ap* functions are 1.3, and I usually see error
  messages about ap_table_get and similar when either an Apache 2.0 module is
  being used with Apache 1.3, or vice versa.
  
  John
 
 This may add some info: I compiled Apache with ApacheToolbox. The
 modules are static but it has DSO support in it. Then again, I would
 expect an error much earlier in the load process then an undefined
 symbol.
 
 I cannot guarantee that it IS the 1.3 connectorthe filename suggests
 it is.
 
 Ben Ricker
 
  
   -Original Message-
   From: Ben Ricker [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 30, 2002 1:01 PM
   To: Tomcat Users List
   Subject: RE: Problem with mod_jk.so
   
   
   On Mon, 2002-09-30 at 11:53, Turner, John wrote:
Which one did you download?  EAPI or no EAPI?
   
   No EAPI...As the download site says:
   
 * mod_jk-1.3-noeapi.so is for Apache 1.3.x without mod_ssl
   
   I do not have mod_ssl installed. Verified that through httpd-l.
   
   Ben
   
John


 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 30, 2002 12:27 PM
 To: Tomcat Users List
 Subject: Problem with mod_jk.so
 
 
 I downloaded the binary of mod_jk.so from Jakarta's downloads in
 /builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/linux/
 i386. I am
 running Apache 1.3.26 with Tomcat 4.05 on Red Hat Linux 
   release 7.1
 (Seawolf). The binary is compiled for 7.2, however. That may 
 explain the
 following error when trying to start Apache:
 
 
 [root@dev bin]# ./apachectl configtest
 Syntax error on line 208 of /usr/local/apache-new/conf/httpd.conf:
 Cannot load /usr/local/apache-new/libexec/mod_jk.so into 
 server: /usr/local/apache-new/libexec/mod_jk.so: undefined 
 symbol: ap_ctx_get
 
 Any ideas? Do I need to upgrade gcc, possibly? What do the 
 binaries rely upon?
 
 Thanks in advance,
 
 Ben Ricker
 
 -- 
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  -- 
  Ben Ricker [EMAIL PROTECTED]
  Wellinx.com
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 -- 
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Error 400 getting thrown

2002-10-01 Thread Ben Ricker

I am having a problem setting up a Tomcat installation using multiple
Tomcats (two to be exact) being load balanced from one Apache. Mod_jk is
being loaded correctly. I created a file called index.jsp with the
following code:

html
body bgcolor=red
center
%= request.getSession().getId() %
h1Tomcat 1/h1
/body
/html

When I access index.jsp, I get a white page in the browser. Here is what
I get in the mod_jk log in debug mode:

[Tue Oct 01 11:01:11 2002]  [jk_uri_worker_map.c (460)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 01 11:01:11 2002]  [jk_uri_worker_map.c (477)]: Attempting to map URI 
'/index.jsp'
[Tue Oct 01 11:01:11 2002]  [jk_uri_worker_map.c (558)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match loadbalancer - *.jsp
[Tue Oct 01 11:01:11 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name 
loadbalancer
[Tue Oct 01 11:01:11 2002]  [jk_worker.c (136)]: wc_get_worker_for_name, done  found a 
worker
[Tue Oct 01 11:01:11 2002]  [jk_lb_worker.c (527)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 11:01:11 2002]  [jk_lb_worker.c (310)]: Into jk_endpoint_t::service
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (1355)]: Into jk_worker_t::get_endpoint
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (1079)]: Into jk_endpoint_t::service
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (280)]: Into ajp_marshal_into_msgb
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (413)]: ajp_marshal_into_msgb - Done
[Tue Oct 01 11:01:11 2002]  [jk_connect.c (116)]: Into jk_open_socket
[Tue Oct 01 11:01:11 2002]  [jk_connect.c (123)]: jk_open_socket, try to connect 
socket = 8
[Tue Oct 01 11:01:11 2002]  [jk_connect.c (132)]: jk_open_socket, after connect ret = 0
[Tue Oct 01 11:01:11 2002]  [jk_connect.c (140)]: jk_open_socket, set TCP_NODELAY to on
[Tue Oct 01 11:01:11 2002]  [jk_connect.c (148)]: jk_open_socket, return, sd = 8
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (589)]: In 
jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 8
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (613)]: sending to ajp13 #462
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (854)]: ajp_send_request 2: request body 
to send 0 - request body to resend 0
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (699)]: received from ajp13 #33
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (462)]: ajp_unmarshal_response: status = 
400
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (467)]: ajp_unmarshal_response: Number of 
headers is = 1
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (507)]: ajp_unmarshal_response: Header[0] 
[Content-Type] = [text/html]
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (699)]: received from ajp13 #2
[Tue Oct 01 11:01:11 2002]  [jk_ajp_common.c (1333)]: Into jk_endpoint_t::done, 
recycling connection
[Tue Oct 01 11:01:11 2002]  [jk_lb_worker.c (389)]: Into jk_endpoint_t::done


What exactly is the Error 400 showing? Error 400 is a Bad Request.
Below are snippets of some conf files. Let me know if I need to show
anyone the server.xml file.

Thanks,

Ben Ricker

I have the following in httpd.conf:

#
# Set up loadbalncer for JkMount
#
JkMount /*.jsp loadbalancer
JkMount /servlets/* loadbalancer

#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

Here is the workers.properties:

#
# workers.properties
#

# In Unix, we use forward slashes:
ps=/

# list the workers by name

worker.list=tomcat1, tomcat2, loadbalancer

# 
# First tomcat server
# 
worker.tomcat1.port=11009
worker.tomcat1.host=dev.wellinx.com
worker.tomcat1.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat1.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat1.lbfactor=100


# 
# Second tomcat server
# 
worker.tomcat2.port=12009
worker.tomcat2.host=dev.wellinx.com
worker.tomcat2.type=ajp13

# Specify the size of the open connection cache.
#worker.tomcat2.cachesize

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#   lbfactor must be  0
#   Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100


# 
# Load Balancer worker
# 

#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#   If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2

#
# END workers.properties
#



-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Problem with mod_jk.so

2002-10-01 Thread Ben Ricker

Thanks for the info. I will go back through the docs and see what may
have happened. I will let you know if I still have the issue after
perusing the docs.

Ben Ricker


On Tue, 2002-10-01 at 10:54, Henri Gomez wrote:
  Just to let everyone know, I downloaded John Turner's mod_jk.so and the
  problem went away (have not finished testing, however). The URL is:
  http://www.johnturner.com/howto/apache-tomcat-howto.html.
 
 Do you know that jk 1.2.0 has been released ?
 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/
 
 Do you know that there is up to date documentation included ?
 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/doc/
 
 Do you know that the jk included in tomcat 4.0.4 IS NOT the same that JK 
 1.2.0 release ?
 
 For JK 1.2.0 release, jakarta-tomcat-connectors developpers spend hours 
 in providing a decent documentation, binaries for many platforms and
 we expect users to use them.
 
 We want to be sure that the bugzilla's reports which could be filled 
 about jk will be valid's one and not spend our time trying to locate
 a bug which has been fixed by 1.2.0 release.
 
 If you've got problem with the binaries we provide, just give us more
 informations about your settings so we could help you, correct our 
 builds, create new one's or fix code/build processes.
 
 Regards
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




400 Error Revisited

2002-10-01 Thread Ben Ricker
.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2

#
# END workers.properties
#

-

My Connector configs from both tomcat instances

This is in /usr/local/tomcat1/conf:

!-- Define an AJP 1.3 Connector on port 8009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=11009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/


This is in /usr/local/tomcat2/conf:

!-- Define an AJP 1.3 Connector on port 12009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=12009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/





-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: 400 Error Revisited

2002-10-01 Thread Ben Ricker

On Tue, 2002-10-01 at 14:59, Michael Schulz wrote:
 What is the URL that causes the 400 error?

Dangit...forgot to include that:

hostname:8080/index.jsp

Apache is listening on 8080 as I test this new setup. I have Tomcat
listening on 80 now.

 Also, is this a typo in your message, or is this really in your
 conf/workers.properties file?:
 
   # Send servlet for context /examples to worker named worker1
   JkMount /examples/servlet/* oadbalancer
 
 If so, you are missing the l in loadbalancer...don't know if that is the
 real cause, but it is something to examine.

Good call! I missed that one. Fixed it and it made no difference

Ben Ricker

 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 2:06 PM
 To: 'Tomcat Users List'
 Subject: 400 Error Revisited
 
 
 I took Henri Gomez's request and tried to download the binary mod_jk
 from the site he mentioned. I got the same undefined symbol. As I am
 using Redhat 7.1 for my Apache server, I decided to take another
 person's advice and built mod_jk from source following the JK
 documentation.
 
 I still get the 400 error thrown into the mod_jk logs. There is no log
 on the Tomcat's side.
 
 snip
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Problem with JK 1.2.0 docs?

2002-10-09 Thread Ben Ricker

I am confused by the build process for mod_jk 1.2.0 on a Redhat 7.3
server. From the 'BUILDING' text file, it says:

use configure and indicate Apache 1.3 apxs location (--with-apxs)
use make
copy the mod_jk binary to the apache modules location

Now, after doing a 'make' there is no binary in the top-level directory
with the configure script (i.e.,
jakarta-tomcat-connectors-jk-1.2.0-src/jk/native). So I went into
jakarta-tomcat-connectors-jk-1.2.0-src/jk/native/apache-1.3 and I see
the following files:

[root@javatest2 apache-1.3]# ls  -l
total 1556
-rw-r--r--1 root root  120 Sep 26 04:34 libjk.module
-rw-r--r--1 root root 2350 Oct  9 11:27 Makefile
-rw-r--r--1 root root  659 Oct  9 11:27 Makefile.apxs
-rwxr-xr-x1 root root  582 Sep 26 04:34 Makefile.apxs.in
-rwxr-xr-x1 root root 2234 Sep 26 04:34 Makefile.in
-rw-r--r--1 root root  252 Sep 26 04:34 Makefile.libdir
-rw-r--r--1 root root  827 Sep 26 04:34 Makefile.tmpl
-rw-r--r--1 root root   920456 Oct  9 11:28 mod_jk.a
-rw-r--r--1 root root66958 Sep 26 04:34 mod_jk.c
-rw-r--r--1 root root 7326 Sep 26 04:34 mod_jk.dsp
-rw-r--r--1 root root   11 Sep 26 04:34 mod_jk.exp
-rw-r--r--1 root root  713 Oct  9 11:28 mod_jk.la
-rw-r--r--1 root root   103752 Oct  9 11:28 mod_jk.lo
-rw-r--r--1 root root   101844 Oct  9 11:28 mod_jk.o
lrwxrwxrwx1 root root   15 Oct  9 11:28 mod_jk.so - mod_jk.so.0.0.0
lrwxrwxrwx1 root root   15 Oct  9 11:28 mod_jk.so.0 - mod_jk.so.0.0.0
-rwxr-xr-x1 root root   326225 Oct  9 11:28 mod_jk.so.0.0.0

So which is the binary? Mod_jk.so is a symlink. Should I just move
mod_jk.so.0.0.0 to the apache directory as mod_jk.so? The documentation
is very vague on this point. I get around it by doing a 'make install'
in the native directory and it installs a symlink to the the libexec
directory of Apache.

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Reloading w/ Manager on cluster?

2002-10-10 Thread Ben Ricker

I have a setup with 2 APache servers (1.3.27 on Redhat 7.3) talking to 4
tomcats clustered across two SOlaris 8 boxes running Tomcat 4.0.5. We
have a load balancer across the web servers and, of course, mod_jk 1.2.0
doing the load balancing across the Tomcats.

We have a QA environment where I want the abilty to reload the apps
through the manager application. We cannot do it through the Apache load
balancer because you cannot quarantee what Tomcat you are going to talk
to at any given request.

I thought of having Tomcat use its embedded web server on 8080 and 8081
on each Tomcat server and have the developers call those for reloading,
but they would have to do that 4 times for every reload. Plus, if we
scale to a bigger cluster, the problem becomes worse.

I do have a script that stops and restarts all of the tomcats from a
central location, but is there any danger to be restarting Tomcat
frequently? Has anyone worked around a cluster for the management app?

Thanks,

Ben

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Reloading w/ Manager on cluster?

2002-10-10 Thread Ben Ricker

The script is rather rough right now, but it is simple. I use ssh to
call the tomcat startup script like so:

ssh hostname /etc/init.d/tomcat stop

Here is the contents of the startup script. I have two Tomcat
directories, /usr/local/tomcat1 and /usr/local/tomcat2. I have them
sharing a centralized webapps directory in /usr/local/webapps. I run the
tomcat processes with an unpriveledged use, 'tomcat'.

HTH,

Ben Ricker

-Tomcat Startup Script---

#!/bin/sh
#
# tomcatStarts the Tomcat server
#
# Author:   All kinds of people
#
# chkconfig: 345 50 50
#
# processname: httpd
# pidfile: /usr/local/apache/logs/httpd.pid

# Begin /etc/init.d/apache

case $1 in
  start)
echo -n Starting Tomcat...
/bin/su tomcat -c /usr/local/tomcat1/bin/startup.sh
/bin/su tomcat -c /usr/local/tomcat2/bin/startup.sh
;;

  stop)
echo -n Stopping Tomcat...
/bin/su tomcat -c /usr/local/tomcat1/bin/shutdown.sh
/bin/su tomcat -c /usr/local/tomcat2/bin/shutdown.sh
;;

  restart)
echo -n Restarting Tomcat...
/bin/su tomcat -c /usr/local/tomcat1/bin/shutdown.sh
/bin/su tomcat -c /usr/local/tomcat2/bin/shutdown.sh
sleep 5
/bin/su tomcat -c /usr/local/tomcat1/bin/startup.sh
/bin/su tomcat -c /usr/local/tomcat2/bin/startup.sh
;;

  *)
echo Usage: $0 {start|stop|restart}
;;

esac

# End /etc/init.d/tomcat


On Thu, 2002-10-10 at 13:52, Michael Schulz wrote:
 I am facing a similar issue in terms of updating our tomcat servers in the
 cluster.
 
 I was thinking about doing a similar thing...using the http connector (which
 is behind a firewall and not accessible to the outside world) on each tomcat
 server to communicate with the tomcat manager app
 (http://tomcat1:8080/manager/reload?path=/mywebapp).  I would think it would
 be easy enough to write a script that uses Lynx to invoke this same URL on
 all four servers.  I don't think it is a problem to be restarting tomcat
 frequently, at least I have not seen a problem and we've done this quite a
 bit in our QA environment.
 
 Ben, may I see the script that you are currently using to restart tomcat on
 the multiple servers?  Also, have you done any load testing? If so, what
 sort of load is your system able to support?
 
 -Mike Schulz
 
 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 10, 2002 1:32 PM
 To: [EMAIL PROTECTED]
 Subject: Reloading w/ Manager on cluster?
 
 
 I have a setup with 2 APache servers (1.3.27 on Redhat 7.3) talking to 4
 tomcats clustered across two SOlaris 8 boxes running Tomcat 4.0.5. We
 have a load balancer across the web servers and, of course, mod_jk 1.2.0
 doing the load balancing across the Tomcats.
 
 We have a QA environment where I want the abilty to reload the apps
 through the manager application. We cannot do it through the Apache load
 balancer because you cannot quarantee what Tomcat you are going to talk
 to at any given request.
 
 I thought of having Tomcat use its embedded web server on 8080 and 8081
 on each Tomcat server and have the developers call those for reloading,
 but they would have to do that 4 times for every reload. Plus, if we
 scale to a bigger cluster, the problem becomes worse.
 
 I do have a script that stops and restarts all of the tomcats from a
 central location, but is there any danger to be restarting Tomcat
 frequently? Has anyone worked around a cluster for the management app?
 
 Thanks,
 
 Ben
 
 --
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Using daemontools to supervise Tomcat

2002-10-11 Thread Ben Ricker

I tried to get Daemontools running for Jserv (which is pretty similar)
and had no luck. My guess is that you might be able to get it to work if
you pass all the env variables using daemontools and just launch java.
However, since java is not a normal daemon, you will probably need
fghack to do it. 

I myself gave up; the thought of creating all those environment
variables was just too much, so I just rolled my own PID monitor whcih I
am porting to Tomcat. Basically, it will grep out the PID and write to a
file which I watch with a cronjob process.

HTH,

Ben Ricker


On Fri, 2002-10-11 at 10:08, camccuk wrote:
 Hello all,
 
 Does anyone have any experience with using Dan Bernstein's daemontools to
 supervise Tomcat? I've had real trouble getting this to work with either
 startup.sh or catalina.sh but I'm putting this down to the fact that I'm no
 genius with unix processes...
 
 Having said that, DJB's documentation isn't the most encouraging in the
 world...
 
 I've got Tomcat 4.0.4 with daemontools 0.7
 
 Any pointers very welcome,
 
 cam
 
 __
 Do you Yahoo!?
 Faith Hill - Exclusive Performances, Videos  More
 http://faith.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Using daemontools to supervise Tomcat

2002-10-11 Thread Ben Ricker

On Fri, 2002-10-11 at 12:48, camccuk wrote:
 --- Ben Ricker [EMAIL PROTECTED] wrote:

 I'b be interested to see that Ben - one of the problems I had trying something
 similar was that when tomcat gets swapped out, it appears on the process list
 as [java] and there is *no way* to my knowledge (or that of the various usenet
 groups/lists etc that I pestered) of getting back the command line to see which
 instance of the JVM you are dealing with - this was a problem for me on a
 machine running at least two JVMs.

Actually there is. I use a -Dafoo to give the process a unique
identifier. This sets a marker on the process but does nothing for the
JVM itself. To find a process ID, I would use 'pgrep -f foo' and the PID
is returned (this is on Unix, btw). Also , when you do the '-Dafoo' as
the first arg to the JVM, it appears in 'ps -ef'.

Here is how I do it: I setup the java command line like so:

/usr/local/jdk/bin/java \
-Da=Ftp \
-cp $PROP_DIR:$EXT_INT_JAR:$NET_COMPONENTS_JAR:$LOG4J_JAR \
com.usrx.extinterface.ftp.FTPService $PROPERTIES_FILES \
 $LOG_FILE 21

Then I do this:

pgrep -fn  Ftp  $PIDFILE

Technically, you do not need the 'n', as that denotes the newest
process. You can get by with just the -f.

Finally, I run the following script through cron every minute. The
variables should be self-explanatory. For security reasons, I cannot
divulge the whole setup. Basically, this snippet below monitors 7 JVMs
and if they are not running, restarts them. It has worked flawlessly for
a long time.

-Begin Snippet--

for i in $*
do
eval BASEDIR=$`echo BASEDIR_$i`
eval PIDFILE=$BASEDIR/$`echo PIDFILE_$i`
eval PNAME=$`echo PNAME_$i`
eval CHECKFILE=$BASEDIR/$`echo CHECKFILE_$i`
eval START=$BASEDIR/$`echo START_$i`

if [ -f $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ x$PID != x ]  kill -0 $PID 2/dev/null ; then
STATUS=$PNAME ($PID) running
RUNNING=1
else
STATUS=$PNAME ($PID?) NOT running
RUNNING=0
fi
else
STATUS=$PNAME (no pid file) NOT running
RUNNING=0
fi

if [ $RUNNING = 0 ]; then
if [ -f $CHECKFILE ] ; then
if [ `cat $CHECKFILE` = 0 ] ; then
echo $STATUS - restart failed. | mail -s $PNAME alert $RECIPIENTS
logger -p local0.crit -t pidmonitor.sh $STATUS: restart failed.
echo 1  $CHECKFILE
fi
cd $BASEDIR
$START start
else
echo $STATUS - will attempt to start. | mail -s $PNAME alert 
$RECIPIENTS
logger -p local0.crit -t pidmonitor.sh $STATUS: attempting to start.
touch $CHECKFILE
echo 0  $CHECKFILE
cd $BASEDIR
$START start
fi
else
if [ -f $CHECKFILE ] ; then
/bin/rm $CHECKFILE
echo $STATUS | mail -s $PNAME alert $RECIPIENTS
logger -p local0.crit -t pidmonitor.sh $STATUS
fi
fi
done

--End Snippet--


 I had to use fghack already to stop supervise trying to start tomcat dozens of
 time but I still couldn't get multilog to work and supervise seemed to act
 weirdly afterwards (although svstat worked ok and svscan got into a confused
 state trying to start the run script in the logging subdirectory - something
 supervise won't do for me)

You will have to use fghack because java does not act like a daemon
usually does. A daemon usually puts itself into the background after
executing. Java does not. That is what fghack does. Unfortunately, as
the web site for daemontools says, if you use fghack, it will disable
your ability to use svc and will make all the other commands pretty
useless. Daemontools works great with daemons that act like daemons; it
works like hell with programs that don't.

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Connecting Apache with remote Tomcat

2002-10-14 Thread Ben Ricker

I run mod_jk 1.2.0 and I do not need to recycle Apache when restarting
Tomcat. I did notice a lag of up to 2 minutes after restarting Tomcat
where Apache will not take requests. I think this is due to Tomcat
restarting itself and classloading. Maybe you do not wait long enough
after restarting Tomcat before you retry a connection?

FYI, I am running two Apache 1.3.27 on Redhat load balancing across 4
Tomcats on two Solaris 8 servers.

Ben Ricker 

On Mon, 2002-10-14 at 13:08, [EMAIL PROTECTED] wrote:
 I have a jk connector that allows our Apache (version 1.3.22) web server on
 Linux to forward requests to a tomcat (version 4.0.1) instance running on a
 Windows 2000 server. Each time the tomcat server is cycled the Apache
 server also requires cycling. I read in the docs that the newer version of
 the mod_jk connector overcomes this requirement. I downloaded the latest
 version of mod_jk.so for linux and saw no difference. Can you shed some
 more light on how to overcome this problem? Does it require jk2 to work
 properly?
 
 Thanks for any help you can pass along.
 
 Raymond J. Zeigler
 Integrated Support System, Inc.
 Clemson, SC
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: Using daemontools to supervise Tomcat

2002-10-16 Thread Ben Ricker

Just an FYI: I utilized Will's wonderful instructions and now have
Tomcat supervised by Daemontools. the 'svc' command even works for
HUP'ing and such!

Ben Ricker


On Fri, 2002-10-11 at 16:30, Will Hartung wrote:
 From: camccuk [EMAIL PROTECTED]
 Sent: Friday, October 11, 2002 8:08 AM
 
 
  Does anyone have any experience with using Dan Bernstein's daemontools to
  supervise Tomcat? I've had real trouble getting this to work with either
  startup.sh or catalina.sh but I'm putting this down to the fact that I'm
 no
  genius with unix processes...
 
 I don't really understand what the issue is here, but I plead ignorance in
 that I haven't worked with the DJB tools in a while.
 
 But, as I recall, the tools simply execute the program using the (by
 default) 'run' script. When run exits, for whatever reason, the tools fire
 it back up.
 
 Now the tomcat startup scripts fire the java process off in the background,
 but as I recall there is an option to NOT do that, and simply have tomcat.sh
 stay in the foreground.
 
 It seems to me that a few simple tweaks to tomcat.sh, linked to 'run' in the
 proper spot, and it should Just Work.
 
 Lemme look.
 
 This man has a bad heart. Angina Pectoris, but we have the cure...Yes. Here
 they are...
 
 Yes, here it is, just start catalina.sh with the run option, and it
 doesn't fork into the background.
 
 #!/bin/sh
 # daemontools run script for Tomcat
 cd /usr/local/java/jakarta-tomcat-4.0.4/bin
 # start tomcat in the foreground, redirect stderr to stdout for logging.
 exec ./catalina.sh run 21
 
 Copy or link this script to /services/tomcat/run, and it should fire right
 up. Untested, but it should work.
 
 Multilog should work with this as well, as the 'run' option doesn't redirect
 stdout or stderr, whereas the (default) 'start' option does. Since multilog
 only listens to stdin, the script redirects stderr to stdout so it can be
 captured as well. You need to setup the log directory properly, as mentioned
 in DJBs faq.
 
 The key is to keep the java process in the foreground for the 'run' script.
 supervise puts it in the background for you, so that's why the run script
 doesn't need to.
 
 Regards,
 
 Will Hartung
 ([EMAIL PROTECTED])
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 



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




RE: I don´t understand the objective of thisopen list !

2002-12-09 Thread Ben Ricker
My advice: don't use it. We geeks who take the time to LEARN about the
technologies we use will go about our business, using Tomcat. If you do
not like it, please find another list to flame-bait on.

Btw, I am running an App that has roughly 20k hits per day using a 99%
dynamically generated web app (this is a rather small web app compared
to others out there on the list) and I rely on it in a life or death
situation (i.e., I get fired if I cannot keep up a 99% uptime
requirement for 24/7/365). Tomcat works perfectly.

Ben Ricker


On Mon, 2002-12-09 at 16:04, Mike DiChiappari wrote:
 You're correct.  There is lots of documentation out there. 
 Unfortunately, it belongs with most things that are open sourse - in 
 the trash.  Jakarata/tomcat is particularly bad.  The people that 
 manage it should be ashamed of themselves (I hope they are not 
 building software I have to rely on in life and death situations).
 
 Mike
 
 
 I disagree.  There's lots of documentation out there.
 
 It's just not blasted into peoples' faces, nor is it bound into a nice
 little book and shrinkwrapped.  You have to go find it, and you have to read
 it.  Most people are too lazy to do either, they want everything handed to
 them.
 
 John
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Tomcat examples - reply to Carlos

2002-12-10 Thread Ben Ricker
(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLScanner.scanComment(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLDTDScannerImpl.scanComment(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset
  (Unknown Source)
  at
 
 org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch
  (Unknown Source)
  at
 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
  (Unknown Source)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
  Source)
  at
 
 org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
  Source)
  at
  org.apache.xerces.parsers.XMLParser.parse(Unknown
  Source)
  at
 
 org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
  Source)
  at
 
 org.apache.commons.digester.Digester.parse(Digester.java:1514)
  at
 
 org.apache.catalina.startup.ContextConfig.tldScanStream
  (ContextConfig.java:977)
  at
  org.apache.catalina.startup.ContextConfig.tldScanTld
  (ContextConfig.java:1006)
  at
  org.apache.catalina.startup.ContextConfig.tldScan
  (ContextConfig.java:870)
  at org.apache.catalina.startup.ContextConfig.start
  (ContextConfig.java:647)
  at
 
 org.apache.catalina.startup.ContextConfig.lifecycleEvent
  (ContextConfig.java:243)
  at
 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
  (LifecycleSupport.java:166)
  at org.apache.catalina.core.StandardContext.start
  (StandardContext.java:3493)
  at
 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
  at
 
 org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
  at
 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
  at org.apache.catalina.core.StandardEngine.start
  (StandardEngine.java:347)
  at org.apache.catalina.core.StandardService.start
  (StandardService.java:497)
  at org.apache.catalina.core.StandardServer.start
  (StandardServer.java:2189)
  at
 
 org.apache.catalina.startup.Catalina.start(Catalina.java:510)
  at
 
 org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
  at
 
 org.apache.catalina.startup.Catalina.process(Catalina.java:180)
  at java.lang.reflect.Method.invoke(Native Method)
  at
 
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
  [ERROR] Digester - -Parse Fatal Error at line 307
  column 39: The string --
  is
  not permitted within comments.
  org.xml.sax.SAXParseException: The string
  --
  is not permitted within comments.
  org.xml.sax.SAXParseException: The string -- is
  not permitted within
  comments.
  at
 
 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException
  (Unknown Source)
  at
 
 org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLScanner.scanComment(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLDTDScannerImpl.scanComment(Unknown
  Source)
  at
 
 org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
  Source)
 
 
 
 
 Thank?s for try to help me, and i hope that you can found my problem.
 
 === message truncated ===
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: 4.1.12 dumps VM, any ideas?

2002-12-10 Thread Ben Ricker
On Tue, 2002-12-10 at 13:54, Shapira, Yoav wrote:
 Hi,
 Damn, I was just about to suggest 1.4.1_01 ;)
 
 I've had that error happen before on JDK 1.3 on Solaris, not W2K.  The
 problem was I hadn't installed the OS-level patches required by Solaris
 for that JDK version.  So I don't know if this applicable to your
 problem...
 
 Yoav Shapira
 Millennium ChemInformatics

Just a thought: you can run java without HotSpot and see if it runs. If
it does, then you are probably looking at a bug in HotSpot (THAT never
happens *grin). If it does not, then you are probably looking at a
problem with your system.

HTH,

Ben Ricker

 
 -Original Message-
 From: Will Hartung [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 2:33 PM
 To: Tomcat Users List
 Subject: Re: 4.1.12 dumps VM, any ideas?
 
 As a followup, it also kills a JDK 1.4.1_01 JVM as well. :-(
 
 Thanx again!
 
 Will
 
 
  Hi All!
 
  We're just porting our app to 4.1.12. After fighting classpath
 problems,
 the
  latest and greatest is this:
 
  From the localhost_log file, the last enry was:
 
  2002-12-09 14:36:57 StandardWrapper[/myApp:invoker]: Loading
 container
  servlet invoker.
 
  On the stdout/stderr of the tomcat container:
 
  bin sh catalina.sh run
  Using CATALINA_BASE:   C:\cygwin\tmp\tomcat\jakarta-tomcat-4.1.12
  Using CATALINA_HOME:   C:\cygwin\tmp\tomcat\jakarta-tomcat-4.1.12
  Using CATALINA_TMPDIR:
 C:\cygwin\tmp\tomcat\jakarta-tomcat-4.1.12\temp
  Using JAVA_HOME:   c:\JDK1.3
  [INFO] Registry - -Loading registry information
  [INFO] Registry - -Creating new Registry instance
  [INFO] Registry - -Creating MBeanServer
  [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
  Starting service Tomcat-Standalone
  Apache Tomcat/4.1.12
  #
  # HotSpot Virtual Machine Error, Internal Error
  # Please report this error at
  # http://java.sun.com/cgi-bin/bugreport.cgi
  #
  # Error ID: 43113F32554E54494D45110E4350500290
  #
 
  W2K with Cygwin and JVM 1.3
 
  java version 1.3.1_01
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01a)
  Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
 
  Any ideas on how to hunt this kind of thing down? Are app does have a
  startup servlet, so it's no doubt within that, but I was hoping for
 some
  general ideas on why this is exploding.
 
  Thanx!
 
  Regards,
 
  Will Hartung
  ([EMAIL PROTECTED])
 
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:tomcat-user-
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Two instances of Tomcat

2002-12-11 Thread Ben Ricker
Remember that with 2 Tomcats, you need DOUBLE the memory. You may be
attempting to use more memory then you have in the box. Use 'top' to
watch the memory utilization and see if you are filling up on memory to
create the spreadsheet thingy.

You can control the memory usage of Tomcat using the -Xmx and -Xms to
control heap size. The settings you list would mean that you would need,
at least, 1.1gig of memory in the box to utilize both Tomcats to their
potential.

HTH,

Ben Ricker


On Tue, 2002-12-10 at 17:19, Mohbe, Sameer wrote:
 Hi Folks ,
  Need some  urgent help regarding  setting  up two instances
 of Tomcat .Here goes the details .We used to have Apache 1.3.23 + Tomcat
 4.0.2 configuration running on Red hat 7.0.We were running two web apps
 under Single instance of tomcat. To make them independent we are moving
 towards Two instances of tomcat .So we installed second instance residing in
 /opt/tomcat2 directory ,first being  in the directory called
 /opt/tomcat.Changes on server.xml were made for  two different  port nos.Now
 Everything works ok till the point  when we try to generate a report in
 second web application it gives a Java.lang Out of Memory error.This Final
 report feature uses the Formula 1 Software which is  a e-spreadsheet.Can any
 one please tell me what all settings are required for the TWO instances of
 tomcat.do we need TWO copies of  Worker.properties files (Coz we have only
 one ) and if yes then what changes need to be done .Is the Java error
 related to JVM memory settings .We have set TOMCAT_OPTS in /etc/profile for
 -Xms64 and -Xmx512.
 
 Regards
 Sameer
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: TC 4.1 and VM crash: how to report issue?

2002-12-11 Thread Ben Ricker
Have you tried turning off the HotSpot JIT compiler and trying your
test? All other things being equal, this will show you that the problem
resides in the interaction between Tomcat and the compiled code.

Just a thought...

Ben Ricker

On Wed, 2002-12-11 at 08:44, Aymeric Alibert wrote:
 I changed the debug flag to 10 in all elements of my server.xml.
 Looking at the log file, I cannot identifiy any error or warning from 
 Tomcat before it crashes.
 Here is a sample:
 
 ...
 StandardContext[/residential]:  Mapped to servlet 'default' with servlet path 
'/images/home_hdr.jpg' and path info 'null' and update=true
 StandardEngine[Standalone]: Mapping server name 'trngyouraccount.alliant-energy.com'
 StandardEngine[Standalone]:  Trying a direct match
 StandardEngine[Standalone]:  Trying an alias match
 StandardHost[localhost]: Mapping request URI '/residential/images/dropshadow.gif'
 StandardHost[localhost]:   Trying the longest context path prefix
 StandardHost[localhost]:  Mapped to context '/residential'
 Authenticator[/residential]: Security checking request GET 
/residential/images/dropshadow.gif
 Authenticator[/residential]:   Checking constraint 'SecurityConstraint[youraccount 
assistance LDAP authentication]' against GET /images/dropshadow.gif -- false
 Authenticator[/residential]:   No applicable constraint located
 Authenticator[/residential]:  Not subject to any constraint
 StandardContext[/residential]: Mapping contextPath='/residential' with 
requestURI='/residential/images/dropshadow.gif' and 
relativeURI='/images/dropshadow.gif'
 StandardContext[/residential]:   Trying exact match
 StandardContext[/residential]:   Trying prefix match
 StandardContext[/residential]:   Trying extension match
 StandardContext[/residential]:   Trying default match
 StandardContext[/residential]:  Mapped to servlet 'default' with servlet path 
'/images/dropshadow.gif' and path info 'null' and update=true
 StandardEngine[Standalone]: Mapping server name 'trngyouraccount.alliant-energy.com'
 StandardEngine[Standalone]:  Trying a direct match
 StandardEngine[Standalone]:  Trying an alias match
 StandardHost[localhost]: Mapping request URI '/residential/images/homepa2.gif'
 StandardHost[localhost]:   Trying the longest context path prefix
 StandardHost[localhost]:  Mapped to context '/residential'
 Authenticator[/residential]: Security checking request GET 
/residential/images/homepa2.gif
 Authenticator[/residential]:   Checking constraint 'SecurityConstraint[youraccount 
assistance LDAP authentication]' against GET /images/homepa2.gif -- false
 Authenticator[/residential]:   No applicable constraint located
 Authenticator[/residential]:  Not subject to any constraint
 StandardContext[/residential]: Mapping contextPath='/residential' with 
requestURI='/residential/images/homepa2.gif' and relativeURI='/images/homepa2.gif'
 StandardContext[/residential]:   Trying exact match
 StandardContext[/residential]:   Trying prefix match
 StandardContext[/residential]:   Trying extension match
 StandardContext[/residential]:   Trying default match
 StandardContext[/residential]:  Mapped to servlet 'default' with servlet path 
'/images/homepa2.gif' and path info 'null' and update=true
 StandardEngine[Standalone]: Mapping server name 'trngyouraccount.alliant-energy.com'
 StandardEngine[Standalone]:  Trying a direct match
 StandardEngine[Standalone]:  Trying an alias match
 StandardHost[localhost]: Mapping request URI '/residential/images/_c60b27.gif'
 StandardHost[localhost]:   Trying the longest context path prefix
 StandardHost[localhost]:  Mapped to context '/residential'
 Authenticator[/residential]: Security checking request GET 
/residential/images/_c60b27.gif
 Authenticator[/residential]:   Checking constraint 'SecurityConstraint[youraccount 
assistance LDAP authentication]' against GET /images/_c60b27.gif -- false
 Authenticator[/residential]:   No applicable constraint located
 Authenticator[/residential]:  Not subject to any constraint
 StandardContext[/residential]: Mapping contextPath='/residential' with 
requestURI='/residential/images/_c60b27.gif' and relativeURI='/images/_c60b27.gif'
 StandardContext[/residential]:   Trying exact match
 StandardContext[/residential]:   Trying prefix match
 StandardContext[/residential]:   Trying extension match
 
 Unexpected Signal : 11 occurred at PC=0x3981797C
 Function=[Unknown.]
 Library=(N/A)
 
 NOTE: We are unable to locate the function name symbol for the error
   just occurred. Please refer to release documentation for possible
   reason and solutions.
 
 
 Current Java thread:
 
 Dynamic libraries:
 0x1  /SunQA/youraccount/j2sdk1.4.1_01/bin/sparcv9/java
 0x7f20  /usr/lib/64/libthread.so.1
 0x7f40  /usr/lib/64/libdl.so.1
 0x7ef0  /usr/lib/64/libc.so.1
 0x7ed0  /usr/platform/SUNW,Ultra-4/lib/sparcv9/libc_psr.so.1
 0x7d00  /SunQA/youraccount/j2sdk1.4.1_01/jre/lib/sparcv9/server/libjvm.so

Re: Mod_jk is not compatible this version of apache

2002-12-11 Thread Ben Ricker
Have you tried compiling your own connector from source? 

HTH,

Ben Ricker

On Wed, 2002-12-11 at 12:56, R. C. Hill wrote:
 Has anyone found a solution to this problem. I'm in the same boat and need 
 of a solution...thanks.
 
 -R
 
 From: John B. Moore [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Mod_jk is not compatible this version of apache
 Date: Sat, 07 Dec 2002 14:47:25 -0800
 
 Versions
 Apache  httpd-2.0.40
 Tomcat 4.1.12
 
 OS
  Readhat 8 with latest kernal
 
   I had compile Apache and it runs just fine, Tomcat also runs find 
 independently
 
I then downloaded  the connectors for 4.1.12 and followed the John 
 Turner directions for compiling the mod_jk... and copied to the ../modules 
 directory and updated the server.xml with the
 auto config.. check that the /auto/mod_jk.conf was being written and that 
 it contained the correct path to the mod_jk.so module and matches the 
 include in the httpd.conf file.
 
Sadly I'm getting the error message
 
 httpd: module mod_jk.so is not compatible with this version of 
 apache..
 
 Anyone with some suggestions on where I need to look next... I'm 
 stumped..
 
  John..
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 _
 Add photos to your messages with MSN 8. Get 2 months FREE*. 
 http://join.msn.com/?page=features/featuredemail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Apache-Tomcat mod_jk

2002-12-12 Thread Ben Ricker
You seem to be confused here. I believe you said you were accessing port
8080 when it was working. Now, unless you setup Apache to listen on port
8080, you were talking directly to Tomcat's web server. Now that you
have moved to Apache, you want to drop the 8080 and use port 80, which
Apache listens to by default (again, unless you changed it).

I would suggest that you post all the lines you added to httpd.conf,
your workers.properties conf file, and your server.xml file. 

The JkMount directive tells Apache what path gets mapped to Tomcat; see
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for
more information about the directive.

HTH,

Ben Ricker

On Thu, 2002-12-12 at 10:41, Denise Mangano wrote:
 I do have a workers.properties file.  I checked that, my server.xml, and my
 httpd.conf and all server names are the same.  
 
 I thought the mod_jk.conf file took care of the LoadModule directive that I
 would have had to place in my httpd.conf file.  I tried searching for info
 on the JkMount directive but could not find any.  Do I place JkMount
 path/to/modules/mod_jk-1.3-eapi.so?  And where would I place that in the
 httpd.conf file?  I just don't get why it was working before, but now it
 isn't
 
 Thanks again.
 
 Denise Mangano
 Help Desk Analyst
 Complus Data Innovations, Inc.
 
 
 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, December 12, 2002 10:52 AM
 To: 'Tomcat Users List'
 Subject: RE: Apache-Tomcat mod_jk
 
 
 
 Do you have a workers.properties file?  Creating one is explained in my
 HOWTO...JK needs one to understand how to get to Tomcat.
 
 Do you have the JkMount statements in httpd.conf?  Apache needs those to
 understand what to send to JK.
 
 John
 
 
  -Original Message-
  From: Denise Mangano [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 12, 2002 10:38 AM
  To: 'Tomcat Users List'
  Subject: RE: Apache-Tomcat mod_jk
  
  
  Thank you very much for your help.  The instructions were easy enough 
  to follow, with a few exceptions.  I downloaded the
  mod_jk-1.3-eapi.so because
  as per the site, that was the module to use if I am running 
  Apache 1.3 with
  mod_ssl.  After doing all the steps I tried to restart Apache 
  and got the
  following error message:
  
  Starting httpd: Syntax error on line 4 of
  /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf:
  Cannot load /etc/httpd/libexec/mod_jk.so into server:
  /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such 
  file or directory
  
  I changed the path in the mod_jk.conf file to  LoadModule jk_module
  /the/exact/path/to/mod_jk-1.3-eapi.so
  
  When I tried to restart Apache it restarted no problem.  But now I 
  cannot get to http://localhost:8080 when before I could.
  (http://localhost still
  works though)  Any thoughts?  In the meantime I am going back 
  to double
  check everything.
  
  Denise Mangano
  Help Desk Analyst
  Complus Data Innovations, Inc.
  
  
  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 12, 2002 9:14 AM
  To: 'Tomcat Users List'
  Subject: RE: Apache-Tomcat HOWTO
  
  
  
  #1: Yes.
  
  #2: No. :)
  
  You don't need ant.  When I originally wrote the HOWTO, I thought you 
  did, so I hacked through getting it to work and put that in my
  HOWTO.  Then,
  based on a tip from someone on the list I learned that I 
  didn't need to go
  through all that, all I needed to do was follow connector 
  build option #2,
  which is using the standard ./configure method.
  
  So, basically, if you want to build the connector from source, all you 
  have to do is (assuming a GNU-ready build environment):
  
  NOTE: the ./configure method assumes you have a sane build
  environment:
  libtool, GNU make, autoconf, m4
  
  a) cd to CONNECTOR_HOME/jk/native.
  
  b) check README and README.configure.
  
  c) run buildconf.sh: ./buildconf.sh. This will create a file called
  configure in CONNECTOR_HOME/jk/native.
  
  d) run configure: ./configure 
  --with-apxs=/some/path/to/apache/bin/apxs
  --with-java-home=${JAVA_HOME}
  
  e) run make: make
  
  g) You should end up with a mod_jk.so file in
  CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to 
  /path/to/apache/libexec/.
  
  John
  
  
   -Original Message-
   From: Denise Mangano [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, December 12, 2002 9:04 AM
   To: 'Tomcat Users List'
   Subject: Apache-Tomcat HOWTO
   
   
   Another trivial question... I am looking at John Turner's
  how-to's for
   setting up Apache 1.3.26 + Tomcat 4.0.4.  There was a post
  that when
   reading the how-to's version numbers are not that critical.
  Will this
   document help
   me for my Apache 1.3.27/Tomcat 4.1.12 set up?  If so, then does that 
   mean I have to install ant?
   
   Thanks!
   
   Denise Mangano
   Complus Data Innovations, Inc.
   
   --
   To unsubscribe, e-mail:   
   mailto:[EMAIL

RE: Apache-Tomcat mod_jk

2002-12-12 Thread Ben Ricker
I pasted before I read the link below...that how-to is for 3.2. The one
for 4.x is at
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html.

Another good How-to that I used to setup a load-balanced
Apache-mod_jk-Tomcat 4.0.6 setup is at http://www.ubeans.com/tomcat/.

Good luck,

Ben Ricker

On Thu, 2002-12-12 at 10:44, Ben Ricker wrote:
 You seem to be confused here. I believe you said you were accessing port
 8080 when it was working. Now, unless you setup Apache to listen on port
 8080, you were talking directly to Tomcat's web server. Now that you
 have moved to Apache, you want to drop the 8080 and use port 80, which
 Apache listens to by default (again, unless you changed it).
 
 I would suggest that you post all the lines you added to httpd.conf,
 your workers.properties conf file, and your server.xml file. 
 
 The JkMount directive tells Apache what path gets mapped to Tomcat; see
 http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for
 more information about the directive.
 
 HTH,
 
 Ben Ricker
 
 On Thu, 2002-12-12 at 10:41, Denise Mangano wrote:
  I do have a workers.properties file.  I checked that, my server.xml, and my
  httpd.conf and all server names are the same.  
  
  I thought the mod_jk.conf file took care of the LoadModule directive that I
  would have had to place in my httpd.conf file.  I tried searching for info
  on the JkMount directive but could not find any.  Do I place JkMount
  path/to/modules/mod_jk-1.3-eapi.so?  And where would I place that in the
  httpd.conf file?  I just don't get why it was working before, but now it
  isn't
  
  Thanks again.
  
  Denise Mangano
  Help Desk Analyst
  Complus Data Innovations, Inc.
  
  
  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, December 12, 2002 10:52 AM
  To: 'Tomcat Users List'
  Subject: RE: Apache-Tomcat mod_jk
  
  
  
  Do you have a workers.properties file?  Creating one is explained in my
  HOWTO...JK needs one to understand how to get to Tomcat.
  
  Do you have the JkMount statements in httpd.conf?  Apache needs those to
  understand what to send to JK.
  
  John
  
  
   -Original Message-
   From: Denise Mangano [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, December 12, 2002 10:38 AM
   To: 'Tomcat Users List'
   Subject: RE: Apache-Tomcat mod_jk
   
   
   Thank you very much for your help.  The instructions were easy enough 
   to follow, with a few exceptions.  I downloaded the
   mod_jk-1.3-eapi.so because
   as per the site, that was the module to use if I am running 
   Apache 1.3 with
   mod_ssl.  After doing all the steps I tried to restart Apache 
   and got the
   following error message:
   
   Starting httpd: Syntax error on line 4 of
   /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf:
   Cannot load /etc/httpd/libexec/mod_jk.so into server:
   /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such 
   file or directory
   
   I changed the path in the mod_jk.conf file to  LoadModule jk_module
   /the/exact/path/to/mod_jk-1.3-eapi.so
   
   When I tried to restart Apache it restarted no problem.  But now I 
   cannot get to http://localhost:8080 when before I could.
   (http://localhost still
   works though)  Any thoughts?  In the meantime I am going back 
   to double
   check everything.
   
   Denise Mangano
   Help Desk Analyst
   Complus Data Innovations, Inc.
   
   
   -Original Message-
   From: Turner, John [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, December 12, 2002 9:14 AM
   To: 'Tomcat Users List'
   Subject: RE: Apache-Tomcat HOWTO
   
   
   
   #1: Yes.
   
   #2: No. :)
   
   You don't need ant.  When I originally wrote the HOWTO, I thought you 
   did, so I hacked through getting it to work and put that in my
   HOWTO.  Then,
   based on a tip from someone on the list I learned that I 
   didn't need to go
   through all that, all I needed to do was follow connector 
   build option #2,
   which is using the standard ./configure method.
   
   So, basically, if you want to build the connector from source, all you 
   have to do is (assuming a GNU-ready build environment):
   
   NOTE: the ./configure method assumes you have a sane build
   environment:
   libtool, GNU make, autoconf, m4
   
   a) cd to CONNECTOR_HOME/jk/native.
   
   b) check README and README.configure.
   
   c) run buildconf.sh: ./buildconf.sh. This will create a file called
   configure in CONNECTOR_HOME/jk/native.
   
   d) run configure: ./configure 
   --with-apxs=/some/path/to/apache/bin/apxs
   --with-java-home=${JAVA_HOME}
   
   e) run make: make
   
   g) You should end up with a mod_jk.so file in
   CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to 
   /path/to/apache/libexec/.
   
   John
   
   
-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 9:04 AM
To: 'Tomcat Users List'
Subject: Apache-Tomcat

RE: Apache-Tomcat mod_jk

2002-12-12 Thread Ben Ricker
On Thu, 2002-12-12 at 11:07, Denise Mangano wrote:
 I think I am  confused : ) I originally set up my website in Apache, and it
 is listening to port 80.  I could access my website through
 http://localhost.  I installed Tomcat (did not make any config changes).
 After the installation I still had access to http://localhost and to
 Tomcat's index page at http://localhost:8080.  (At that point I could also
 access http://localhost:8080/examples/jsp/index.html.  Now I still can
 access http://localhost but I can NOTaccess http://localhost:8080.  Nor can
 I access the examples directory through either.  I have made no port
 changes.
 
 The only change I made to the httpd.conf file was to add, at the very end,
 Include /usr/local/tomcat/conf/jk/mod_jk.conf  (I changed a path to my
 mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf
 file to the jk directory and pointed there (read that in another how-to)).
 I have ServerName defined as www.mydomain.com

Therein lies the problem: You must tell Apache, through the JkMount
mentioned earlier, what paths will get mapped to Tomcat. For example, to
run the examples through port 80 (and Apache), you would use the
following:

JkMount /examples/servlet/* ajp13
JkMount /examples/*.jsp ajp13

This will cause mod_jk to intercept requests for /examples/servlets and
/examples/*.jsp and send the request to the worker called ajp13 and
setup in your workers.properties file.

If you have another web app you want to use (I use /servlets for my
setup, just use the JkMount for the path and the worker. For example:

JkMount /path/you/want ajp13

Hth,

Ben Ricker 


 In my server.xml file:
 Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig /
 
 Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true
 autoDeploy=true
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true forwardAll=false /
 
 workers.properties:
 # BEGIN workers.properties
 #
 # Setup for apache system
 #
 # (optional) make this equal to CATALINA_HOME
 workers.tomcat_home=/var/jakarta-tomcat-4.1.12
 #
 # (optional) make this equal to JAVA_HOME
 workers.java_home=/usr/local/j2sdk1.4.1
 #
 ps=/
 worker.list=ajp13
 
 # Definition for Ajp13 worker
 #
 worker.ajp13.port=8009
 
 # change this line to match apache ServerName and Host name in server.xml
 worker.ajp13.host=www.parkingticketpayment.com
 
 worker.ajp13.type=ajp13
 #
 # END workers.properties
 
 I think I did everything right
 
 Denise Mangano
 Help Desk Analyst
 Complus Data Innovations, Inc.
 
 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, December 12, 2002 11:44 AM
 To: 'Tomcat Users List'
 Subject: RE: Apache-Tomcat mod_jk
 
 
 You seem to be confused here. I believe you said you were accessing port
 8080 when it was working. Now, unless you setup Apache to listen on port
 8080, you were talking directly to Tomcat's web server. Now that you have
 moved to Apache, you want to drop the 8080 and use port 80, which Apache
 listens to by default (again, unless you changed it).
 
 I would suggest that you post all the lines you added to httpd.conf, your
 workers.properties conf file, and your server.xml file. 
 
 The JkMount directive tells Apache what path gets mapped to Tomcat; see
 http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more
 information about the directive.
 
 HTH,
 
 Ben Ricker
 
 On Thu, 2002-12-12 at 10:41, Denise Mangano wrote:
  I do have a workers.properties file.  I checked that, my server.xml, 
  and my httpd.conf and all server names are the same.
  
  I thought the mod_jk.conf file took care of the LoadModule directive 
  that I would have had to place in my httpd.conf file.  I tried 
  searching for info on the JkMount directive but could not find any.  
  Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so?  And where 
  would I place that in the httpd.conf file?  I just don't get why it 
  was working before, but now it isn't
  
  Thanks again.
  
  Denise Mangano
  Help Desk Analyst
  Complus Data Innovations, Inc.
  
  
  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 12, 2002 10:52 AM
  To: 'Tomcat Users List'
  Subject: RE: Apache-Tomcat mod_jk
  
  
  
  Do you have a workers.properties file?  Creating one is explained in 
  my HOWTO...JK needs one to understand how to get to Tomcat.
  
  Do you have the JkMount statements in httpd.conf?  Apache needs those 
  to understand what to send to JK.
  
  John
  
  
   -Original Message-
   From: Denise Mangano [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, December 12, 2002 10:38 AM
   To: 'Tomcat Users List'
   Subject: RE: Apache-Tomcat mod_jk
   
   
   Thank you very much for your help.  The instructions were easy 
   enough
   to follow, with a few exceptions.  I downloaded the
   mod_jk-1.3-eapi.so because
   as per the site

Re: Connecting Tomcat 4.1.12 with Apache 1.3

2002-12-13 Thread Ben Ricker
On Fri, 2002-12-13 at 12:16, Jerry Ford wrote:
 John:
 
 I added the listener statements to server.xml.
 
 mod_jk.conf shows  Location  entries for each of the webapps, and 
 there is a JkMount entry for the servlets (including my HelloWorld entry).
 
 mod_jk.log is empty.

Do you see that mod_jk is being loaded by Apache when you start it or in
Apache's error_log?  I see the following when I start Apache:

Apache/1.3.26 (Unix) mod_jk/1.2.0 configured -- resuming normal
operations

I also will assume that you have the 'Include' statement in the
httpd.conf for mod_jk.properties (as well as the LoadModule/AddModule
directives for mod_jk.so).

You might also want to bump the 'JkLogLevel' in your mod_jk.properties
to get the debug level to get some feedback on what is going on.

Hth,

Ben Ricker

 What more do I need to do?
 
 Thanks, Jerry
 
 Turner, John wrote:
 
 Mod_webapp is deprecated, and has some fairly serious limitations.
 
 JK/JK2 is the better choice if you are concerned with future growth.
 
 If you're having problems, perhaps my HOWTOs will help:
 
 http://www.johnturner.com/howto
 
 John
 
 -Original Message-
 From: Jerry Ford [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, December 11, 2002 3:15 PM
 To: Tomcat Users List
 Subject: Re: Connecting Tomcat 4.1.12 with Apache 1.3
 
 Denise:
 
 I have just got my Apache 1.3.27/Tomcat 4.1.12 connection to work.
 
 Answers to your questions are yes, and yes.  You need a connector 
 between them, and mod_jk.so is one such connector.
 
 However, I had a devil of a time locating any connector on the 
 apache.org website, and I never was able to make mod_jk work (I tried 
 using the version that did work with my Tomcat 3.2 installation, but it 
 did not work with 4.1 and I was not able to locate mod_jk---any 
 version---on the apache website in order to rebuild).
 
 I ended up using mod_webapp.so, which is another connector.
 
 It's located in the jakarta-tomcat-connectors-4.1.12-src.tar.gz, which 
 you can download from 
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.12/src/
 (the same directory as tomcat itself).
 
 When you unpack it, look for README.txt in the webapp directory. It will 
 tell you how to build the connector from CVS.  Follow the directions in 
 the readme.  They're clear, straightforward, and the build process was 
 smooth and routine, for me at least.  
 
 Jerry
 
  
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.12/src/jak
 arta-tomcat-connectors-4.1.12-src.tar.gz
 
 
 
 Denise Mangano wrote:
 
   
 
 Hi all,
 
 I am fairly new to using Apache / Tomcat. I currently have my website set
 
 
 up
   
 
 in Apache, running in the /var/html directory. I have installed Tomcat
 because I have a form page (HTML) that I want to run a servlet with to
 process a credit card payment with an outside payment processor. I have
 
 
 seen
   
 
 some instances that people have stated I have to do some special
 configuration in order to use both Apache and Tomcat together. Is this so?
 If so, then are there any good resources for this?
 
 Perhaps using JSP for the form will be better because I want a custom page
 to display depending on what error message will come back from the payment
 engine.  If that is the case then wouldn't I need the connection between
 Apache and Tomcat? (the images I will need for the JSP page is stored in
 apache web directory as well).  Is this the mod_jk plug in? (I am running
 RedHat Linux 7.3)
 
 Thanks in advance!
 
 Denise Mangano
 Help Desk Analyst
 Complus Data Innovations, Inc.
 
 
 --
 To unsubscribe, e-mail:
 
 
 mailto:[EMAIL PROTECTED]
   
 
 For additional commands, e-mail:
 
 
 mailto:[EMAIL PROTECTED]
   
 
  
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002
  
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002
  
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
   
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Sharing Session data between two instances?

2002-12-16 Thread Ben Ricker
Try seaarching the archives. This question has been answered many times
before. You can search them here:

http://mikal.org/interests/java/tomcat/index.jsp

And for an answer to your question, you are looking for in session
replication. See:

http://www2.theserverside.com/resources/article.jsp?l=Tomcat

Ben Ricker

On Mon, 2002-12-16 at 09:32, Puneet Agarwal wrote:
 Even I want to do the same and am looking for the answer whether it is possible or 
not.
 
 I posted same question 2-3 times in last week and have been monitoring this mail 
list but noone has replied.
 
 The much I could  gather is, it is not possible directly, It could be possible if we 
use apache and multiple instances of tomcat. The rest we may have to write our own 
code to achieve this.
 
 Could someone answer this please...!
 
 Regards
 Puneet
 
 
 - Original Message -
 From: Prashanth Pushpagiri [EMAIL PROTECTED]
 Date: Sun, 15 Dec 2002 10:57:09 -0800 (PST)
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Sharing Session data between two instances?
 
  Hi
  
  I am trying to setup tomcat 4.1.12 on two servers so
  that an incoming request can be handled by either one
  of the servers. What I would like to do is share
  session details between the two instances. Is this
  possible?
  
  Thanks
  Prashanth
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
  http://mailplus.yahoo.com
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
  
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: app roll out.

2002-12-16 Thread Ben Ricker
This would be done by Apache (though it could possibly be done by
Tomcat; I use Apache). You can do it one of two ways:

1) Use mod_rewrite to rewrite /index.html to /path-to-context-name.
Not sure on the mechanics of this. Try the Apache list for pointers, or
any number of tutotials on mod_rewrite.

2) Use the 'Redirect' directive in Apache. This is what I use and has
worked for 2 years. Basically, you stick a line in your httpd.conf which
goes:

Redirect temp www.domain.com www.domain.com/path-to-context

Hth,

Ben Ricker


On Mon, 2002-12-16 at 15:28, Alexander Wallace wrote:
 Hi there. Almost ready to deploy my app to test in real world.  I'm using 
 apache + tomcat (using mod_jk).  My app name is wxyz, and I have purchased 
 the domain name i want it to be under. I want to call www.mydomain.com and 
 get my app's index. instead of typing the www.mydomain.com/wxyz.
 
 How can i do that? Can someone, if not tell me how, tell me where to read to 
 learn how to do it?
 
 Sorry about the newbienezz of the email. I know nothing about this things. 
 
 Thanks!
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: app roll out.

2002-12-17 Thread Ben Ricker
Here is the line that workd for me in Apache 1.3.27 Are you using Apache
2.x?

Redirect temp /index.html http://main.wellinx.com/servlets/Logon?STATE=0USER=doctor

The '/' by itself may not work. When I set it up, I had to include the
'index.html'. But I do not remember because I set it up so long ago.

Ben Ricker


On Mon, 2002-12-16 at 18:40, Alexander Wallace wrote:
 Adding a line like the one you suggest doesn't seem to work... People at 
 apache's irc said it should be something like:
 
 Redirect / http://www.domain.com/context
 
 But that only seems to create infinite redirects since it redirects to the 
 same domain name.
 
 The docs say that redirect takes a URI and then a URL.
 
 Could you check your config files and paste one line here? Just to make sure 
 the syntax is correct?
 
 Thanks!
 
 On Monday 16 December 2002 15:42, Ben Ricker wrote:
 
  Redirect temp www.domain.com www.domain.com/path-to-context
 
  Hth,
 
  Ben Ricker
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: app roll out.

2002-12-17 Thread Ben Ricker
On Mon, 2002-12-16 at 18:51, Alexander Wallace wrote:
 The line:
 
 RedirectMatch ^/$ http://mysite/theContext
 
 did the trick.
 
 Now I have to find out how to make apache call index.jsp automatically if no 
 page is requested.  If i use http://localhost:8080/myapp tomcat calls 
 index.jsp automatically, but when going through apache 
 (http://localhost/myapp) apache doesn't load the index.jsp.  
 
 How can i make it load index.jsp automatically?

You need to add the index.jsp to the possible DirectoryIndex
directive. For example:

#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
DirectoryIndex index.html index.jsp
/IfModule

If you call a URL without a file spec, Apache will try all the files in
the DirectoryIndex directive utnil it his one.

Ben Ricker

 Thanks again!
 
 On Monday 16 December 2002 15:42, Ben Ricker wrote:
  This would be done by Apache (though it could possibly be done by
  Tomcat; I use Apache). You can do it one of two ways:
 
  1) Use mod_rewrite to rewrite /index.html to /path-to-context-name.
  Not sure on the mechanics of this. Try the Apache list for pointers, or
  any number of tutotials on mod_rewrite.
 
  2) Use the 'Redirect' directive in Apache. This is what I use and has
  worked for 2 years. Basically, you stick a line in your httpd.conf which
  goes:
 
  Redirect temp www.domain.com www.domain.com/path-to-context
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: [OFF-TOPIC] RE: Naïve question about root

2002-12-18 Thread Ben Ricker
On Wed, 2002-12-18 at 12:26, Matt Harris wrote:
 Apache normally runs multiple processes to handle multiple simoultaneous
 user requests.  This can be configured in your httpd.conf.  Tomcat runs
 multiple processes, which it calls workers.  Since tomcat is in java
 and not a truly binary-compiled language (like C or C++) it runs under
 java which is part of your JRE (java runtime environment).  


Another small tidbit: Linux's 'ps' command shows threads as processes.
Apache runs multiple processes, but Java runs one processes with
multiple threads. Can't remember why Linux does that...

Anyway, we run our Tomcats on Solaris and there is only one java process
per Tomcat instance listed in 'ps'.

Ben Ricker

 Denise Mangano wrote:
  
  Hi all,  I followed everyone's suggestions and so far so good.  I set up the
  users like John suggested, and disable the desktop environment like Matt
  suggested.  I disabled this service by changing my run level to 3.  I now
  have to get Tomcat back into the startup...  For now I have started it
  manually.  But here is the weird thing...
  
  Why so many processes running for Apache, and java (below)...  I ran ps -ef
  after reboot and before I started Tomcat and the java processes were not
  listed.  Is this normal?  Also, how change the java processes from running
  as root (if I need to)?  And lastly, which one of these is supposed to
  represent the Tomcat service running?
  
  John - any word on that new HOW-To yet for 4.1.17?  I'm going to get
  cracking on that in a little bit :)
  
  Thanks in advance for any thoughts/advice!! : )
  Denise
  
  UIDPID  PPID  C STIME TTY  TIME CMD
  root 1 0  0 11:37 ?00:00:04 init
  root 2 1  0 11:37 ?00:00:00 [keventd]
  root 3 1  0 11:37 ?00:00:00 [ksoftirqd_CPU0]
  root 4 1  0 11:37 ?00:00:00 [kswapd]
  root 5 1  0 11:37 ?00:00:00 [bdflush]
  root 6 1  0 11:37 ?00:00:00 [kupdated]
  root 7 1  0 11:37 ?00:00:00 [mdrecoveryd]
  root13 1  0 11:37 ?00:00:00 [scsi_eh_0]
  root14 1  0 11:37 ?00:00:00 [scsi_eh_1]
  root17 1  0 11:38 ?00:00:00 [kjournald]
  root96 1  0 11:38 ?00:00:00 [khubd]
  root   190 1  0 11:38 ?00:00:00 [kjournald]
  root   191 1  0 11:38 ?00:00:00 [kjournald]
  root   192 1  0 11:38 ?00:00:00 [kjournald]
  root   193 1  0 11:38 ?00:00:00 [kjournald]
  root   559 1  0 11:38 ?00:00:00 syslogd -m 0
  root   564 1  0 11:38 ?00:00:00 klogd -x
  rpc584 1  0 11:38 ?00:00:00 portmap
  rpcuser612 1  0 11:38 ?00:00:00 rpc.statd
  root   762 1  0 11:38 ?00:00:00 /usr/sbin/sshd
  root   795 1  0 11:38 ?00:00:00 xinetd -stayalive -reuse
  -pidfil
  root   823 1  0 11:38 ?00:00:00 sendmail: accepting
  connections
  root   842 1  0 11:38 ?00:00:00 gpm -t ps/2 -m /dev/mouse
  root   865 1  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 868   865  0 11:38 ?00:00:00 /usr/sbin/fcgi-
  -DHAVE_ACCESS -D
  apache 870   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 871   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 872   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 874   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 875   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 876   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 877   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  apache 879   865  0 11:38 ?00:00:00 /usr/sbin/httpd
  -DHAVE_ACCESS -D
  root   892 1  0 11:38 ?00:00:00 crond
  xfs946 1  0 11:38 ?00:00:00 xfs -droppriv -daemon
  daemon 982 1  0 11:38 ?00:00:00 /usr/sbin/atd
  root   991 1  0 11:38 tty1 00:00:00 /sbin/mingetty tty1
  root   992 1  0 11:38 tty2 00:00:00 /sbin/mingetty tty2
  root   993 1  0 11:38 tty3 00:00:00 /sbin/mingetty tty3
  root   994 1  0 11:38 tty4 00:00:00 /sbin/mingetty tty4
  root   995 1  0 11:38 tty5 00:00:00 /sbin/mingetty tty5
  root   996 1  0 11:38 tty6 00:00:00 /sbin/mingetty tty6
  root   999   762  0 11:39 ?00:00:00 /usr/sbin/sshd
  weblogin  1000   999  0 11:39 pts/000:00:00 -bash
  root  1117 1 32 11:55 pts/000:00:06
  /usr/local/j2sdk1.4.1/bin/java -
  root  1118  1117  0 11:55 pts/000:00:00
  /usr/local/j2sdk1.4.1/bin/java -
  root  1119  1118  4 11:55 pts/000:00:00
  /usr/local/j2sdk1.4.1/bin/java -
  root  1120  1118  0

Latest stable version?

2002-12-18 Thread Ben Ricker
I am running Tomcat 4.0.6 in a production environment right now. I want
to move to 4.1.x. I hear about 4.1.17. Is this considered production
stable? It is probably MORE stable then 4.1.16, from what I have heard.

However, the Jakarta site shows 4.1.12 as the stable branch of 4.1.x,
but that has been that way for a long time. Is there going to be an
increment soon to the stable branch?

Thanks,

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Latest stable version?

2002-12-18 Thread Ben Ricker
On Wed, 2002-12-18 at 14:47, [EMAIL PROTECTED] wrote:
 Jakarta site says 4.1.17 is the latest stable version and not 4.1.12!
 
 Ganesh

Damn! You are right...where in hell was I when I saw 1.1.12

Thanks!

Ben Ricker


 
  

 Ben Ricker 

 [EMAIL PROTECTED]

  

  To: Tomcat Users List 

 18-Dec-2002 15:43

 Please respond tocc: 

 Tomcat Users List  Subject: Latest stable version? 

 [EMAIL PROTECTED]   

 pache.org   

  

  

 
 
 
 I am running Tomcat 4.0.6 in a production environment right now. I want
 to move to 4.1.x. I hear about 4.1.17. Is this considered production
 stable? It is probably MORE stable then 4.1.16, from what I have heard.
 
 However, the Jakarta site shows 4.1.12 as the stable branch of 4.1.x,
 but that has been that way for a long time. Is there going to be an
 increment soon to the stable branch?
 
 Thanks,
 
 Ben Ricker
 
 --
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




JAVA_HOME problem with 4.1.18

2002-12-20 Thread Ben Ricker
I have this weird problem with setting the JAVA_HOME env variable in
Tomcat 4.1.18 (I also had it in 4.1.17).

Here is the lines from my startup.sh:

CATALINA_HOME=/usr/local/tomcat1-new
JAVA_HOME=/usr/local/j2re1.4.1_01
JAVA_OPTS=-ms32m -mx200m
export CATALINA_HOME JAVA_HOME JAVA_OPTS

This setup worked in 4.1.12 and 4.0.6. Now, when I start Tomcat using
the startup.sh, I get this:

[root@dev bin]# ./startup.sh
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program

What gives?

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Mod_jk/Tomcat issue?

2002-12-23 Thread Ben Ricker
We saw a strange production issue this morning that seems to be related
to Apache/mod_jk but I wanted to see if anyone can shed some lght on it.

First, the environment:

2 Redhat 7.3 Linux server talking to 2 Sun Solaris 8 Tomcat 4.0.6
servers. Each server has 2 separate Tomcat instances for a total of 4.
The Java uses Oracles JDBC drivers (not through Tomcat, but through a
custom connection pool) to talk to an Oracle DB runnin on AIX 4.x.

The first symptom was a huge spike in DB usage due to the creation of
around 35 pooled connections to the database, This led us to think
something happened on the database side, but it seems that the pool only
grew on one of the Tomcat instances; the other instances showed the
default pool size. The Oracle database did not show any locked tables or
huge, hanging queries. 

The only problems I see in logs are related to mod_jk and Tomcat.

First in the Tomcat engine log,I see:

2002-12-23 09:07:14 Ajp13Connector[12009] No processor available, rejecting this 
connection

There are hundreds of these messages. Then I start seeing this message
in the engine log:

2002-12-23 09:07:28 Ajp13Processor[12009][18] process: invoke
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

About a minute after, in the mod_jk logs, I see:

[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (679)]: ajp_connection_tcp_get_message: 
Error - jk_tcp_socket_recvfull failed
[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (1041)]: Error reading reply
[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (1178)]: In jk_endpoint_t::service, 
ajp_get_reply failed in send loop 0

This goes on for about 20 seconds before I see a huge number of the
following:

[Mon Dec 23 09:08:49 2002]  [jk_ajp_common.c (961)]: Error ajp_process_callback - 
write failed

I am at a loss at what might cause this. Could it be related to
soemthing in Tomcat? What exactly does this sequence of events tell me?

Any light one can shed would be greatly appreciated.

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Urgent - Issue with Tomcat/mod_jk?

2002-12-23 Thread Ben Ricker
I posted a message earlier which has not received any replies so I will
try another tact. The earlier mail is posted below this one.

I have a production issue that has arisen in a setup of two Apache
1.3.27/Redhat 7.3 servers load-balanced across 4 Tomcat 4.0.6/Sun
Solaris servers. Tomcat is running with Sun's 1.3 JVM.

We have gotten a lot of the following errors in the engine log for
Tomcat:

2002-12-23 15:21:56 Ajp13Processor[12009][16] process: invoke
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

We have also gotten calls from customers saying they are getting hanging
screens in our application. We see no anomolies on out database,
although earlier we did.

Can anyone tell me what the error above is saying? Is it not able to
write to the mod_jk? It looks like it is failing in some sort of closing
routine (org.apache.ajp.tomcat4.Ajp13Response.finishResponse). Could
this be a protocol issue?

I am getting heat from my bosses on this one and I need to say
SOMETHING! Please help if you can give me any clues or suggest
possibilities.

Thanks,

Ben Ricker


-Earlier Post-
We saw a strange production issue this morning that seems to be related
to Apache/mod_jk but I wanted to see if anyone can shed some lght on it.

First, the environment:

2 Redhat 7.3 Linux server talking to 2 Sun Solaris 8 Tomcat 4.0.6
servers. Each server has 2 separate Tomcat instances for a total of 4.
The Java uses Oracles JDBC drivers (not through Tomcat, but through a
custom connection pool) to talk to an Oracle DB runnin on AIX 4.x.

The first symptom was a huge spike in DB usage due to the creation of
around 35 pooled connections to the database, This led us to think
something happened on the database side, but it seems that the pool only
grew on one of the Tomcat instances; the other instances showed the
default pool size. The Oracle database did not show any locked tables or
huge, hanging queries. 

The only problems I see in logs are related to mod_jk and Tomcat.

First in the Tomcat engine log,I see:

2002-12-23 09:07:14 Ajp13Connector[12009] No processor available, rejecting this 
connection

There are hundreds of these messages. Then I start seeing this message
in the engine log:

2002-12-23 09:07:28 Ajp13Processor[12009][18] process: invoke
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

About a minute after, in the mod_jk logs, I see:

[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (679)]: ajp_connection_tcp_get_message: 
Error - jk_tcp_socket_recvfull failed
[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (1041)]: Error reading reply
[Mon Dec 23 09:08:29 2002]  [jk_ajp_common.c (1178)]: In jk_endpoint_t::service, 
ajp_get_reply failed in send loop 0

This goes on for about 20 seconds before I see a huge number of the
following:

[Mon Dec 23 09:08:49 2002]  [jk_ajp_common.c (961)]: Error ajp_process_callback - 
write failed

I am at a loss at what might cause this. Could it be related to
soemthing in Tomcat? What exactly does this sequence of events tell me?

Any light one can shed would be greatly appreciated.

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Urgent - Issue with Tomcat/mod_jk?

2002-12-23 Thread Ben Ricker
I had suspected that in the problem earlier in the day (the part of the
email I posted at the end if the last email you replied to). However,
what did not make sense was the connection pool woth the database also
going up.

If I understand the stuff below, after 85 concurrent connections (max
connections + accept count) I would start getting the Out of
Processors error. However, I cannot see how this would cause the
DATABASE connection pool to grow as large as it did (we usually handle
50k connections a business day with 5 pooled connections; during the
earlier problem, the database connections went to *30*, our maximum).

Additionally, why would we contine to get the following error:

2002-12-23 09:07:28 Ajp13Processor[12009][18] process: invoke
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)
 
without seeing the Out of Processor msgs? 

I may be looking at two independent problems: one a scalability issue
with the ajp13 processors (which are at the ddefault setting, btw) and
some other issue I am in the dark about.

Anyway, these questions are rhetorical. Thanks for the reply and do not
feel obliged to answer back. I need to start putting pressure on the
developers to help me out here.

Thanks again,

Ben Ricker

On Mon, 2002-12-23 at 16:07, Mark Eggers wrote:
 Ben,
 
 Disclaimer:
 
 I'm not a Tomcat developer, but I do use it to develop
 software and integrate applications.
 
 In $CATALINA_HOME/conf/server.xml you should see an
 entry similar to the following:
 
 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector 
  className=org.apache.ajp.tomcat4.Ajp13Connector
  port=8009
  minProcessors=5
  maxProcessors=75
  acceptCount=10 debug=0/
 
 I'm using 4.1.18, so your entry may be a bit
 different.  It looks like from your error messages
 that you may be running out of processors.
 
 The following information is taken from Tomcat's
 4.1.18 documentation.  If you have the documentation
 installed somewhere, the URL is:
 
 http://localhost/tomcat-docs/config/jk.html
 
 acceptCount:
 
 The maximum queue length for incoming connection
 requests when all possible request processing threads
 are in use. Any requests received when the queue is
 full will be refused. The default value is 10.
 
 maxProcessors:
 
 The maximum number of request processing threads to be
 created by this Connector, which therefore determines
 the maximum number of simultaneous requests that can
 be handled. If not specified, this attribute is set to
 20.
 
 NOTE:For Apache 1.3 on Unix there is a 1 to 1 mapping
 between httpd processes and Ajp13Processors. You must
 configure maxProcessors to be greater than or equal to
 the maximum number of httpd processes your Apache web
 server spawns.
 
 minProcessors:
 
 The number of request processing threads that will be
 created when this Connector is first started. This
 attribute should be set to a value smaller than that
 set for maxProcessors. The default value is 5.
 
 I hope this gets you started on a productive path.
 
 /mde/
 
 just my two cents . . . .
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Urgent - Issue with Tomcat/mod_jk?

2002-12-26 Thread Ben Ricker
I beleive we are dealing with a different problem. My app has been
running on Tomcat 4.0.6 for weeks until I had the problem recently.
There was no crash.

What happened was, it seems, a user REALLY fat-fingered the enter key or
some smart person sent the same request to the server 180 times within
one minute. I traced back through my access logs for Apache and caught
the massive number if requests for one URL at the same time I had the
problem.

All of these requests overwhelmed the number of AJP13 processors I had
configured (well, they are still at the default setting) and also caused
a massive opening of database connections.

Anyway, as to your problem: You may not have enough memory setup for
your JVM. Do you send amx -Xm and -Xs parameters to Tomcat using
JAVA_OPTS? You may be getting more load then Tomcat can handle due to a
RAM constraint.

Ben Ricker


On Tue, 2002-12-24 at 13:39, Venkat Reddy Valluri wrote:
 Hi ,
Even I too getting the same problem(lots of broken pipe errors )with catalina 
4.0.4(redhat 7.3, j2sdk1.4.1) connecting  apache 2.0.40(redat 7.3) on diffrenet 
machine with mod_jk,
  But what happened is after it ran for cuople of hours, tomcat crases,
  giving kernel out of memory error in syslog messages 
 
 Did you get any workaround for this
 Thks,
 --Venkat
   
 
 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Mon 12/23/2002 5:49 PM
 To:   Tomcat Users List
 Cc:   
 Subject:  Re: Urgent - Issue with Tomcat/mod_jk?
 I had suspected that in the problem earlier in the day (the part of the
 email I posted at the end if the last email you replied to). However,
 what did not make sense was the connection pool woth the database also
 going up.
 
 If I understand the stuff below, after 85 concurrent connections (max
 connections + accept count) I would start getting the Out of
 Processors error. However, I cannot see how this would cause the
 DATABASE connection pool to grow as large as it did (we usually handle
 50k connections a business day with 5 pooled connections; during the
 earlier problem, the database connections went to *30*, our maximum).
 
 Additionally, why would we contine to get the following error:
 
 2002-12-23 09:07:28 Ajp13Processor[12009][18] process: invoke
 java.io.IOException: Broken pipe
 at java.net.SocketOutputStream.socketWrite(Native Method)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
 at org.apache.ajp.Ajp13.send(Ajp13.java:525)
 at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
 at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
 at 
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
 at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
 at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
 at java.lang.Thread.run(Thread.java:479)
  
 without seeing the Out of Processor msgs? 
 
 I may be looking at two independent problems: one a scalability issue
 with the ajp13 processors (which are at the ddefault setting, btw) and
 some other issue I am in the dark about.
 
 Anyway, these questions are rhetorical. Thanks for the reply and do not
 feel obliged to answer back. I need to start putting pressure on the
 developers to help me out here.
 
 Thanks again,
 
 Ben Ricker
 
 On Mon, 2002-12-23 at 16:07, Mark Eggers wrote:
  Ben,
  
  Disclaimer:
  
  I'm not a Tomcat developer, but I do use it to develop
  software and integrate applications.
  
  In $CATALINA_HOME/conf/server.xml you should see an
  entry similar to the following:
  
  !-- Define an AJP 1.3 Connector on port 8009 --
  Connector 
   className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009
   minProcessors=5
   maxProcessors=75
   acceptCount=10 debug=0/
  
  I'm using 4.1.18, so your entry may be a bit
  different.  It looks like from your error messages
  that you may be running out of processors.
  
  The following information is taken from Tomcat's
  4.1.18 documentation.  If you have the documentation
  installed somewhere, the URL is:
  
  http://localhost/tomcat-docs/config/jk.html
  
  acceptCount:
  
  The maximum queue length for incoming connection
  requests when all possible request processing threads
  are in use. Any requests received when the queue is
  full will be refused. The default value is 10.
  
  maxProcessors:
  
  The maximum number of request processing threads to be
  created by this Connector, which therefore determines
  the maximum number of simultaneous requests that can
  be handled. If not specified, this attribute is set to
  20.
  
  NOTE:For Apache 1.3 on Unix there is a 1 to 1 mapping
  between httpd processes and Ajp13Processors. You must
  configure maxProcessors to be greater than or equal to
  the maximum number of httpd processes your Apache web
  server spawns.
  
  minProcessors:
  
  The number of request processing

RE: running tomcat as a non-root user?

2002-12-30 Thread Ben Ricker
Additionally, you can add the su tomcat -c in a wrapper script that
calls the startup.sh file. Mine looks like this:

case $1 in
  start)
echo -n Starting Tomcat...
/bin/su tomcat -c /usr/local/tomcat1/bin/startup.sh 
/bin/su tomcat -c /usr/local/tomcat2/bin/startup.sh
;;

That way, you CAN use root (and a startup script) to start Tomcat and
still get the security benefits of running as an unpriveledged, locked
user.

Ben Ricker
Wellinx.com

On Mon, 2002-12-30 at 12:15, Turner, John wrote:
 assume a user named 'tomcat' already created, and a group named 'tomcat'
 already created.
  
 at a command prompt, as root:
 
 chown -R tomcat:tomcat $CATALINA_HOME
 su - tomcat
 $CATALINA_HOME/bin/startup.sh
 exit
 
 Note that if you are running Tomcat on port 80, it must run as root.  You
 shouldn't have to change the permissions on any of the Tomcat files from
 what they are in a default install...I never have.
 
 John
 
 
 
 -Original Message-
 From: waimun
 To: [EMAIL PROTECTED]
 Sent: 12/30/02 10:25 AM
 Subject: running tomcat as a non-root user?
 
 Hi,
 
 Has anybody tried running tomcat as a non-root user in Linux? If so, how
 do you proceed (ie. making script setuid doesn't work for me). Pls
 advice.
 
 Thanks alot!
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: running tomcat as a non-root user?

2003-01-02 Thread Ben Ricker
On Tue, 2002-12-31 at 18:13, waimun wrote:

 P.S. Btw, does anyone know is there a way where I could run w/o login/su'ing to 
normal user; ie as root, fire up startup.sh but processes created will be by owner of 
the tomcat files?

Just create a init-like script that calls the startup.sh using 'su'. The
line would read something like: 'su tomcat -c /path/to/startup.sh.
Then, you can run the init script as root and, well, use it as an init
script!

Ben Ricker
Wellinx.com

 On Wed, Jan 01, 2003 at 02:21:47AM +0530, karthikeyan.balasubramanian wrote:
  Hi can you tell what are all the steps you followed.
  
  Would be helpful for me in future when i do this.
  
  karthikeyan.
  - Original Message -
  From: waimun [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, December 31, 2002 8:41 AM
  Subject: Re: running tomcat as a non-root user?
  
  
  
   Thanks to all those who responded; John, Mike, Jerry, Ben, Noel. Yes, I
  got it working.
  
   Season greetings.
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: is this normal??

2003-01-02 Thread Ben Ricker
There is probably a problem going on there. I find it strange that you
have so much cumulative CPU time on the httpd processes. To me, they
look hung (in so far as I can tell). Since most apps are transactional
in nature (i.e., individual requests being fulfilled rather quickly),
you would expect to see the Apache processes using CPU, then giving it
up rather quickly. Of course, other httpd processes will also pop in and
out of CPU usage as individual requests pop in.

How long has this Apache/Tomcat been running? You might try a restart of
both and see if the same behavior comes right back or if it takes time.
You may have an issue in the app which is triggering a hang.

Of course, on a pretty busy web server, you may get such cumulative
times, but you should still see httpd processes popping in and out of
CPU usage as they handle their respective requests. If the same PIDs sit
there pegging the CPU incessently, you most likely have an issue.

HTH,

Ben Ricker


On Thu, 2003-01-02 at 11:37, Randy Paries wrote:
 I have a pretty busy web server
 It has apache and tomcat
 What I am trying to find out if I have a problem or not
 I am linux guy but not at the tuning level
 When I do a top I get: These top 4 are always at the top
 29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
  2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
   460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
  2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd
 
 What makes me suspicious is that it is only after some time.
 
 When I do a sar, I have no idle time on the CPU
 
 I realize that this may be a linux or apache question, but I think it
 has to do with tomcat as well
 
 Thanks for any help
 
 Randy
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: is this normal??

2003-01-02 Thread Ben Ricker
I found a trick that might help: up your sar reports to take a snapshot
every minute. Then, when you notice the CPU pegging, go through the sar
reports for CPU usage and try to find the minute that they start. Then,
you can go back through the Apache access logs (mod_jk.log perhaps),
etc. to see if you can correlate a specific request with the the
problem.

Good Luck,

Ben Ricker
Wellinx.com


On Thu, 2003-01-02 at 13:07, Randy Paries wrote:
 I am running 
 
 jakarta-tomcat-4.0.4  jdk1.3.1_04 apache-1.3.27-2 
 
 I have enabled server stats (thanks Jan)
 
 I stop and started and it is back to normal. So when this does this
 again, I will see if the server status helps
 
 Thanks for all the suggestions
 
 Randy
 
 -Original Message-
 From: Brandon Cruz [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 02, 2003 1:19 PM
 To: Tomcat Users List
 Subject: RE: is this normal??
 
 
 Are you using tomcat 3.x by any chance?  We had a CPU problem with 3.2.4
 that we could never resolve.  The problem went away with our recent
 upgrade to 4.1.x
 
 
 
 -Original Message-
 From: Randy Paries [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 02, 2003 11:37 AM
 To: 'Tomcat Users List'
 Subject: RE: is this normal??
 
 
 I have a pretty busy web server
 It has apache and tomcat
 What I am trying to find out if I have a problem or not
 I am linux guy but not at the tuning level
 When I do a top I get: These top 4 are always at the top
 29616 apache25   0 87368  78M 14256 R46.8  7.8 388:13 java
  2290 apache25   0 87368  78M 14256 R45.0  7.8 386:14 java
   460 apache24   0  6612 5112  4696 R44.2  0.4 357:51 httpd
  2180 apache25   0  6656 5176  4696 R39.9  0.5 359:28 httpd
 
 What makes me suspicious is that it is only after some time.
 
 When I do a sar, I have no idle time on the CPU
 
 I realize that this may be a linux or apache question, but I think it
 has to do with tomcat as well
 
 Thanks for any help
 
 Randy
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Tomcat 4.x and Java Processes

2003-01-07 Thread Ben Ricker
Are you using Linux? Linux shows in-process threads as processes. If you
are running Linux, then you are seeing threads within the Java process.
You would expect to see a number of threads even with your simple
config.

Ben Ricker

On Tue, 2003-01-07 at 14:07, Troy J. Kelley wrote:
 I've been looking all over for the answer to this and can't seem to find
 a good answer.
 
 My basic question is that when I start up a *very* basic tomcat config
 (JMX Support, HTTP Listener, one engine, one host, once context) I get
 several java processes that look the same:
 
 
 root  5865  0.0  5.7 227380 29548 ?  S15:02   0:02
 /usr/java/jdk/bin/java -Djava.endorsed.dirs= -classpath
 /usr/java/jdk/lib/tools.jar:/var/tomcat4/bin/bootstrap.jar
 -Dcatalina.base=/var/tomcat4 -Dcatalina.home=/var/tomcat4
 -Djava.io.tmpdir=/var/tomcat4/temp org.apache.catalina.startup.Bootstrap
 start
 
 So, why are there so many processes?  I set minProcessors=1
 maxProcessors=1 for the Coyote HTTP connector to reduce the number of
 JVMs related to this...
 
 In the WebSphere world a JVM is synonymous with an Application Server,
 which services the requests for the modules (WAR/EAR) installed into
 the appserver.
 
 Any insight would be greatly appreciated.
 
 -Troy
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Tomcat 4.x and Java Processes

2003-01-07 Thread Ben Ricker
On Tue, 2003-01-07 at 14:21, Troy J. Kelley wrote:
 Yes, sorry, I forgot to mention that.  Are there options for threading
 on linux?  I think on Solaris, you can do green or native threads.  If
 so, would a change in this setting reduce the JVM to a single pid?
 
 Thanks for the quick reply!
 
 -Troy

Nope. An application like Tomcat, or the JVM for that matter, will
always be multi-threaded. Green or Native has to do with how exactly the
threads are created (I forgot the exact differences).

What is the big deal with seeing multiple Java processes? Are you
worried about RAM? Note that the threads all have the same memory
allocation. You do not add those up; the shared memory is just that:
shared amongst all of the threads.

I would just forget about it and move on. You will not get a single PID.
Well, I tale that back. Never say never when it comes to Unix; you might
be able to list the Parent PIDS only by messing with the 'ps' options. I
have never done that myself, so I suggest, if you feel the need, to look
through the man pages for 'ps'.

HTH,

Ben Ricker

 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, January 07, 2003 3:13 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.x and Java Processes
 
 Are you using Linux? Linux shows in-process threads as processes. If you
 are running Linux, then you are seeing threads within the Java process.
 You would expect to see a number of threads even with your simple
 config.
 
 Ben Ricker
 
 On Tue, 2003-01-07 at 14:07, Troy J. Kelley wrote:
  I've been looking all over for the answer to this and can't seem to
 find
  a good answer.
  
  My basic question is that when I start up a *very* basic tomcat config
  (JMX Support, HTTP Listener, one engine, one host, once context) I get
  several java processes that look the same:
  
  
  root  5865  0.0  5.7 227380 29548 ?  S15:02   0:02
  /usr/java/jdk/bin/java -Djava.endorsed.dirs= -classpath
  /usr/java/jdk/lib/tools.jar:/var/tomcat4/bin/bootstrap.jar
  -Dcatalina.base=/var/tomcat4 -Dcatalina.home=/var/tomcat4
  -Djava.io.tmpdir=/var/tomcat4/temp
 org.apache.catalina.startup.Bootstrap
  start
  
  So, why are there so many processes?  I set minProcessors=1
  maxProcessors=1 for the Coyote HTTP connector to reduce the number
 of
  JVMs related to this...
  
  In the WebSphere world a JVM is synonymous with an Application
 Server,
  which services the requests for the modules (WAR/EAR) installed into
  the appserver.
  
  Any insight would be greatly appreciated.
  
  -Troy
  [EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: concern about Apache + mod_jk + Tomcat cluster

2003-01-15 Thread Ben Ricker
Can you post the workers.properties file? I use equal lblweight (I think
that is the name of the property) set to 100 for the 4 Tomcat instances.

I have a nearly identical setup: twp Apache 1.3.27 server running on
Redhat 7.3 load balancing across 4.0.6 Tomcat instances running on two
Solaris 8 servers. We have no performance issues and I am using the
default Processor settings in server.xml. We go through roughly 1
million hits a month.

HTH,

Ben Ricker

On Wed, 2003-01-15 at 11:04, YOU, JERRY (SBCSI) wrote:
 Hi,
 I installed the Apache1.3.27, mod_jk1.2.1 and Tomcat4.1.18 recently on our
 Solaris6 machine. The approach is that let 1 apache as web server dispatches
 requestes to the 3 tomcat server instances. There is no error in the
 configuration, 
 and install. But when I was load-testing the application, I noticed that
 there were
 lots of error message shown in the mod_jk file, although all the requests
 were
 dispatched to the tomcat servers and responded with 200.
 
 I then changed the 3 tomcat servers' configure as following:
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=11009 minProcessors=1 maxProcessors=1
acceptCount=10 debug=1/
 So now every Tomcat can only accept 1 request at the same time.
 I then sent 3 concurrent requests to the cluster: tomcat21, tomcat22,
 tomcat23.
 From the debug/log file, I think the mod_jk and tomcats are working like :
 1, 3 requests reaches mod_jk, mod_jk sends requests to tomcat21
 2, tomcat21 accepts the first one and rejects the other 2,
 3, mod_jk logs errors in mod_jk.log, reports the tomcat is down or network
 problem.
 4, mod_jk then sends the 2 to tomcat22
 5, tomcat22 accepts 1 and rejects the other.
 6, mod_jk again logs errors.
 7. mod_jk sends the alst one to tomcat23,
 8, tomcat 23 accepts it.
 
 I think there is nothing wrong with this procedure, but besides the annoying
 error messages,
 the whole performance is poor due to the time spent in the probes. I also
 suspect that
 the socket connection in Solaris6 is too slow, for some reason.
 
 I have questions for those who have the tomcat cluster in there production
 site:
 how about the performance in your site? Is there anything wrong with my
 configuration or should
 I use JK2 to improve performance?
 
 The configuration files and log files are attached with this email.
 
 OS: Solaris 6
 Apache1.3.27, Tomcat 4.1.18, mod_jk1.2.1( I can not find the binary mod_jk
 at the apache.org site
 under solaris6 directory, so, I download the one in Solaris8 dir).
 
 Thanks,
 
 Jerry You tomcat_23_catalina.log  the_change_to_httpd.conf  
 workers.properties  change_to_tomcat21_server.xml  
 tomcat_21_catalina.log  tomact_22_catalina.log 
 
 __
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Memory requirements

2003-01-28 Thread Ben Ricker
On Tue, 2003-01-28 at 16:17, Cees van de Griend wrote:

  and there are 27 - 35 instances of it.
 
 This could be correct, does not sound unreasable.
 
  It takes up close to 1 GB of memory.
 
 This does sound unreasable.
 How did you measure this?

Running just the examples, as was stated earlier, would rule out taking
upwards of a gig of memory. I run a fairly sophisticated web app which
gets roughly 100k hits a day our JVMs rarely take up 50-80meg a piece
(they are 4 JVMs taking roughly 1/4th of the requests).

I would suggest looking at vmstat and doing 'cat /proc/meminfo'. If you
see 1gig+ memory allocation, you can do the math. If you have less then
1gig memory, you should definately see heavy swap usage.


-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Single-Sign-On (SSO) with Tomcats in 2 different servers

2003-02-03 Thread Ben Ricker
What you want it session replication. You can search the archives for
answers. Also, go to:
http://www.onjava.com/pub/a/onjava/2002/07/17/tomcluster.html?page=1
for a good overview.

Ben Ricker

On Mon, 2003-02-03 at 13:17, Víctor Ferrero del Valle wrote:
 Hi,
 
 I have 2 servers, both with Tomcat. On each server is installed a
 different web application.
 Therefore, server A has a Tomcat with application A, and server B has
 another Tomcat (but same version) with Application B.
 The access to the applications is restricted, so the user must provide
 his userId and password before accessing the applications.
 Both applications authenticate against the same LDAP server.
 
 The issue is that Id like to use Single Sign On (SSO) to access both
 applications, so that when a user accesses one application and
 identifies himself, he doesnt need to identify again when he accesses
 the other application.
 I think that in order to accomplishing this, the two Tomcats should be
 able to share
 sessions. Is this possible? Is there any other solution?
 
 Thanks in advance.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: loadbalancing with tomcat only and unable to bring admin andmanager pages

2003-02-11 Thread Ben Ricker
On Tue, 2003-02-11 at 10:06, krip pane wrote:

 i'm running tomcat 4.1.12.  I've a few questions any
 and all help is truly appreciated.
 
 1. what's the best way to monitor the health of
 tomcat?

There are a number of ways to do this: process watching, scripts that
access the certain URLs and match the result with what is expected,
third-party monitors like Big Brother, etc.

 2. Is the default connector that comes packaged with
 tomcat capable of doing failover,loadbalancing or do I
 need to have apache in the front and a connector in
 between.

You need to have Apache out in front with a connector in between.

 3. Is it possible to redirect tomcat to port 80 (or do
 i need apache in the front again) to avoid having the
 users type 8080 everytime?

You can have Tomcat use port 80, but you have to change the server.xml
to reflect that and start Tomcat as Root. However, you would not have
the load-balancing/failover.

 4. while starting tomcat as user tomcat i keep
 getting tomcat-users permission denied.  only
 wrokaround I found was to either give the user write
 access to the conf dir or comment out the memoryrealm
 altogether.  One, is it a good idea to give the suer
 write access to conf dir. Two i have to setup a user
 list (currently locally) to allow access to tomcat, if
 i comment out the memeoryrealm then how do i
 authenticate my users.

I give the user 'Tomcat' the ownership of the Tomcat directory. Should
be no pproblem with that, as log as the conf directory is not in the
'ROOT' docbase directory.

The answer above should fix two.

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Moving to Tomcat 4.1.18

2003-02-12 Thread Ben Ricker
On Wed, 2003-02-12 at 07:46, Ramkumar Krishnan wrote:
 Hi All,
 I am a newbie to 4.1.18. We want to move our system (which
 is already running in live)to tomcat 4.1.18 from tomcat 3.2.1. Will
 there be a major work  involve?. How much time it will take?...What
 will be the major changes?..If you have any documents relating to
 this, please send it to me.
  
 Any help would be appreciated.


The move is a rather large one. Both the server.xml and web.xml have
changed. Here is a rough outline of how I moved from 4.0.5 to 4.1.18:

1) Installed new version in a different directory then older version.
2) Changed Listening ports to different ports so that old and new
version could coexist without stomping on each other ports.
3) Started new version.
4) Checked to make sure all the examples and admin ran correctly in the
new port (see docs)
5) Added old configs to new configs (i.e., added special loggers, setup
mod_jk Listener, etc. I still keep the different port assignments)
6. Tested my Web Apps using the different ports
7. Take down new version and change port assignments to the same ports
as old setup.
8. Take down old version
9. Start new version
10. Test, Test, Test.

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Jakarta 4.1.18 Web Server Administration

2003-02-12 Thread Ben Ricker
See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/index.html in the
Manager App HOW-TO link.

Ben Ricker

On Wed, 2003-02-12 at 11:47, João Augusto Charnet wrote:
 I've just installed Jakarta 4.1.18, and I'd like to know where do I 
 configure the Web Administration ?
 I'd appreciate any kind of help. I'm new to this version, and I don't 
 know where to start.
 
 Thanks a lot..
 
 Sincerely,
 John
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: JTHOWTO

2003-02-12 Thread Ben Ricker
On Wed, 2003-02-12 at 14:00, Alberto A C A S Magalhães wrote:

 John, i am using your document, Red Hat Linux 7.2 + Apache... + Tomcat
 4.1.18,
 I finish installing, java and tomcat.
 When i startup tomcat, it gives an error, of, JAVA_HOME environment variable
 not correctly defined!!
 Can you help me...

Although I am not John, I will fill his rather huge shoes for a
moment...

You need to set the JAVA_HOME variable. You can do this by setting it
manually on the command line (type: 'JAVA_HOME=/path/to/java/install')
or. better yet, assign the variable in the startup.sh file. Include a
line at the beginning under the comments:

JAVA_HOME=/path/to/java/install

The '/path/to/java/install' depends on how you installed Java. If by
RPM, I believe it is /usr/java/jdk_version#.

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: failing installation server.xml file

2003-02-12 Thread Ben Ricker
A few hints on using RPMs:

get to know the --query (or '-q') option to RPM. Specifically, you can
list out all files installed by an rpm by typing: 'rpm -ql
Package_name'. To get the exact package name (RPM usually requires the
full version number), type 'rpm -qa |grep package_name'.

For example, type 'rpm -qa |grep tomcat' to get the full package name.
Then type 'rpm -ql tomcat_package_name' to get all the files installed.
This will give you tthe layout of all the files installed. 
I would also suggest going over the stuff in /usr/bin. They are probably
shell scripts. You can see what configuration files are pulled in from
there. 

Having said all that, I do not use the RPMs for Tomcat myself. I use
Solaris as my Tomcat platform. The binaries, as suggested earlier, are
the easiest way to go.

Ben Ricker

  -Original Message-
  From: Jon Roberts [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 12, 2003 3:32 PM
  To: Tomcat Users List
  Subject: Re: failing installation server.xml file
  
  
  Turner, John wrote:
   What does move tomcat4 mean?  You changed the location of 
  CATALINA_HOME?
   Did this change get propagated through all startup and 
  admin scripts?
   
   John
  
  I changed the location of CATALINA_HOME, which the rpm put in 
  /var/tomcat4. The only place I updated this value was in the 
  tomcat4.conf file. I get feedback upon starting the engine that 
  indicates it's using the new path (see earlier post), and I was under 
  the impression that this was the only place I'd need to set 
  it. I put it 
  in my environment, too, but that didn't do it. Where else should I 
  expect to change this value?
  
  Incidentally, with the rpm the startup scripts end up as 
  /usr/bin/tomcat4 and /usr/bin/dtomcat4. For whatever reason, the 
  CATALINA_HOME/bin directory only contains a handful of .jar files.
  
  Now I've backed out and re-installed it without moving CATALINA_HOME, 
  and I get the same behavior. That is not it.
  
  Jon Roberts
  www.mentata.com
  
  
  -
  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]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Tomcat Debug.

2003-02-13 Thread Ben Ricker
On Thu, 2003-02-13 at 05:28, João Augusto Charnet wrote:

 Is it possible to set Tomcat to listen to diferent ports when debugging ?

What I do with roughly 12 developers is that I add a logger for each
user that logs to each developers web app directory. They use the admin
interface to restart/redeploy their own context.

Not sure if this is exactly what you want...

Ben Ricker

 Here's the problem. We have a group of developers, who acesses tomcat 
 remotely in one machine. Each developer accesses one context of Tomcat. 
 However to Debug, since Tomcat uses one port, when somebody is 
 debugging, the execution of the entire group is going to be in debug 
 mode. This is not interesting. What we want is to each developer have 
 it's own debug port.
 Did I make myself clear ?
 If not please let me know.
 Thanks a lot...
 Sincerely,
 John.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Error Log watcher

2003-02-14 Thread Ben Ricker
I am wondering if anyone has found a good error log watcher for Tomcat?
Swatch does not work because it is made for syslog-type logs where an
error message occurs on one line. So, it views a java error as one line,
which really does not help.

Anyone try any other programs?

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Error Log watcher

2003-02-14 Thread Ben Ricker
On Fri, 2003-02-14 at 09:16, Shapira, Yoav wrote:
 Howdy,
 What would you require from this error log watcher ?

Good question! Sorry I did not include it. I am looking for something
similar to swatch, but can handle the multiple-lined errors. I would
want the program to have some sort of rules setting functionality
(preferably regex) and that allows actions based upon the specified
rules.

The actions would basically be alpha pages which would include the error
message in the page. Some throttling would be nice, so multiple errors
would not flood my pager.

Ben Ricker


 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 14, 2003 9:58 AM
 To: Tomcat Users List
 Subject: Error Log watcher
 
 I am wondering if anyone has found a good error log watcher for Tomcat?
 Swatch does not work because it is made for syslog-type logs where an
 error message occurs on one line. So, it views a java error as one
 line,
 which really does not help.
 
 Anyone try any other programs?
 
 Ben Ricker
 
 --
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
and may contain information that is confidential, proprietary and/or privileged.  
This e-mail is intended only for the individual(s) to whom it is addressed, and may 
not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
the(an) intended recipient, please immediately delete this e-mail from your computer 
system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: Error Log watcher

2003-02-14 Thread Ben Ricker
On Fri, 2003-02-14 at 09:57, Shapira, Yoav wrote:
 Howdy,
 
 OK.  I actually went and looked at the Swatch page out of interest.
 Cool tool.

Yes it is. I use it on my Apache error logs and to security checks on
the access_logs. Easy to setup to boot.

 Here's an approach that may work for you: use log4j.  Implement a
 TriggeringEventEvaluator
 (http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/spi/Triggerin
 gEventEvaluator.html) to do the regex or whatever rules you want to
 decide required a page from a log message.  The evaluator will get every
 log message, including its complete stack trace and any details you want
 to add.  You can use log4j's MDC
 (http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/MDC.html) to
 provide any details needed in order to decide whether the event merits a
 message to your page or not.
 
 Log4j comes with an SMTP appender that sends email and has all the logic
 you want: throttling and arbitrary rules for even evaluation.  See
 http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/net/SMTPAppend
 er.html for details.

Some more information about myself: I am a system administrator. The
extent of my programmin g experience ends at Perl for System
Administrators. So I have a questions that may sound dumb:

Can you use these appenders as part of catching exceptions from within
the Code? That is, if you catch a certain exception that is going to be
logged, you set isTriggeringEvent on it and Log4J can then do what needs
to be done? 

 Log4j doesn't come with a pager appender right now.  You could use a JMS
 appender to send events (that pass the triggering event evaluator's
 criteria) to a JMS server somewhere, as there are J2EE servers that can
 handle paging.  Alternatively, you can write the pager appender yourself
 and maybe even donate it to us as a log4j contribution ;)  

Using the SMTPAppender to email it my pager would be plenty.

 This may seem like a lot, but it's really more work explaining the
 process than doing it ;)

If I understand it right, you are right. This would be easily added to
our existing exception handling.

Thanks for the info!

Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Re: Tomcat as a production server?

2003-02-17 Thread Ben Ricker
You want to put a profiler on that box and see what threads are racing
away. You can also tell the JVM to throw a traceback of all the threads
being used, but I for got how exactly :(

Anyway, look at the code. You definately have something going on there.

Ben Ricker

On Sat, 2003-02-15 at 18:47, Arcadius A. wrote:
 Hello!
 We're using tomcat 4.1.12, Apache 1.3.27 , mod_jk1.2.2 on a redhat 7.3
 server ( AMD Duron 1.2GHz, 256 RAM).
 
 The problem is that the server runs quite fine the first few days but
 after a week, the server is heavily busy: While the number of tomcat
 processes and the memory usage is slightly the same, the CPU usage of each
 of the tomcat processes highly increase (  from 0.0% to about 19% for each
 of the tomcat processes). so tomcat can no longer respond to requests
 from the browser. the only one thing I use to do is restart the
 server then everything works fine again
 Note that all the  6 java processes shown in the attached file are from
 tomcat. And we're using tomcat's default configurations.
 
 Please has anyone coped with this problem before?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




Cookie Handling Question

2003-02-17 Thread Ben Ricker
We have some strange behavior going on, probably due to the strange
setup one of our customers use. Before I get into it, some facts:

Running Apache 1.3.27 with mod_jk 1.2.1 on two Redhat Linux servers
talking to 4 Tomcat 4.0.5 instances. The Tomcats are running 2 per
server on Sun Solaris 8 boxes using Sun's JDK 1.4.1. The Apache's are
load-balancing to the Tomcats and we have a Cisco load-balancer in front
of the Apache servers.

Here is where it gets messy: the client is using IE 5.5 running on a
Citrix terminal server. They are using multiple stations within a
location and using the same account! So, user goes to station 1, logs
in, does their business, then leaves the station without explicitely
logging out of the app. They go to station 2, login, do their thing
there then leavesetc.

On top of this, there are other users who use the same stations but use
different browser windows and different logins. 

The problem is that the user complains of having to re-login to station
1 after a couple of hours when he comes back to use the session he
left open previously. Of course, with roughly 200 users at this site, we
have only had 2 complaints of this behavior but we are doing due
diligence to figure out what is going on. It looks like the browser is
getting confused about which session cookie is the right one for the
session and it sends the wrong cookie, thereby getting the invalidated
session, please login again screen.

Can anyone shed any light on how this sort of behavior might cause
session timeouts because of mishandled cookies? How does IE 5.x know
that a cookie is for this particular window, let's say, and not another?
Are cookies tied to windows? Being a Unix sysadmin, I can only look out
Windows (TM); I don't use them.

Any info would be appreciated.

Ben Ricker 
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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




RE: problems compiling and using mod_jk

2003-02-26 Thread Ben Ricker
Anything in the mod_jk.log, or whatever log you setup in the httpd.conf
or mod_jk.conf file?

Ben Ricker

On Wed, 2003-02-26 at 13:59, Mike Jackson wrote:
 Hmm, I'm still having problems.  I took my mod_jk.conf from tomcat 3 and
 striped out everything except for the examples webapp and put in the minimal
 workers.properties file from the web site.  I can access the nbrguess.jsp
 file from tomcat if I go to 8080, but when I try to get to it via apache it
 gives me a error.  There's nothing in the log file to point me anywhere, it
 looks like things on the tomcat side are running, I've got startup messages
 from apj13 threads, but I don't seem to be talking to them.  Any ideas?
 
 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 11:55 AM
  To: 'Tomcat Users List'
  Subject: RE: problems compiling and using mod_jk
 
 
 
  Yup.
 
  John
 
 
   -Original Message-
   From: Mike Jackson [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 2:53 PM
   To: Tomcat Users List
   Subject: RE: problems compiling and using mod_jk
  
  
   You mean the JMX MBeans lines?
  
   --mikej
   -=-
   mike jackson
   [EMAIL PROTECTED]
  
-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 11:45 AM
To: 'Tomcat Users List'
Subject: RE: problems compiling and using mod_jk
   
   
   
Just comment out the ManagedBean elements in server.xml.  That
will get rid
of those error messages, they are not compatible with
   Ajp13Connector.
   
John
   
   
 -Original Message-
 From: Mike Jackson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 2:40 PM
 To: Tomcat Users List
 Subject: RE: problems compiling and using mod_jk


 Ok, I've got mod_jk to compile and work with apache 1.3.27
 and tomcat 3.3.x.
 However I can't get it to work with tomcat 4.1.18.  The
 module loads, but it
 doesn't seem like it can talk to tomcat.  I tried to change
 the server.xml
 file to use the older apj13 connector, but it fails to
   load, gets a
 java.lang.Exception: ManagedBean is not found with Ajp13Connector.

 So my question is, where to go, should I switch back to the
 coyote connector
 and try to get it working?  Or is there something I can
   do to fix that
 ManagedBean exception?

 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]

  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 11:04 AM
  To: 'Tomcat Users List'
  Subject: RE: problems compiling and using mod_jk
 
 
 
  Sounds good to me, I really have no idea.  My experience with
  build tools is
  pretty minimal.
 
  John
 
   -Original Message-
   From: Mike Jackson [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, February 26, 2003 2:02 PM
   To: Tomcat Users List
   Subject: RE: problems compiling and using mod_jk
  
  
   I found an install-sh in
   /usr/local/share/automake/install-sh, is that
   where it ought to get getting it from?
  
   --mikej
   -=-
   mike jackson
   [EMAIL PROTECTED]
  
-Original Message-
From: Mike Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 10:59 AM
To: Tomcat Users List
Subject: RE: problems compiling and using mod_jk
   
   
It looks like there's an ac_aux_dir that isn't begin set
   properly, where
does that come from and what should it look like?  The
 ac_aux_dir is
referenced in aclocal.m4.  It says Actually
   configure libtool.
ac_aux_dir
is where install-sh is found. in a comment in the area I
   think that the
problem might be at, but I can't seem to figure out what it
   should be and
where it ought to be set.
   
--mikej
-=-
mike jackson
[EMAIL PROTECTED]
   
 -Original Message-
 From: Mike Jackson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 10:46 AM
 To: Tomcat Users List
 Subject: RE: problems compiling and using mod_jk


 I'm root, I don't see how there could be a
 permissions problem. :)

 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]

  -Original Message-
  From: Turner, John [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 10:34 AM
  To: 'Tomcat Users List'
  Subject: RE: problems compiling and using mod_jk
 
 
 
  I would say Yes. ;)
 
  Could it be a permissions

Re: No processor available

2003-02-27 Thread Ben Ricker
On Thu, 2003-02-27 at 12:53, Sankaranarayanan (Ganesh) Ganapathy wrote:
 Hi All,
 
 Currently I see that tomcat rejects requests with the message No processor 
 available if it has reached the maximum number of processors and the processors are 
 busy processing requests.
 
 Is there a way to make tomcat wait until a processor becomes available?
 
 Thanx
 Ganesh

Change the Accept Count property in the server.xml in the connector
properties.


Ben Ricker

-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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



RE: [BULK] - Re: No processor available

2003-02-27 Thread Ben Ricker
On Thu, 2003-02-27 at 13:37, Sankaranarayanan (Ganesh) Ganapathy wrote:
 How does the accept count property affect this? The accept count property merely 
 determines the number of connections that will be queued on the socked. I am talking 
 about a case where the connection is accepted from server socket but there is no 
 processor available to process the request.
 Thanx
 Ganesh

The following information is taken from Tomcat's 4.1.18 documentation. 
If you have the documentation installed somewhere, the URL is:

http://localhost/tomcat-docs/config/jk.html
 
acceptCount:
 
The maximum queue length for incoming connection requests when all
possible request processing threads are in use. Any requests received
when the queue is full will be refused. The default value is 10.

If I understand you, this is exactly what you are looking for?

Ben Ricker

 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 27, 2003 11:07 AM
 To: Tomcat Users List
 Subject: [BULK] - Re: No processor available
 
 
 On Thu, 2003-02-27 at 12:53, Sankaranarayanan (Ganesh) Ganapathy wrote:
  Hi All,
  
  Currently I see that tomcat rejects requests with the message No processor 
  available if it has reached the maximum number of processors and the processors 
  are busy processing requests.
  
  Is there a way to make tomcat wait until a processor becomes available?
  
  Thanx
  Ganesh
 
 Change the Accept Count property in the server.xml in the connector
 properties.
 
 
 Ben Ricker
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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



Re: Tomcat application redeploy behind Apache server

2003-03-04 Thread Ben Ricker
On Tue, 2003-03-04 at 09:43, Jim Cobban wrote:
 I am sorry to keep harping on this, but I still am no closer to solving my
 problem.  I don't even know where to look for a solution.

Are you sure you are not caching the web pages? Do you have caching on
in the httpd.conf? Do you send the pragma-nocache in your HTML? Try
changing the browser settings to always go back to the server and if you
still get the old page, then look to see if Apache has caching on.

I noticed that you are using mod_webapp. you might want to try to switch
to mod_jk instead. It works with one Tomcat only; I have heard that it
is a good idea to remobe the load-balancing weight when only using one
tomcat. The, you should be able to use the manager app.

HTH,

Ben Ricker

 
  - Original Message -
  From: Jim Cobban [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, February 22, 2003 1:29 PM
  Subject: Re: [EMAIL PROTECTED] Tomcat application redeploy behind Apache
 server
 
  I have a problem that when I redeploy my JSP/servlet application on a
 Tomcat
  server, the new behavior is not visible to users who access the
 applications
  through an Apache HTTP server which is the front-end.  The new behavior is
  seen if I go into the backdoor directly into the Tomcat server, but that
  access is not available to my customers.  As a result I have to shutdown
 the
  connector and the Tomcat server and restart in order for my customers to
 see
  the new behavior.  How do I configure Apache and Tomcat so that
 redeploying
  the application using the manager interface on Tomcat causes the new
  functionality to be visible through Apache.
 
  The Apache httpd.conf file contains the following:
 
  LoadModule webapp_module modules/mod_webapp.so
 
  IfModule mod_webapp.c
  WebAppConnection warpConnection warp 127.0.0.1:8008
  WebAppDeploy examples warpConnection /examples/
  WebAppInfo /webapp-info
  /IfModule
 
  WebAppDeploy cocoon warpConnection /cocoon/
  WebAppDeploy Census warpConnection /Census/
  WebAppDeploy Ocfa warpConnection /Ocfa/
  WebAppDeploy manager warpConnection /manager/
 
  The Tomcat server.xml contains the following:
 
  Connector className=org.apache.ajp.tomcat4.Ajp13Connector
 port=8009 minProcessors=5 maxProcessors=75
 acceptCount=10 debug=0/
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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



Re: Problems configuring Tomcat with Apache using mod_jk2

2003-03-04 Thread Ben Ricker
You need to JkMount the /examples in httpd.conf. Something like JkMount
*/examples blah where blah is the name of your loadbalancer setup in
workers.properties.

It would help if you post the entries you added in httpd.conf for
Tomcat. Also include your server.xml file for more information.

Ben Ricker

On Tue, 2003-03-04 at 10:36, David Godfrey wrote:
 Hi,
 
 I'm having problems when trying to use Tomcat and Apache HTTP server
 together, with mod_jk2. I have built Apache from the source, installed
 Tomcat 4.1.18, and tested each individually (they seem to function
 correctly). When I add in mod_jk2, both Apache and Tomcat still start and
 function correctly, but there does not appear to be any redirection taking
 place, (I can access http://localhost:8080/examples for, but not
 http://localhost/examples). 
 
 When I examine error_log in APACHE_HOME/logs, there are the following 2
 entries, but nothing that (to me) indicates an error:  
 
   Apache/2.0.43 (Unix) mod_jk/1.2.1 configured -- resuming normal
 operations
 
   File does not exist: /opt/apache/htdocs/examples
 
 The error/log file I have defined in httpd.conf for mod_jk2 is created when
 I start Apache / Tomcat, but is empty. I am running Solaris 2.8, Apache
 2.0.43, Tomcat 4.1.18, and Java 1.4.1.
 
 I would really appreciate some ideas on how I could solve this problem.
 
 Many thanks,
 
 D
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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



Re: Problems configuring Tomcat with Apache using mod_jk2

2003-03-04 Thread Ben Ricker
On Tue, 2003-03-04 at 10:36, Ben Ricker wrote:
 You need to JkMount the /examples in httpd.conf. Something like JkMount
 */examples blah where blah is the name of your loadbalancer setup in
 workers.properties.

Let me correct that: it should be '/examples/* blah'. I was looking at
two different entries in my own httpd.conf.

Ben Ricker

 It would help if you post the entries you added in httpd.conf for
 Tomcat. Also include your server.xml file for more information.
 
 Ben Ricker
 
 On Tue, 2003-03-04 at 10:36, David Godfrey wrote:
  Hi,
  
  I'm having problems when trying to use Tomcat and Apache HTTP server
  together, with mod_jk2. I have built Apache from the source, installed
  Tomcat 4.1.18, and tested each individually (they seem to function
  correctly). When I add in mod_jk2, both Apache and Tomcat still start and
  function correctly, but there does not appear to be any redirection taking
  place, (I can access http://localhost:8080/examples for, but not
  http://localhost/examples). 
  
  When I examine error_log in APACHE_HOME/logs, there are the following 2
  entries, but nothing that (to me) indicates an error:  
  
  Apache/2.0.43 (Unix) mod_jk/1.2.1 configured -- resuming normal
  operations
  
  File does not exist: /opt/apache/htdocs/examples
  
  The error/log file I have defined in httpd.conf for mod_jk2 is created when
  I start Apache / Tomcat, but is empty. I am running Solaris 2.8, Apache
  2.0.43, Tomcat 4.1.18, and Java 1.4.1.
  
  I would really appreciate some ideas on how I could solve this problem.
  
  Many thanks,
  
  D
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


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



RE: Problems configuring Tomcat with Apache using mod_jk2

2003-03-04 Thread Ben Ricker
On Tue, 2003-03-04 at 11:01, David Godfrey wrote:
 It would help if you post the entries you added in httpd.conf for Tomcat.
 Also include your server.xml file for more information.
 
 I have modified httpd.conf as follows:
 
 JKWorkersFile /opt/tomcat/conf/jk/workers.properties
 JKLogFile /opt/tomcat/logs/mod)jk.log
 Include /opt/tomcat/conf/auto/mod_jk.conf

Just to be sure, tack on the mod_jk.conf.

It still looks like you have an issue with telling Apache where to go
for /examples and any other webapps (like /manager or /admin). You need
to add the JkMount directives in httpd.conf; they are sort of like
redirects in that they tell Apache to send requests for, say,
/examples/* to the available worker(s).

My entry in httpd.conf for /examples:

JkMount /examples/* loadbalancer

loadbalancer is defined in my workers.properties file. For example, I
have the follwoing in my workers.properties:

worker.list=tomcat1,tomcat2,loadbalancer
# 
# First tomcat server
# 
worker.tomcat1.port=11009
worker.tomcat1.host=127.0.0.1
worker.tomcat1.type=ajp13

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1,tomcat2

Ben Ricker

 Server.xml is as follows (standard apart from the references to mod_jk)
 
 Server port=8005 shutdown=SHUTDOWN debug=0
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 modJk=/opt/apache/modules/mod_jk-2.0.43.so /
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 debug=0/
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 debug=0/
   GlobalNamingResources
 Environment name=simpleValue type=java.lang.Integer value=30/
 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
   Service name=Tomcat-Standalone 
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=2
useURIValidationHack=false disableUploadTimeout=true /
   !-- Define the default virtual host --
   Host name=localhost debug=0 appBase=webapps 
unpackWARs=true autoDeploy=true
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true forwardAll=false
 modJk=/opt/apache/modules/mod_jk-2.0.43.so /
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
   timestamp=true/
 Context path=/examples docBase=examples debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_examples_log. suffix=.txt
 timestamp=true/
   Ejb   name=ejb/EmplRecord type=Entity
  home=com.wombat.empl.EmployeeRecordHome
remote=com.wombat.empl.EmployeeRecord/
   Environment name=maxExemptions type=java.lang.Integer
   value=15/
   Parameter name=context.param.name value=context.param.value
  override=false/
   Resource name=jdbc/EmployeeAppDb auth=SERVLET
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/EmployeeAppDb
 parameternameusername/namevaluesa/value/parameter
 parameternamepassword/namevalue/value/parameter
 parameternamedriverClassName/name
   valueorg.hsql.jdbcDriver/value/parameter
 parameternameurl/name
   valuejdbc:HypersonicSQL:database/value/parameter
   /ResourceParams
   Resource name=mail/Session auth=Container
 type=javax.mail.Session/
   ResourceParams name=mail/Session
 parameter
   namemail.smtp.host/name
   valuelocalhost/value
 /parameter
   /ResourceParams
   ResourceLink name=linkToGlobalResource 
 global=simpleValue
 type=java.lang.Integer/
 /Context
   /Host
 /Engine
   /Service
 /Server
 
 
 Many thanks,
 
 David
 
 
 
 
 
 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED] 
 Sent: 04 March 2003 16:37
 To: '[EMAIL PROTECTED]'
 Subject: Re: Problems configuring Tomcat with Apache using mod_jk2
 
 
 You need to JkMount the /examples in httpd.conf. Something like JkMount
 */examples blah where blah

RE: Load balancing

2003-06-20 Thread Ben Ricker
On Fri, 2003-06-20 at 09:52, Roberts, Eric wrote:
 Hi,
 
 Can you use the jvmRoute parameter?

The above might work; I have not tried it.

One thing I did was to turn on the Tomcat web listener and then I can
directly access each Tomcat instance by port (Tomcat1 on Server 1 is
port 8081 and Tomcat2 on Server2 is port 8082, etc).

Ben Ricker
Wellinx.com

 -Original Message-
 From: Pierre Maris [mailto:[EMAIL PROTECTED]
 Sent: 20 June 2003 16:38
 To: [EMAIL PROTECTED]
 Subject: Load balancing
 
 
 Hi,
 
  
 
 I am working with a load balanced configuration (1 Apache and 2 Tomcat instances on 
 the same machine). Load balancing is provided by mod_jk.
 
  
 
 My application uses caches, and to purge caches I need to address, explicitly,  each 
 of  the Tomcat instances.
 
  
 
 What's the best way to do this?
 
  
 
 Regards
 
  
 
   Pierre
 
 -
 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: Tomcat security?

2003-07-03 Thread Ben Ricker
Plus, if one runs as a non-priviledged user account with no login
privileges (i.e., locked account) and your permissions are correct, then
only root and Tomcat can read the users file.

If the hacker has root, the tomcat users are the least of your worries.

Ben Ricker
Wellinx.com


On Thu, 2003-07-03 at 14:23, Nathan McMinn wrote:
 What do you mean stored in the clear?  Are you referring to
 tomcat-users.xml?  Personally, I use a MySQL database to hold auth
 information for a JDBC Realm, and store them digested.  As an additional
 layer of security, the user account that is used to access the DB for the
 realm is only granted read access and only to the required user and roles
 tables.
 
 - Original Message -
 From: Mark W. Webb [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, July 03, 2003 1:55 PM
 Subject: Re: Tomcat security?
 
 
  I can't believe that passwords for SSL are stored in the clear.  That
  places all responsibility of security to the OS, which may not be a good
  idea.  What happened to defense-in-depth ??
 
  Nathan McMinn wrote:
 
  When was the last time Tomcat had a published exploit?
  
  On a related note, these kind of contests are fairly common, and
 usually
  don't produce any kind of real activity.
  
  --Nathan
  
  - Original Message -
  From: Eugene Lee [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Thursday, July 03, 2003 10:51 AM
  Subject: Tomcat security?
  
  
  
  
  Anyone want to discuss hardening Tomcat servers?
  
  Hacking Contest Threatens Web Sites
  
  By George V. Hulme, InformationWeek
  Updated Wednesday, July 2, 2003, 3:00 PM EDT
  
  A hacking contest slated for this weekend could produce a rash
  of Web-site defacements worldwide, according to a warning issued
  Wednesday by security companies and government Internet security
  groups.  The hacker defacement contest is expected to kick off
  on Sunday. The contest supposedly will award free hosting
  services, Web mail, unlimited E-mail forwarding, and a domain
  name of choice for the triumphant hackers, according to a Web
  site promoting the contest.
  
  ...
  
  More details at:
  
  http://www.internetweek.com/story/showArticle.jhtml?articleID=10818014
  
  
  --
  Eugene Lee
  http://www.coxar.pwp.blueyonder.co.uk/
  
  -
  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]
  
  
 
 
 
 
  -
  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]
 
 


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



Slowness in Tomcat app

2003-07-07 Thread Ben Ricker
I am seeing a strange slowness on our QA tier. For some reason, this
only occurs on this one tier (we have a production setup running, as
well as a development playground).

I have two Apaches talking to two Tomcats running on Solaris. They are
running Tomcat 4.0.5. I can see no reason for the problem. Both Tomcats
are up and running and listening on the correct ports. The only
indication of an issue (which may or may not be related) is the
following error in the mod_jk.log on the Apache side:

[Wed Jul 02 10:23:34 2003]  [jk_ajp_common.c (679)]: ajp_connection_tcp_get_message: 
Error - jk_tcp_socket_recvfull failed
[Wed Jul 02 10:23:34 2003]  [jk_ajp_common.c (1041)]: Error reading reply
[Wed Jul 02 10:23:34 2003]  [jk_ajp_common.c (1178)]: In jk_endpoint_t::service, 
ajp_get_reply failed in send loop 0

What does this error indicate? I am not a developer, so looking at the
source code would get me no where.

Thanks for your time,

Ben Ricker
Wellinx, Inc.


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



  1   2   >