MOD_JK (Apache+Tomcat)

2003-12-29 Thread Hari Om
Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and 
put in /modules directory. When I run my Tomcat first and then Apache and 
then acceess http://My.domian.name/kuki it does not work... it says "Page 
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot 
find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my Config 
Files:

---
SERVER.XML
---
# added following after 



  

~~~

---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5
~~~
---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##

 LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"
JkLogLevel info




   ServerName my.domain.name
   JkMount /kuki ajp13
   JkMount /kuki/* ajp13
   JkMount /examples ajp13
   JkMount /examples/* ajp13

~~~

HTTPD.CONF

Listen My.IP.ADDR.ESS:80

 LoadModule jk_module modules/mod_jk.so

ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"
JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /kuki ajp13
JkMount /kuki/* ajp13
~~~
Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM

_
Get reliable dial-up Internet access now with our limited-time introductory 
offer.  http://join.msn.com/?page=dept/dialup

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


MOD_JK (Apache+Tomcat)

2003-12-30 Thread HARI OM
Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and 
put in /modules directory. When I run my Tomcat first and then Apache and 
then acceess http://My.domian.name/kuki it does not work... it says "Page 
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot 
find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my Config 
Files:

---
SERVER.XML
---
# added following after 








  



~~~

---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5
~~~

---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##


LoadModule jk_module /usr/local/apache2/modules/mod_jk.so


JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"

JkLogLevel info




   ServerName my.domain.name

   JkMount /kuki ajp13
   JkMount /kuki/* ajp13

   JkMount /examples ajp13
   JkMount /examples/* ajp13

~~~


HTTPD.CONF

Listen My.IP.ADDR.ESS:80


LoadModule jk_module modules/mod_jk.so


ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /kuki ajp13
JkMount /kuki/* ajp13
~~~

Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM



mod_jk (Apache + Tomcat)

2003-10-09 Thread Mariano Cristóbal
I have configured apache 2.0.47 + tomcat 4.1.27 with mod_jk 2.0.2 on a Red Hat 6.2 
distribution.

It seems to work fine but in the error_log file I obtain the following message:

[error] mod_jk child init 1 0


I dont know what is the problem.

Thanks












Re: MOD_JK (Apache+Tomcat)

2003-12-29 Thread Jerry Ford
Hari:

You're trying to do too much too soon. 

Get the Apache -> Tomcat connection through mod_jk to work before you 
try to get your own webapp to work.  Use the Tomcat example servlets to 
verify that mod_jk is correctly installed and functional.  If you can 
run the servlets through Apache (without :8080 in the URL) then you know 
mod_jk is okay, and you can focus exclusively on your webapp.

Webapp deployment and mod_jk are both complicated enough on their own 
without trying to mix the issues together.

Jerry

Hari Om wrote:

Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source 
and put in /modules directory. When I run my Tomcat first and then 
Apache and then acceess http://My.domian.name/kuki it does not work... 
it says "Page cannot be found" wonder why? I also try to see 
MOD_JK.LOG file but I cannot find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my 
Config Files:

---
SERVER.XML
---
# added following after 



  

~~~ 

---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5
~~~ 

---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##

 LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"
JkLogLevel info




   ServerName my.domain.name
   JkMount /kuki ajp13
   JkMount /kuki/* ajp13
   JkMount /examples ajp13
   JkMount /examples/* ajp13

~~~ 


HTTPD.CONF

Listen My.IP.ADDR.ESS:80

 LoadModule jk_module modules/mod_jk.so

ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"
JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /kuki ajp13
JkMount /kuki/* ajp13
~~~ 

Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM

_
Get reliable dial-up Internet access now with our limited-time 
introductory offer.  http://join.msn.com/?page=dept/dialup

-
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: MOD_JK (Apache+Tomcat)

2003-12-30 Thread Hari Om
Thanks Jerry,

My Apache and Tomcat are working independently.ie when I run 
http://my.domain.name:8080/kuki or http://my.domain.name:8080/examples  
...it works just great problem only occurs when I use connector MOD_JK. 
Any related informaiton is appreciated..

HARI OM

Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and 
put in /modules directory. When I run my Tomcat first and then Apache and 
then acceess http://My.domian.name/kuki it does not work... it says "Page 
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot 
find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my Config 
Files:

---
SERVER.XML
---
# added following after 



 

~~~

---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5
~~~
---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"
JkLogLevel info




  ServerName my.domain.name
  JkMount /kuki ajp13
  JkMount /kuki/* ajp13
  JkMount /examples ajp13
  JkMount /examples/* ajp13

~~~

HTTPD.CONF

Listen My.IP.ADDR.ESS:80

LoadModule jk_module modules/mod_jk.so

ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"
JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /kuki ajp13
JkMount /kuki/* ajp13
~~~
Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM

_
Make your home warm and cozy this winter with tips from MSN House & Home.  
http://special.msn.com/home/warmhome.armx

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


Re: MOD_JK (Apache+Tomcat)

2003-12-30 Thread HARI OM
any update on this?

- Original Message -
From: "HARI OM" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 10:16 AM
Subject: MOD_JK (Apache+Tomcat)


Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and
put in /modules directory. When I run my Tomcat first and then Apache and
then acceess http://My.domian.name/kuki it does not work... it says "Page
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my Config
Files:

---
SERVER.XML
---
# added following after 








  




~~~

---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5

~~~

---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##


LoadModule jk_module /usr/local/apache2/modules/mod_jk.so


JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"

JkLogLevel info




   ServerName my.domain.name

   JkMount /kuki ajp13
   JkMount /kuki/* ajp13

   JkMount /examples ajp13
   JkMount /examples/* ajp13


~~~


HTTPD.CONF

Listen My.IP.ADDR.ESS:80


LoadModule jk_module modules/mod_jk.so


ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /kuki ajp13
JkMount /kuki/* ajp13

~~~

Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM



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



Re: MOD_JK (Apache+Tomcat)

2003-12-30 Thread Jerry Ford
Here's how I did it:

http://www.katzenjammer.us/~jford/apache/tomcat/connectors/mod_jk_setup.shtml

Not exactly your setup (I use Apache 1.3.27 and Red Hat 9.0) but maybe 
it will help.

Jerry

HARI OM wrote:

any update on this?

- Original Message -
From: "HARI OM" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 10:16 AM
Subject: MOD_JK (Apache+Tomcat)
Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and
put in /modules directory. When I run my Tomcat first and then Apache and
then acceess http://My.domian.name/kuki it does not work... it says "Page
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
find this file anywhere.
Can anyone help me out in connecting Apache and Tomncat. Here are my Config
Files:
---
SERVER.XML
---
# added following after 



 


~~~
---
WORKERS.PROPERTIES
---
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5

~~~
---
MOD_JK.CONF 
---
## Auto generated on Mon Dec 29 14:10:45 MST 2003##

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"
JkLogLevel info




  ServerName my.domain.name
  JkMount /kuki ajp13
  JkMount /kuki/* ajp13
  JkMount /examples ajp13
  JkMount /examples/* ajp13


~~~

HTTPD.CONF

Listen My.IP.ADDR.ESS:80

LoadModule jk_module modules/mod_jk.so

ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"
JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /kuki ajp13
JkMount /kuki/* ajp13

~~~
Can anyone please GUIDE me on this Connection Process?

THANKS! and HAPPY NEW YEAR!

HARI OM



-
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]


mod_jk (Apache-Tomcat) problem

2003-10-21 Thread Robert Hall
Hi,

I'm new to this list and hoping someone can help with the following problem.

We have a JBoss (3.2.1) install w/embedded Tomcat (4.1.24) fronted by
Apache 1.3.27 running on Solaris.
The problem: mod_jk is setting the "Content-Length" header value to 0 for
"Content-Type" of text/html when an HTML document is requested from our
docdownload servlet.  Other text/html content is delivered w/o a problem.
Behavior is same whether or not we set the "Content-Length" header in our
servlet code.
From apache/logs/jk2.log:

[Tue Oct 21 18:50:29 2003]  ( info) [mod_jk2.c (465)]: 
mod_jk.translate(): uriMa
p /courseweb-qa/util/docdownload/2003/Fa/COM+LIT/R1A/001/ lb:lb
[Tue Oct 21 18:50:29 2003]  ( info) [mod_jk2.c (362)]: mod_jk.handler() 
per dir
worker for 0x1b34f8 0x198d98
[Tue Oct 21 18:50:29 2003]  ( info) [mod_jk2.c (405)]: modjk.handler() 
Calling l
b:lb 0x198d98
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (110)]: 
service.head(
) 200 2
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (119)]: 
service.head(
) Content-Type: text/html 0 2
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (119)]: 
service.head(
) Content-Length: 0 1 
2   
< 0, should be 9408
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (243)]: 
service.write
()  4096 (4096) out of 8184
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (243)]: 
service.write
()  4088 (4088) out of 4088
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (243)]: 
service.write
()  8 (8) out of 8
[Tue Oct 21 18:50:29 2003]  ( info) [jk_service_apache13.c (243)]: 
service.write
()  1216 (1216) out of 1216

Any solutions, suggestions, pointers will be most appreciated.

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


mod_jk, apache, tomcat and solaris 8

2003-06-06 Thread John Sheehan
Hi

We are having problems with load balancing of apache and tomcat on solaris.
We have 4 solaris servers, 2 with apache 2.0.45 installed and 2 with Tomcat
4.1.24.  We are using mod_jk on the apache servers to connect to the two tom
cat servers and get them to load balance and failover, the idea being that 1
of the apache machines and 1 of the tomcat machines can fail and the system
will keep running.

Everything is configured and running and load balancing works well across
the platforms, however, if we simulate a failure of one of the tomcat
servers (by disconnecting the network cable to make it disappear), the
apache server which is currently connected to the "failed" server does not
fail over to the other tomcat server.

Note 1: if we shut down either tomcat server (using shutdown.sh) then the
apache server correctly fails over to the other tomcat server.

Note 2: we tried the same thing on a MS Windows platform, and the failover
worked (albeit there was a 60 second delay in the fail over happening).

Here are the relevant (in our opinion) bits of our config files

*** httpd.conf relevant section

LoadModule jk_module modules/mod_jk-2.0.43.so
JkWorkersFile /usr/local/apache2/conf/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevel debug
JkMount /*.jsp loadbalancer
JkMount /servlet/* loadbalancer
JkMount /* loadbalancer


*** workers.properties relevant section

worker.list=loadbalancer

worker.tc1.port=8009
worker.tc1.host=192.168.0.6
worker.tc1.type=ajp13
worker.tc1.cachesize=10
worker.tc1.cache_timeout=10
worker.tc1.socket_timeout=10
worker.tc1.lbfactor=1
worker.tc1.socket_keepalive=0

worker.tc2.port=8009
worker.tc2.host=192.168.0.122
worker.tc2.type=ajp13
worker.tc2.cachesize=10
worker.tc2.cache_timeout=10
worker.tc2.socket_timeout=10
worker.tc2.lbfactor=1
worker.tc2.socket_keepalive=0

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tc1,tc2
worker.loadbalancer.sticky_session=0

We've been baffled by this for a few days now, so if anyones got any ideas
we would really appreciate some help.

Regards

John Sheehan
Cyantel
www.cyantel.com
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003


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



mod_jk Apache-Tomcat. how to execute jsp?

2003-09-14 Thread Moon Moon
Hi All,

I am using siteminder Apache reverse proxy
which has a proxy engine running on tomcat.
I am facing a problem with executing a JSP/Servlet on this combination.
Here when I start my reverse proxy it itself start the engine as well as the 
proxy.

I have made following changes in httpsd.conf file

LoadModule jk_module "/tomcat3.2/platform/win32-x86/mod_jk.so"

AddModule mod_jk.c

JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
Include "\conf\mod_jk.conf-auto"

In the Apache httpsd.access.log I get error
10.5.10.12 - - [14/Sep/2003:13:01:03 +0400] "GET /siteminderagent/Test.jsp 
HTTP/1.1" 200 422

in the Tomcat mod_jk.log I get error
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL 
parameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, 
NULL parameters

I am not able to execute the jsp/servlet.
can anybody help me on this.
Thanks & Rgds,
Rakesh
_
Access Hotmail from your mobile now. 
http://server1.msn.co.in/sp03/mobilesms/ Click here.

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


Number of processes and relationship to mod_jk, Apache, tomcat

2003-10-28 Thread Andrew Panagos
I am trying to understand the relationship between applications in Tomcat,
the number of Tomcat processes, Apache mod_jk and the number of threads.

For instance on a system I have the following
Apache 1.3.28, Tomcat 4.1.27, Java 1.4.2_02
I use the follow commands to see what is listening to different ports to get
an idea of what process or threads are running.
Apache: lsof -i tcp:80 | wc -l
This gives me 12 processes listening to port 80 (I checked these are related
to the number of Apache instances)

Tomcat direct port: lsof -i tcp:8080 | wc -l
This gives me 50 process that also correspond to the number of tomcat
instances running(i.e. the number of java instances I see in ps )

Tomcat mod_jk port:
lsof -i tcp:8009 | wc -l
gives me 550

I have included my condensed jk.properties and workers.properties files at
the end if that may help.
Now I now that these numbers will change depending on load but I am trying
to understand the relationship.

So my questions is how do the numbers relate to each other?
How does this effect performance?
How could I tune these numbers?

Now I have a vague understanding of how these relate but the numbers don't
add up for me. I have read the docs and searched for quite a while for a
better description.

Thanks

FILE: jk.properties

###
LoadModule jk_module libexec/mod_jk.so
JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %U %T %b"

## /examples1
Alias /examples1 /usr/local/tomcat/webapps/examples1

AllowOverride None
deny from all

JkMount /examples1/* worker1

## /ctrials
Alias /ctrials /usr/local/tomcat/webapps/ctrials

AllowOverride None
deny from all

JkMount /ctrials/* worker1

## /syndication
Alias /syndication /usr/local/tomcat/webapps/syndication

AllowOverride None
deny from all

JkMount /syndication/* worker1

## /fellowship
Alias /fellowship /usr/local/tomcat/webapps/fellowship

AllowOverride None
deny from all

JkMount /fellowship/* worker1

## /test
Alias /test /usr/local/tomcat/webapps/test

AllowOverride None
deny from all

JkMount /test/* worker1

# All jsp go to worker1
JkMount /*.jsp worker1
# All servlets goes to worker1
JkMount /*/servlet/ worker1


##

FILE: workers.properties

##
# Define some properties
workers.apache_log=/usr/local/apache/logs/
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java/
ps=/

# Define workers
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
#worker.worker1.cachesize=10
#worker.worker1.cache_timeout=300
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

# how many ms to wait for PONG after sending a PING for connection
worker.worker1.connect_timeout=2000
# how many ms to wait for PONG after sending a PING before posting data
worker.worker1.prepost_timeout=2000
# how long to wait for a reply after sending data before server considers
connection dead
worker.worker1.reply_timeout=180


##


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



Re: Number of processes and relationship to mod_jk, Apache, tomcat

2003-10-28 Thread Christopher Schultz
Andrew,
I am trying to understand the relationship between applications in Tomcat,
the number of Tomcat processes, Apache mod_jk and the number of threads.

Apache: lsof -i tcp:80 | wc -l
This gives me 12 processes listening to port 80 (I checked these are related
to the number of Apache instances)
You should be able to predict this from the httpd.conf file. Do the 
numbers add up for Apache?

Tomcat direct port: lsof -i tcp:8080 | wc -l
This gives me 50 process that also correspond to the number of tomcat
instances running(i.e. the number of java instances I see in ps )
What UNIX flavor are you running? I know that in old versions of Linux, 
each pthread was shown as a separate process. Thus, it looked like many 
processes (really threads) all held the same resource. For example, they 
all had the same resident memory footprint (because the memory is 
shared) and they all were bound to the same ports.

In the later versions (mine being one of them, I've got kernel 2.4.20), 
they only show up as one process. Thus, I get this output:

[EMAIL PROTECTED] ]# /usr/sbin/lsof -i tcp:8009
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
java9313 tomcat   15u  IPv4  69785   TCP *:8009 (LISTEN)
[EMAIL PROTECTED] ]#
I'm guessing that you're getting multiple lines that all look like this. 
Is this accurate? Only one process can bind to a port at any given time, 
so multiple processes (even with separate pids) might appear to be bound 
to that port.

Tomcat mod_jk port:
lsof -i tcp:8009 | wc -l
gives me 550
Again, see the discussion of the threads/processes above.

Also note that you may have many more threads that you thought you 
would. I recall that each (non-"nio") stream in Java requires a separate 
thread, so System.in, System.out, and System.err already give you three 
threads. Then, you've got the main thread, plus the thread pool to serve 
requests from remote clients. That may be large, although having that 
number higher than your Apache request processor limit is probably a waste.

Now I know that these numbers will change depending on load but I am trying
to understand the relationship.
Well, some numbers should not change. For example, there should be a 
hard limit on the number of Apache threads/processes running. You can 
tune that in httpd.conf.

For the Java process, it's harder to predict because of the way the VM 
retires threads and when your server is creating them. Ideally, new 
threads wouldn't be created at all because there would be a closed 
thread pool (unless you have a min and max thread pool size and the 
number of threads depends on load).

So my questions is how do the numbers relate to each other?
The number of Apache processes is usually completely unrelated to the 
java process counts (except that there will be more java threads than 
Apache processes :).

How does this effect performance?
Most of the "processes" are very lightweight. Apache is a lean, mean, 
web-serving machine so don't worry about that. What you should worry 
about is if your thread count continually goes up and never comes back 
down. You'd have a nasty resource leak, then. If you avoid creating your 
own threads in your web application (which you should be avoiding 
anyway), you're generally okay.

-chris

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


mod_jk/apache + tomcat 3.2.1 keep connections open after Browser closes

2001-03-13 Thread Mario Oschwald

Hi,

we are writing a chat application that uses a continous stream of data
via a JspWriter to the browser.
To detect if a client closes the connection by killing her Browserwindow
we catch the IOexception thrown
if a JspWriter.flush() method fails due to a loss of connection. Now
this works perfectly fine when talking 
directly to Tomcat via its Http connector.
But when we use Apache & mod_jk as intermediary between Browser and
Tomcat a strange phenomenom happens:

mod_jk works fine and honours the flush method of the jspWriter by
sending the data directly, without buffering.

When the client closes the connection (by closing/killing Browser
window) the JspWriter method does not throw an 
IOException but sends the data unhindered to apache and mod_jk. Apache
meanwhile is unable to totally close the
TCP connection on its side to the client and stays forever in the CLOSE
state (seen via netstat) but still accepts all
the data send from Tomcat. We tried sending many kilobytes from Tomcat
but have not seen that any buffer ooff apache or
mod_jk would keep the data. It just goes nowhere!?

Has anbody seen something similar? Or in a more generic way "How does
mod_jk handle a closed connection from the Browserside
if Tomcat is still sending data and would do so potentially forever
(like in this Chat Situation/where all data is send over a continous
stream)?"
Could it be that mod_jk always waits till the end of data send from
Tomcat util it acknowledges the closed connection from the client?

Sorry if this problem is described somewhat confusingly, I hope someone
gets the general idea and would be willing to clarify
anything necessary to describe the problem.

Thanks,

Mario Oschwald

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