Re: Performance proxy_ajp vs. mod_jk when TOMCAT integration with Apache

2005-08-16 Thread Christine Ho
Hi,
   Can somebody tell me what the difference between
the proxy_ajp and mod_jk is. 

thanks,
Christine

--- Mladen Turk [EMAIL PROTECTED] wrote:

 Xuekun Hu wrote:
  Hi, 
 From performance point, which connector will be
 used for TOMCAT
  intergration with Apache? proxy_ajp or mod_jk?
  
  I read some docs which said mod_jk should have
 better performance than
  proxying. While proxy_ajp in Apache2.1 is an
 addition to the mod_proxy
  and uses Tomcat's AJP protocol stack. So I ask the
 upper question.
  
 
 Right, both mod_jk and proxy_ajp have almost the
 same performance,
 and they are up to twice as fast compared with http
 mostly because
 of constant connection pool. AJP protocol gives it's
 share too
 by transferring less data across the wire.
 
 If you are using Apache 2.1+ there is no need to use
 mod_jk and
 maintain additional module.
 
 Regards,
 Mladen.
 

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





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



RE: Connector for apache and tomcat

2005-06-16 Thread Christine Ho
I fixed the problem already.

thanks,
Christine

--- Christine Ho [EMAIL PROTECTED] wrote:

 Thanks. I have tried it and I still cant make it
 work.
 But it is better than before. I got HTTP status 404
 -
 /jsp-eg/index.html. 
 
 In error.log in apache, I got the following:
 
 [Wed Jun 15 15:33:04 2005] [emerg] No JkShmFile
 defined in httpd.conf. LoadBalancer will not
 function
 properly!
 No JkShmFile defined in httpd.conf. LoadBalancer
 will
 not function properly!
 [Wed Jun 15 15:33:08 2005] [emerg] No JkShmFile
 defined in httpd.conf. LoadBalancer will not
 function
 properly!
 
 In mod_jk.log in apache, I got the following:
 
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_connection_tcp_get_message::jk_ajp_common.c
 (1024): received from ajp13 pos=0 len=96 max=8192
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_unmarshal_response::jk_ajp_common.c (606):
 status
 = 404
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_unmarshal_response::jk_ajp_common.c (613):
 Number
 of headers is = 2
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_unmarshal_response::jk_ajp_common.c (669):
 Header[0] [Content-Type] = [text/html;charset=utf-8]
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_unmarshal_response::jk_ajp_common.c (669):
 Header[1] [Content-Length] = [1019]
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_connection_tcp_get_message::jk_ajp_common.c
 (1024): received from ajp13 pos=0 len=1023 max=8192
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ws_write::mod_jk.c (380): writing 1019 (1019) out of
 1019
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_connection_tcp_get_message::jk_ajp_common.c
 (1024): received from ajp13 pos=0 len=2 max=8192
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 ajp_done::jk_ajp_common.c (2046): recycling
 connection
 cache slot=0 for worker ajp13
 [Wed Jun 15 16:42:34 2005] [3800:] [debug]
 jk_handler::mod_jk.c (1959): Service finished with
 status=404 for worker=ajp13
 
 I am not sure what went wrong.
 
 In httpd.conf in apache, I added/modified the
 following lines:
 
 ServerRoot /export/chrisho/apache2
 
 LoadModule jk_module libexec/mod_jk.so
 
 Directory

/export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples/WEB-INF
   Options -Indexes FollowSymLinks
   Deny from all
 /Directory
 
 JkWorkersFile conf/workers.properties
 JkLogfile logs/mod_jk.log
 JkLogLevel debug
 
 Alias /jsp-eg

/export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples
 Alias /servlets-eg

/export/chrisho/jakarta-tomcat-5.5.9/webapps/servlets-examples
 
 JkMount /jsp-eg/*.jsp ajp13
 JkMount /jsp-eg/*.html ajp13
 JkMount /servlets-eg/*.html ajp13
 
 The workers.properties in apache2 looks like the
 following:
 

workers.tomcat_home=/export/chrisho/jakarta-tomcat-5.5.9
 ps=/
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 
 
 In server.xml in tomcat 5.5.9, I added/modified the
 following lines:
 
 Listener
 className=org.apache.jk.config.ApacheConfig
   configHome=/export/chrisho/jakarta-tomcat-5.5.9
   modJk=/export/chrisho/apache2/libexec/mod_jk.so
   jkWorker=ajp13
   forwardAll=False
   jkLog=/export/chrisho/apache2/logs/jk-tomcat.log
   jkDebug=debug
   noRoot=False
  

workersConfig=/export/chrisho/apache2/conf/workers.properties
 /
 Connector port=8009

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 redirectPort=8443 protocol=AJP/1.3 /
 
 Then I restart the tomcat and apache respectively. I
 have no problem to go to the following link through
 tomcat:
 
 http://localhost:8080/jsp-examples/index.html
 
 But I have problem to go to the following link
 through
 apache:
 
 http://localhost/jsp-eg/index.html
 
 Can somebody please help me.
 
 thanks,
 Christine
 
 
 --- [EMAIL PROTECTED] wrote:
 
  Please refer to message 128209 for a complete
 howto.
  
   
  
  Request it by sending an email to :
  
   
  
  [EMAIL PROTECTED]
  
   
  
   
  
  
 
 
 
   
 __ 
 Discover Yahoo! 
 Get on-the-go sports scores, stock quotes, news and
 more. Check it out! 
 http://discover.yahoo.com/mobile.html
 

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


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

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



Apache/Tomcat in-process

2005-06-16 Thread Christine Ho
hi,
  Anybody knows how to make apache and tomcat are
running in the same process? I read somewhere and said
that it can be done but it is not easy. Anyone tried
it? if so, please give me some pointers.

thanks,
Christine

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

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



Connector for apache and tomcat

2005-06-15 Thread Christine Ho
Hi,
  I am running the apache server 2.x and tomcat 5.5.x
on RHEL4. I tried to setup the connector (JK1.2)
between them and it didnt work. I know how to do the
configuration on apache side. And I have documentation
how to modify the Tomcat 4.1.x's server.xml file so
that the tomcat can listen to the AJP13 requests.
However, the jar files in tomcat 5.5.x is quite
different from the ones in tomcat 4.1.x. I am not sure
what needs to be modified in the tomcat 5.5.x's
server.xml. Please give me some pointers how to do it.
Besides the server.xml and workers.properties, what
other things are required for tomcat 5.5.x to run on
the connector?

The integration between apache and tomcat is a must
for my project. I cannot use just apache alone or
tomcat alone.

thanks,
Christine



__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



RE: Connector for apache and tomcat

2005-06-15 Thread Christine Ho
Thanks. I have tried it and I still cant make it work.
But it is better than before. I got HTTP status 404 -
/jsp-eg/index.html. 

In error.log in apache, I got the following:

[Wed Jun 15 15:33:04 2005] [emerg] No JkShmFile
defined in httpd.conf. LoadBalancer will not function
properly!
No JkShmFile defined in httpd.conf. LoadBalancer will
not function properly!
[Wed Jun 15 15:33:08 2005] [emerg] No JkShmFile
defined in httpd.conf. LoadBalancer will not function
properly!

In mod_jk.log in apache, I got the following:

[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c
(1024): received from ajp13 pos=0 len=96 max=8192
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_unmarshal_response::jk_ajp_common.c (606): status
= 404
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_unmarshal_response::jk_ajp_common.c (613): Number
of headers is = 2
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669):
Header[0] [Content-Type] = [text/html;charset=utf-8]
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669):
Header[1] [Content-Length] = [1019]
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c
(1024): received from ajp13 pos=0 len=1023 max=8192
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ws_write::mod_jk.c (380): writing 1019 (1019) out of
1019
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c
(1024): received from ajp13 pos=0 len=2 max=8192
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
ajp_done::jk_ajp_common.c (2046): recycling connection
cache slot=0 for worker ajp13
[Wed Jun 15 16:42:34 2005] [3800:] [debug]
jk_handler::mod_jk.c (1959): Service finished with
status=404 for worker=ajp13

I am not sure what went wrong.

In httpd.conf in apache, I added/modified the
following lines:

ServerRoot /export/chrisho/apache2

LoadModule jk_module libexec/mod_jk.so

Directory
/export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples/WEB-INF
  Options -Indexes FollowSymLinks
  Deny from all
/Directory

JkWorkersFile conf/workers.properties
JkLogfile logs/mod_jk.log
JkLogLevel debug

Alias /jsp-eg
/export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples
Alias /servlets-eg
/export/chrisho/jakarta-tomcat-5.5.9/webapps/servlets-examples

JkMount /jsp-eg/*.jsp ajp13
JkMount /jsp-eg/*.html ajp13
JkMount /servlets-eg/*.html ajp13

The workers.properties in apache2 looks like the
following:

workers.tomcat_home=/export/chrisho/jakarta-tomcat-5.5.9
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1


In server.xml in tomcat 5.5.9, I added/modified the
following lines:

Listener
className=org.apache.jk.config.ApacheConfig
  configHome=/export/chrisho/jakarta-tomcat-5.5.9
  modJk=/export/chrisho/apache2/libexec/mod_jk.so
  jkWorker=ajp13
  forwardAll=False
  jkLog=/export/chrisho/apache2/logs/jk-tomcat.log
  jkDebug=debug
  noRoot=False
 
workersConfig=/export/chrisho/apache2/conf/workers.properties
/
Connector port=8009
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
redirectPort=8443 protocol=AJP/1.3 /

Then I restart the tomcat and apache respectively. I
have no problem to go to the following link through
tomcat:

http://localhost:8080/jsp-examples/index.html

But I have problem to go to the following link through
apache:

http://localhost/jsp-eg/index.html

Can somebody please help me.

thanks,
Christine


--- [EMAIL PROTECTED] wrote:

 Please refer to message 128209 for a complete howto.
 
  
 
 Request it by sending an email to :
 
  
 
 [EMAIL PROTECTED]
 
  
 
  
 
 




__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

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