Re: AW: Tomcat 5.5 and Apache 2.0

2005-09-21 Thread Stephen Carville
[EMAIL PROTECTED] wrote:
 Could you please please please stop mailing!!!???
 
 Send an Email to this mailto:[EMAIL PROTECTED]
 adress to unsubscribe!

I'm not trying to unsubscribe, I'm trying to get tomcat 5 to serve up
something besides error 404's and empty pages.

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



Tomcat 5.5 and Apache 2.0

2005-09-20 Thread Stephen Carville
I am at my wits end...  I've inherited the Apache and Tomcat setup and
so far I cannot even get then to talk to each other.  I rebuilt
mod_jk.so from source.  I copied over what was supposed to be a working
server.xml, read documentation, and edited things until my eyes are
watering and I still cannot figure out what I am doing wrong.

When I start tomcat, it creates the directories in
/var/jakarta/tomcat/work/Apache for only first two Hosts but no compiled
java appears in them.  If I set the LogLevel on mod_jk.so to debug and
request a jsp (http://kanga.nationwide-totalflood.com/HomePage.jsp) I get:

[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/HomePage.jsp' from 2 maps
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/servlet/*'
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/*.jsp'
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
worker1 - /*.jsp
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug] jk_handler::mod_jk.c
(1825): Into handler jakarta-servlet worker=worker1 r-proxyreq=0
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
wc_get_worker_for_name::jk_worker.c (111): found a worker worker1
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
wc_maintain::jk_worker.c (301): Maintaining worker worker1
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_maintain::jk_ajp_common.c (2203): recycled 0 sockets in 0 seconds
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
init_ws_service::mod_jk.c (517): Service protocol=HTTP/1.1 method=GET
host=(null) addrr=192.168.124.232 name=kanga.nationwide-totalflood.com
port=80 auth=(null) user=(null) laddr=192.168.150.129 raddr=192.168.124.232
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_get_endpoint::jk_ajp_common.c (2131): acquired connection cache slot=0
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (566): ajp marshaling done
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_service::jk_ajp_common.c (1670): processing with 3 retries
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
jk_open_socket::jk_connect.c (328): socket TCP_NODELAY set to On
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
jk_open_socket::jk_connect.c (341): socket SO_KEEPALIVE set to On
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
jk_open_socket::jk_connect.c (391): timeout 300 set for socket=57
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
jk_open_socket::jk_connect.c (426): trying to connect socket 57 to
127.0.0.1:8009
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
jk_open_socket::jk_connect.c (452): socket 57 connected to 127.0.0.1:8009
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connect_to_endpoint::jk_ajp_common.c (864): Connected socket 57 to
(127.0.0.1:8009)
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): sending to ajp13
pos=4 len=468 max=8192
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 12 34 01
D0 02 02 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 001000 00 0D
2F 48 6F 6D 65 50 61 67 65 2E 6A 73 70  - .../HomePage.jsp
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 002000 00 0F
31 39 32 2E 31 36 38 2E 31 32 34 2E 32  - ...192.168.124.2
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 003033 32 00
FF FF 00 1F 6B 61 6E 67 61 2E 6E 61 74  - 32.kanga.nat
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 004069 6F 6E
77 69 64 65 2D 74 6F 74 61 6C 66 6C 6F  - ionwide-totalflo
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00506F 64 2E
63 6F 6D 00 00 50 00 00 0B A0 0B 00 1F  - od.com..P...
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00606B 61 6E
67 61 2E 6E 61 74 69 6F 6E 77 69 64 65  - kanga.nationwide
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00702D 74 6F
74 61 6C 66 6C 6F 6F 64 2E 63 6F 6D 00  - -totalflood.com.
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 0080A0 0E 00
4F 4D 6F 7A 69 6C 6C 61 2F 35 2E 30 20  - ...OMozilla/5.0.
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 009028 58 31
31 3B 20 55 3B 20 4C 69 6E 75 78 20 69  - (X11;.U;.Linux.i
[Tue Sep 20 15:52:48 2005] [20650:10400] [debug]

Re: Tomcat 5.5 and Apache 2.0

2005-09-20 Thread Stephen Carville
Oops I forgot the basics:

System: Redhat ES3 Release 4
Kernel: 2.4.21-27.ELsmp
Glibc: 2.3.2
Java: 1.5.0_04-b05
Tomcat: 5.5.9
Platform: Dell 2850
CPU: Intel Xeon 3.40GHz
Memory: 4G

Stephen Carville wrote:
 I am at my wits end...  I've inherited the Apache and Tomcat setup and
 so far I cannot even get then to talk to each other.  I rebuilt
 mod_jk.so from source.  I copied over what was supposed to be a working
 server.xml, read documentation, and edited things until my eyes are
 watering and I still cannot figure out what I am doing wrong.
 
 When I start tomcat, it creates the directories in
 /var/jakarta/tomcat/work/Apache for only first two Hosts but no compiled
 java appears in them.  If I set the LogLevel on mod_jk.so to debug and
 request a jsp (http://kanga.nationwide-totalflood.com/HomePage.jsp) I get:
 
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
 '/HomePage.jsp' from 2 maps
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
 URI '/servlet/*'
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
 URI '/*.jsp'
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
 worker1 - /*.jsp
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug] jk_handler::mod_jk.c
 (1825): Into handler jakarta-servlet worker=worker1 r-proxyreq=0
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 wc_get_worker_for_name::jk_worker.c (111): found a worker worker1
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 wc_maintain::jk_worker.c (301): Maintaining worker worker1
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_maintain::jk_ajp_common.c (2203): recycled 0 sockets in 0 seconds
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 init_ws_service::mod_jk.c (517): Service protocol=HTTP/1.1 method=GET
 host=(null) addrr=192.168.124.232 name=kanga.nationwide-totalflood.com
 port=80 auth=(null) user=(null) laddr=192.168.150.129 raddr=192.168.124.232
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_get_endpoint::jk_ajp_common.c (2131): acquired connection cache slot=0
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_marshal_into_msgb::jk_ajp_common.c (566): ajp marshaling done
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_service::jk_ajp_common.c (1670): processing with 3 retries
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 jk_open_socket::jk_connect.c (328): socket TCP_NODELAY set to On
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 jk_open_socket::jk_connect.c (341): socket SO_KEEPALIVE set to On
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 jk_open_socket::jk_connect.c (391): timeout 300 set for socket=57
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 jk_open_socket::jk_connect.c (426): trying to connect socket 57 to
 127.0.0.1:8009
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 jk_open_socket::jk_connect.c (452): socket 57 connected to 127.0.0.1:8009
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connect_to_endpoint::jk_ajp_common.c (864): Connected socket 57 to
 (127.0.0.1:8009)
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): sending to ajp13
 pos=4 len=468 max=8192
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 12 34 01
 D0 02 02 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 001000 00 0D
 2F 48 6F 6D 65 50 61 67 65 2E 6A 73 70  - .../HomePage.jsp
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 002000 00 0F
 31 39 32 2E 31 36 38 2E 31 32 34 2E 32  - ...192.168.124.2
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 003033 32 00
 FF FF 00 1F 6B 61 6E 67 61 2E 6E 61 74  - 32.kanga.nat
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 004069 6F 6E
 77 69 64 65 2D 74 6F 74 61 6C 66 6C 6F  - ionwide-totalflo
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00506F 64 2E
 63 6F 6D 00 00 50 00 00 0B A0 0B 00 1F  - od.com..P...
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00606B 61 6E
 67 61 2E 6E 61 74 69 6F 6E 77 69 64 65  - kanga.nationwide
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 00702D 74 6F
 74 61 6C 66 6C 6F 6F 64 2E 63 6F 6D 00  - -totalflood.com.
 [Tue Sep 20 15:52:48 2005] [20650:10400] [debug]
 ajp_connection_tcp_send_message::jk_ajp_common.c (909): 0080A0 0E 00
 4F

Re: Apache - tomcat connections grow very fast

2004-07-02 Thread Stephen Carville
On Wed June 30 2004 4:08 pm, Wade Chandler wrote:
 Stephen Carville wrote:
  Every once in  a while, the number of connections between apache and
  tomcat grows very rapidally, going from 12 or so up to over 150 in a
  matter of about 10 minutes.  This quickly causes the number of httpd
  processes to exceed MaxClients and apache stops accepting new
  connections.  Restarting tomcat relieves the symptom.  This is a recent
  development that first came to my attention abtu two weeks ago.
 
  When the problem happens, 'netstat -natp' shows a bunch of connections
  like:
 
  tcp0  0 127.0.0.1:39164 127.0.0.1:8009
  ESTABLISHED 21886/httpd
 
  with a corresponding connection for the tomcat end:
 
  tcp0  0 127.0.0.1:8009  127.0.0.1:39164
  ESTABLISHED 31723/java
 
  Normally there are about 8 to 12 connections between apache and tomcat. 
  I cannot figure out why the number suddenly peaks like this.  I've
  scoured the http logs and turned on debugging for mod_jk but nothing I've
  tried so far fixes it.  I've had the developers do some extra logging to
  see if any recent code changes could be causing it but that too has
  proved fruitless.
 
  Suggestions are welcome.

 Do you know what is initiating the connections?  

Customers accessing our web site. :-)
 
 8009 is the connection
 between mod_jk and the server.  MaxConnections will be on your port 80
 or what ever port you are running on.  Do you not know the origin of the
 other connections?  

By using /server-status page in apache I have a pretty good idea who is 
connecting when the problem happens.  They are legitimate connections.  This 
does not appear to be a DOS.

 Surely you have connections on the other port 80 or
 what ever you are using?  Are you using some type of an http protocol
 test tool and are you using keep connection?

Yes.  The customer connects on port 80 and, if the requested page is a .jsp or 
servlet the request is sent along to tomcat via mod_jk on port 8009.  Apache 
sends the html the JSP generates back to the customers browser.  Then the 
connection is dropped.  It is the next-to-last step where things don't behave 
as expected.  

I just don't know why nor where to start looking.

 Wade



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

-- 
Stephen Carville
Unix and Network Adminstrator
DPSI
6033 W.Century Blvd.
Los Angeles, CA 90045
310-342-3602

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



Apache - tomcat connections grow very fast

2004-06-30 Thread Stephen Carville
Every once in  a while, the number of connections between apache and tomcat 
grows very rapidally, going from 12 or so up to over 150 in a matter of about 
10 minutes.  This quickly causes the number of httpd processes to exceed 
MaxClients and apache stops accepting new connections.  Restarting tomcat 
relieves the symptom.  This is a recent development that first came to my 
attention abtu two weeks ago.

When the problem happens, 'netstat -natp' shows a bunch of connections like:

tcp0  0 127.0.0.1:39164 127.0.0.1:8009  
ESTABLISHED 21886/httpd

with a corresponding connection for the tomcat end:

tcp0  0 127.0.0.1:8009  127.0.0.1:39164 
ESTABLISHED 31723/java

Normally there are about 8 to 12 connections between apache and tomcat.  I 
cannot figure out why the number suddenly peaks like this.  I've scoured the 
http logs and turned on debugging for mod_jk but nothing I've tried so far 
fixes it.  I've had the developers do some extra logging to see if any recent 
code changes could be causing it but that too has proved fruitless.

Suggestions are welcome.

-- 
Stephen Carville
Unix and Network Adminstrator
DPSI
6033 W.Century Blvd.
Los Angeles, CA 90045
310-342-3602

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



Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Stephen Carville
On Monday March 01 2004 06:42 pm, Christopher Schultz wrote:

  Tried that.  Capped it at 35 and the webserver stopped servicing any
  DB request as soon as the pool reached 35.  This is why I believe the
  pool management is faulty and/or something is hogging all the
  connections.
 
  I share your belief. Let's try to prove it. Raise it to some other
  figure, and see if the same happens again. Ask them how big should the
  figure be.

 In fact, cap it at 10 and watch the app dring to a halt before it even
 gets going. This is a pretty compelling example. If the pool is drying
 up, they're definately screwing up.

Whoa there pardner:  I am not going to deliberately cripple a production box. 
The problem has been demonstated in test environments and that is as far as I 
will intentionally let it go.
 
That said, the information i've gathered here has been helpful.  I am a great 
sysadmin but not a great java programmer so I appreciate it to.

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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



Re: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Stephen Carville
Here is some more information on the problem. From a developer:

According to the document that the link below refers to, a single
instance of Tomcat will have multiple JVMs, where each JVM represents a
virtual host.  The following link clearly states this virtual host concept
as it applies to Tomcat.
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
(please refer the virtual host section).}

As per the above document, each JVM corresponding to a virtual host
contains a database connection pool object. Hence the connection pool that
has been implemented seems to be in-line with the virtual host definition in
the above document.

Also, we are also using the same concept of DBCP in our
applications. The difference in our case is that we have chosen to use
Oracle that also uses the same DataSource class.

OK, it is my understanding that the problem of a new JVM for each virtual host 
was fixed in 4.X.  True?

I RT'ed some more FM on 4.2 and found that the Tomcat developers suggest that 
the connection code be placed in $CATALINA_HOME/common/lib.  I passed that to 
the developers and:

As regards putting the flood.jar in $CATALINA_HOME/common/lib, we
tried it and the behavior was no different.

Is there anyone running tomcat with virtual hosts and do you also have this 
problem?  It is a little hard to beleive this is so difficult to implement 
but hasn't come up before. (at least I couldn't find it in the archives)

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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



Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Stephen Carville
I am having a problem with tomcat opening up up a number of connections to an 
oracle server that never get closed.  This causes the number of open 
connections to build up over time and, eventually, causes the oracle server 
to use all of its swap.  Restarting tomcat clers this up.

I think there is a problem with some jsp's opening connections and then not 
closig them but the developers claim (surprise) their code is clean.  The 
explanation they give is:

The increase in number of connections beyond the CACHE_MAX_SIZE setting in 
the app1.properties file is due to the private labeled sites. For each 
virtual host (private labeled site), there will be a separate JVM running the 
Tomcat web server space. For each of these JVMs, there will be a separate 
database connection cache pool to serve the user requests. This is the 
designed functionality of a web server that will support virtual hosts.

I don't know tomcat near as well as I do Apache but this sounds like someone 
is blowing smoke.  If I run ps on the server it looks to me like there is 
only one instance and if I restart tomcat, _all_ virtual hosts are restarted.  
As near as I can tell from RTFM, tomcat fully supports named based virtual 
domains since about 3.2 or so.

I am using:

Redhat Linux 7.2
Kernel: 2.4.7-10
Apache: 1.3.22
Tomcat: 4.1.24
mod_jk: 1.2.4

I don't care who is right or wrong but I do want to clear up this problem.  
Any ideas?  If you need any more information, just ask.

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.

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



Re: Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Stephen Carville
 on the server it looks to me like there is
  only one instance and if I restart tomcat, _all_ virtual hosts are
  restarted.

 Yeah, then it's definately separate webapps running on a single instance
 of Tomcat. Try to pitch the above idea to your engineers and see what
 they say (probably something like it's fine the way it is!).

Basically yes.  That is what they are saying.  The proposal now is to write 
custom code to handle virtual domains.  AFAIK, there is nothing wrong with 
the way Apache and Tomcat do that already.  It is a waste of time and money 
to reinvent a wheel the Apache group has already done better.

  I don't care who is right or wrong but I do want to clear up this
  problem. Any ideas?  If you need any more information, just ask.

 I think I'd need to know if the connections were really never going
 away. Use netstat to find out what state they're in. If they all say
 ESTABLISHED, then you've got a connection leak.  If many of them say
 TIME_WAIT or something like that, then you might have a problem with
 either the client or the server not properly hanging up the phone. If
 it's the former, then yell at your engineers. 

It is definitely ESTABLISHED  I have a little script that calls netstat on the 
Oracle box (Solaris 8) greps for the port (1521) and pipes that thru some 
perl that prints a count of the connections from each client node that are 
ESTABLISHED versus TIME WAIT.  The particular web server that is causing the 
problem is almost always in the ESTABLISHED column and the connection that do 
get closed generally do not belong the the tomcat process.

I used another program to track the persistence of a socket by host:port.  I 
found that many of the opened a connection from Tomcat on the offending web 
server are not closed until Tomcat is restarted.

 Cap that connection pool
 size at something reasonable, like ten connections. After that, the
 application starves. That's good for the app server and the database,
 while bad for your application. You can use Jakarta Commons' DBCP as
 your connections pool. It has some wonderful debug options, like giving
 you a stack trace for the code that obtained the connection if that
 connection isn't returned within a certain amount of time. That can save
 days or weeks of code reviews. If your connections are in TIME_WAIT, see
 how long they stay that way. Waiting 5-10 minutes for a connection like
 that to get cleaned up is not unheard of. If they're piling up on top of
 one anothor and /never/ going away, it's time to talk to a system
 administrator. If the syadmin is you, it's time to talk to the guy you
 go to when you don't know things. Everyone needs a guy (or girl!) like
 that. :)

I'll mention DBCP and see what happens

 Good luck!

 Let me know if I can offer any more help.

 -chris

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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



Getting Closer to a Working Configuration

2003-06-25 Thread Stephen Carville
OK, I finally have tomcat starting without any errors.  But I still have one 
jsp that barfs.  From catalina.out:

 FILE = /var/jakarta/tomcat/app1.properties
Setting up Properties 0A
Setting up Properties 0B
Setting up Properties 1
Setting up Properties 2
Setting up Properties 3
Setting up Properties 4
The user type --- R
***  *** /var/jakarta/tomcat System.getProperty('catalina.home')
Client Id --- 23462
Query to be executed to get the URL --- SELECT web.url FROM webinterface web, 
webclientinterface interface WHERE web.interfaceid = interface.interfaceid 
AND interface.cltid = 23462
URL to be redirected --- dpsi-corp.com
 select cltid, custname, altcltcd , level  from clientcustmas  where 
activeflag = 'Y'  start with cltid = 23462 connect by prior cltid = pcltid 
order by altcltcd 09072002
 0  select header, companylogo, companyname, siteName, contactphone, 
contactemail  from   webprivatelabelinfo  where sitename = 
'staging.dpsi-corp.com'
Jun 24, 2003 4:19:46 PM org.apache.jk.server.JkCoyoteHandler action
INFO: RESET

app1.properties tells JDBC were to find the oracle database.

Any ideas where to start looking?

The System:
  Redhat 7.2
  Apache 1.3.22
  Tomcat 4.1.24

-- 
Stephen Carville
UNIX and Network Administrator
DPSI (formerly Ace USA Flood Services)
310-342-3602
[EMAIL PROTECTED]

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



Re: Getting Closer to a Working Configuration

2003-06-25 Thread Stephen Carville
On Wednesday 25 June 2003 05:11 am, John Turner wrote:
 Let's take a step back and rephrase that, shall we?  You have a 
working 
 configuration.  You don't have a working JSP. ;)

Could be :-)  The JSP works on the standalone configuration but not in 
the virtual domains.  The particlar jsp that fails contains some 
absolutely byzantine code to handle private label sites (AKA 
virtual domains :-) which worked OK when we had three or four but is 
rapidly getting out of hand.  Right now it takes weeks to get a new 
site up and running for testing.   Maybe it's just thay Java takes 
longer to develop in but I do know I've worked on comparable projects 
using CGI and mod_perl which took less than half the time from start 
to testing to publically accessible.

I'm experimenting with the virtal domains with the aim of speeding 
development.   For several reasons, switcing to Perl would be 
impractical and I'm trying to work with what I have here :-)  For the 
most part, the error messages I see are just so much phlogiston so 
any help is appreciated.

 John
 
 On Tue, 24 Jun 2003 17:27:34 -0700, Stephen Carville 
 [EMAIL PROTECTED] wrote:
 
  OK, I finally have tomcat starting without any errors.  But I 
still have 
  one jsp that barfs.  From catalina.out:
 
   FILE = /var/jakarta/tomcat/app1.properties
  Setting up Properties 0A
  Setting up Properties 0B
  Setting up Properties 1
  Setting up Properties 2
  Setting up Properties 3
  Setting up Properties 4
  The user type --- R
  ***  *** /var/jakarta/tomcat 
System.getProperty('catalina.home')
  Client Id --- 23462
  Query to be executed to get the URL --- SELECT web.url FROM 
webinterface 
  web, webclientinterface interface WHERE web.interfaceid = 
  interface.interfaceid AND interface.cltid = 23462
  URL to be redirected --- dpsi-corp.com
  select cltid, custname, altcltcd , level  from clientcustmas  
where 
  activeflag = 'Y'  start with cltid = 23462 connect by prior cltid 
= 
  pcltid order by altcltcd 09072002
   0  select header, companylogo, companyname, siteName, 
contactphone, 
  contactemail  from   webprivatelabelinfo  where sitename = 
'staging.dpsi- 
  corp.com'
  Jun 24, 2003 4:19:46 PM org.apache.jk.server.JkCoyoteHandler 
action
  INFO: RESET
 
  app1.properties tells JDBC were to find the oracle database.
 
  Any ideas where to start looking?
 
  The System:
  Redhat 7.2
  Apache 1.3.22
  Tomcat 4.1.24
 
 
 
 
 -- 
 Using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/
 
 
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Stephen Carville [EMAIL PROTECTED]
UNIX and Network Administrator
DPSI
6033 W. Century Blvd, Ste 1075
Los Angeles, CA 90045
310-342-3602


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



Re: installing a servlet

2003-06-24 Thread Stephen Carville
If people are having problems getting mod_jk to work there are 
probably reasons.  It may be true that mod_jk works but not always as 
expected.  I have a system that works fine until mod_jk gets involved 
then java starts barfing up 'exceptions' on a couple of jsp's.  
Naturally the developers claim, if the code works in 'standalone' but 
not with mod_jk and virtual domains, the problem is with mod_jk.

On Tuesday 24 June 2003 05:42 am, John Turner wrote:
 Donwgrading and using mod_webapp is the WORST thing you could do, 
for all 
 sorts of reasons.  Security, for one.  Performance, for another.  
Future 
 extensibility and growth, for another.
 
 Mod_jk and mod_jk2 work.  This is a fact.  There's nothing anyone 
can do if 
 you want to give up learning how they work and use something else 
instead, 
 but the truth is they work, and not just on someone's desktop.  
Many, many 
 people are using Tomcat and a connector under heavy load in 
production on a 
 daily basis (I'm one of them and there are many more).  Load 
balancing, 
 multiple instances, all sorts of advanced configurations.  If you 
want to 
 take the time to learn how things work, and why they work that way 
(Tomcat 
 MUST obey the servlet spec, there is no alternative), then you can 
get your 
 answers and have a robust, stable system.  Its a personal choice.  
Good 
 luck.
 
 John
 
 On 24 Jun 2003 07:56:47 +0200, Tony Grant [EMAIL PROTECTED] wrote:
 
  From my work of yesterday it seems that the easiest way to get a 
servlet
  to run is to downgrade to Tomcat 4.0.x and use mod_webapp...
 
  This isn't a very encouraging experience.
 
  Cheers
  Tony Grant 

-- 
Stephen Carville [EMAIL PROTECTED]
UNIX and Network Administrator
DPSI
6033 W. Century Blvd, Ste 1075
Los Angeles, CA 90045
310-342-3602


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



Virtual Domains -- almost

2003-06-24 Thread Stephen Carville
)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)

Apache Tomcat/4.1.24

-- 
Stephen Carville
UNIX and Network Administrator
DPSI (formerly Ace USA Flood Services)
310-342-3602
[EMAIL PROTECTED]

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



Virtual Domains with Tomcat

2003-06-23 Thread Stephen Carville
Right now I am running multiple domains with Tomcat by having a completely 
separate instances attached to a different virtual interface: eth0, eth0:1, 
etc.  This works OK for two or even three domains but it will be getting 
unwieldy as the number of domains increases.  Is there anyway to do virtual 
named domains with Tomcat?  This is dirt simple to do in Apache but the web 
developers only know how to program in Java and Visual Basic so I'm kind of 
stuck with Tomcat.  I've tried using mod_jk but only the Apache side works, 
Tomcat still goes to the same directories for its files no mater what domian 
the request is for.

-- 
Stephen Carville
UNIX and Network Administrator
DPSI (formerly Ace USA Flood Services)
310-342-3602
[EMAIL PROTECTED]

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



Virtual domains with Tomcat

2003-06-23 Thread Stephen Carville
How can I get Tomcat to recognize virtual domains?  This is trivial with 
Apache and I can get Apache to fetch the correct jsp but I cannot get timcat 
to process it.  If I turn off tomcat, apache sends the jsp source.  If I turn 
tomcat on, I get the error 404 page

workers.properties:

workers.tomcat_home-/var/jakarta/tomcat
workers.java_home=/usr/java/jdk
ps=/

# worker list
worker.list=ajp13

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

jk.conf: (Included by the httpd.conf file)

LoadModule jk_module modules/mod_jk.so
JkWorkersFile   /etc/httpd/conf/workers.properties
JkLogFile   /var/log/httpd/mod_jk.log

example Virtual Host

VirtualHost *
ServerName  dookoo.totalflood.com
DocumentRoot/var/jakarta/totalflood/ROOT
  Directory /var/jakarta/totalflood/ROOT
order allow,deny
allow from all
  /Directory
DirectoryIndex  HomePage.jsp
ErrorLog/var/log/httpd/totalflood-error.log
JkMount /*.jsp  ajp13
/VirtualHost

-- 
Stephen Carville
UNIX and Network Administrator
DPSI (formerly Ace USA Flood Services)
310-342-3602
[EMAIL PROTECTED]

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



Re: Virtual domains with Tomcat

2003-06-23 Thread Stephen Carville
On Monday June 23 2003 05:45 am, John Turner wrote:
 It is trivial in Tomcat as well.

 For each Apache ServerName, you will need a corresponding Host entry in
 Tomcat's server.xml.  Make sure each virtual host in Tomcat's server.xml
 has its own appBase.

 For the VirtualHost you posted:

 Host name=dookoo.totalflood.com appBase=/var/jakarta/totalflood
Context path= docBase=ROOT /
 /Host

That works.  Thanks. 

I had to remove the Context ... / -- It caused tomcat fail.  Howewer, it 
seems it is not necessary.

 ...or something very similar.  Put your JSPs in
 /var/jakarta/totalflood/ROOT.  Make sure there is a directory called
 /var/jakarta/totalflood/ROOT/WEB-INF.  Delete your Directory entry that
 allows all, and instead add a Directory entry that restricts WEB-INF and
 META-INF.  This is all covered in the docs for Host and for Context.  An
 example of what configuration for Apache looks like, for a virtual host
 named localhost, is here:

 http://www.johnturner.com/howto/mod_jk_conf.html

 John

 On Fri, 20 Jun 2003 18:21:20 -0700, Stephen Carville

 [EMAIL PROTECTED] wrote:
  How can I get Tomcat to recognize virtual domains?  This is trivial with
  Apache and I can get Apache to fetch the correct jsp but I cannot get
  timcat to process it.  If I turn off tomcat, apache sends the jsp source.
  If I turn tomcat on, I get the error 404 page
 
  workers.properties:
 
  workers.tomcat_home-/var/jakarta/tomcat
  workers.java_home=/usr/java/jdk
  ps=/
 
  # worker list
  worker.list=ajp13
 
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
 
  jk.conf: (Included by the httpd.conf file)
 
  LoadModule jk_module modules/mod_jk.so
  JkWorkersFile   /etc/httpd/conf/workers.properties
  JkLogFile   /var/log/httpd/mod_jk.log
 
  example Virtual Host
 
  VirtualHost *
  ServerName  dookoo.totalflood.com
  DocumentRoot/var/jakarta/totalflood/ROOT
  Directory /var/jakarta/totalflood/ROOT
  order allow,deny
  allow from all
  /Directory
  DirectoryIndex  HomePage.jsp
  ErrorLog/var/log/httpd/totalflood-error.log
  JkMount /*.jsp  ajp13
  /VirtualHost

-- 
Stephen Carville http://www.heronforge.net/~stephen/gnupgkey.txt
--
Mom  Pop were just a couple of kids when they got married. He was
eighteen, she was sixteen and I was three.
 -- Billie Holiday

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



Building Mod_jk on Redhat 7.2

2003-01-16 Thread Stephen Carville
I am trying to build mod_jk for Apache 1.3.X running on Redhat 7.2.  
I downloaded the source, read README.txt set the path to tomcat and 
apache in build.properties, typed 'ant', and I am rewarded with:

Buildfile: build.xml

detect:
 [echo]  jakarta-tomcat-connectors 

BUILD FAILED

/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build.xml:62: 
Could not create task of type: condition. Common solutions are to use 
taskdef to declare your task, or, if this is an optional task, to put 
the optional.jar in the lib directory of your ant installation 
(ANT_HOME).

Total time: 0 seconds

I have no idea what the above means or how to fix it.

-- 
Stephen Carville [EMAIL PROTECTED]
UNIX and Network Administrator
DPSI
6033 W. Century Blvd, Ste 1075
Los Angeles, CA 90045
310-342-3602

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




Re: Building Mod_jk on Redhat 7.2

2003-01-16 Thread Stephen Carville
On Thursday 16 January 2003 01:54 pm, Will Hartung wrote:
  From: Stephen Carville [EMAIL PROTECTED]
  Sent: Thursday, January 16, 2003 1:41 PM
  Subject: Building Mod_jk on Redhat 7.2
 
 
  I am trying to build mod_jk for Apache 1.3.X running on Redhat
  7.2. I downloaded the source, read README.txt set the path to
  tomcat and apache in build.properties, typed 'ant', and I am
  rewarded with:
 
  Buildfile: build.xml
 
  detect:
   [echo]  jakarta-tomcat-connectors 
 
  BUILD FAILED
 
  /home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build
 .xml:62: Could not create task of type: condition. Common
  solutions are to use taskdef to declare your task, or, if this is
  an optional task, to put the optional.jar in the lib directory of
  your ant installation

 This looks like you have the wrong version of Ant installed. You
 need the latest (1.5.x as I recall) in order to build the projects.

 Try upgrading Ant and let us know what happens.

Well. that got me a little further :-)

Buildfile: build.xml

detect:
 [echo]  jakarta-tomcat-connectors 

prepare:
[mkdir] Created dir: 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build
[mkdir] Created dir: 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build/conf
[mkdir] Created dir: 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build/classes
[mkdir] Created dir: 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build/classes/META-INF
[mkdir] Created dir: 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build/lib
 [copy] Copying 8 files to 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build/conf

BUILD FAILED
file:/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/build.xml:105:
Warning: Could not find file 
/home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/coyote/build/lib/tomcat-coyote.jar
 
to copy.

However, I was able to build it from the native directory usig 
autocong and make.

-- 
Stephen Carville [EMAIL PROTECTED]
UNIX and Network Administrator
DPSI
6033 W. Century Blvd, Ste 1075
Los Angeles, CA 90045
310-342-3602

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




Re: Building Mod_jk on Redhat 7.2

2003-01-16 Thread Stephen Carville
That worked, thanks! 

On Thursday 16 January 2003 01:46 pm, Turner, John wrote:
 My advice: don't even deal with ant.

 CONNECTOR_HOME = place where you put connector source

 - cd CONNECTOR_HOME/jk/native. Be sure to READ the file named
 BUILDING. - run the buildconf script: ./buildconf.sh
 - you may see some error messages about aclocal and
 autom4te...these can be ignored.
 - run the configure script: ./configure
 --with-apxs=/some/path/to/apache/bin/apxs
 - run make
 - the mod_jk.so file should be in
 CONNECTOR_HOME/jk/native/apache-1.3. Copy it to your Apache modules
 directory.

 OR

 download a binary

 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/relea
se/v1.2.2 /bin/linux/i386/

 John

  -Original Message-
  From: Stephen Carville [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 16, 2003 4:41 PM
  To: Tomcat User
  Subject: Building Mod_jk on Redhat 7.2
 
 
  I am trying to build mod_jk for Apache 1.3.X running on Redhat
  7.2. I downloaded the source, read README.txt set the path to
  tomcat and apache in build.properties, typed 'ant', and I am
  rewarded with:
 
  Buildfile: build.xml
 
  detect:
   [echo]  jakarta-tomcat-connectors 
 
  BUILD FAILED
 
  /home/stephen/src/jakarta-tomcat-connectors-jk-1.2.2-src/jk/bu
  ild.xml:62:
  Could not create task of type: condition. Common solutions are to
  use taskdef to declare your task, or, if this is an optional
  task, to put the optional.jar in the lib directory of your ant
  installation (ANT_HOME).
 
  Total time: 0 seconds
 
  I have no idea what the above means or how to fix it.
 
  --
  Stephen Carville [EMAIL PROTECTED]
  UNIX and Network Administrator
  DPSI
  6033 W. Century Blvd, Ste 1075
  Los Angeles, CA 90045
  310-342-3602
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:

 mailto:[EMAIL PROTECTED]

-- 
Stephen Carville [EMAIL PROTECTED]
UNIX and Network Administrator
DPSI
6033 W. Century Blvd, Ste 1075
Los Angeles, CA 90045
310-342-3602

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