Re: Mod_jk setup problems
Thanks Mark, I this helped a lot ... I'll insert comments as well... ;) Mark Eggers wrote: A couple of things here. I'll try to insert comment where appropriate. --- Don Boling [EMAIL PROTECTED] wrote: I can't seem to get anything to successfully pass though the mod_jk connector to the webapp. What version of mod_jk? mod_jk 1.2.14 My mod_jk.conf , workers.properties are as follows. $ less mod_jk.conf # JkWorkersFile /usr/local/etc/apache/workers.properties JkLogFile /var/log/jk.log JkLogLevel debug Later versions of mod_jk need JkShmFile on UNIX. I removed the loadbalance setting... do I still need this? I have not seen any reference as to what this should be set to. JkMount /*.jsp worker1 JkMount /servlet/* worker1 JkMount /examples/* worker1 JkMount /docstore worker1 JkMount /docstore/* worker1 My installs of Tomcat on Linux and Windows do not have an examples web application. I have /jsp-examples and a /servlets-examples contexts. You might try: JkMount /jsp-examples/*.jsp worker1 JkMount /servlet-examples/servlet/* worker1 I corrected these, thanks for pointing those out... I don't know what your other applications are, but I'll comment on a general setup in a bit. # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.reclycle_timeout=300 You probably don't need worker.worker1.lbfactor since you're not using load balancing. Recycle (worker.worker1.reclycle_timeout) needs to be spelled correctly. oops, thanks ... new mod_jk.conf is ... $ less mod_jk.conf # JkWorkersFile /usr/local/etc/apache/workers.properties JkLogFile /var/log/jk.log JkLogLevel debug VirtualHost localhost ServerName localhost # Sample JkMounts. Replace these with the paths you would # like to mount from your JSP server. JkMount /*.jsp worker1 JkMount /servlet-examples/servlet/* worker1 JkMount /jsp-examples/*.jsp worker1 JkMount /docstore worker1 JkMount /docstore/* worker1 /VirtualHost mod_jk.conf (END) [Lots of log stuff deleted] With the exceptin of docstore, I did not see anything that matched your JkMount statements. Since there was no match, no requests were forwarded. In general, you will probably not have $CATALINA_HOME/webapps and Apache's DocumentRoot ovelapping each other. Since they don't overlap, Apache will not know anything about static files (html, css, etc.) that live in $CATALINA_HOME/webapps. You can use Directory and Alias directives in Apache to set up access and map the directory into a URI space that Apache knows about. With later versions of mod_jk, you can use JkAutoAlias to map directories for you. From the documentation at http://jakarta.apache.org/tomcat/connectors-doc/config/apache.html JkAutoAlias /opt/tomcat/webapps Then you can use JkMount to map certain requests (*.jsp, /*/servlet/*). JkMount /jsp-examples/*.jsp worker1 The value of JkAutoAlias appears to be prepended to the JkMount directive to find the physical location. I've not used JkAutoAlias, but this appears to be a nice alternative to Directory and Alias directives in httpd.conf. I am trying the JkAutoAlias route ... almost there. In short: 1. Add JkShmFile to httpd.conf 2. Remove lbfactor from workers.properties 3. Change the spelling of recycle 4. Use JkAutoAlias or Directory / Alias directives to put the appropriate directories within Apache's document and URI space. I hope that gets you up and running. /mde/ I have it running now with 'less' errors in jk.log ... I have noticed that 8080 is not responding any more if I just try to hit TC directly so I think, correct me if I'm wrong... this won't work even if setup correctly, until I fix that. Thanks again, Don - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_jk setup problems
Glad I was able to help a little bit. In my experience (Linux,Solaris,Win/2K), 8080 should always work if you have the Connector configured. If you can't get to http://localhost:8080/jsp-examples/ running, then there is something else amiss. In your httpd.conf file, I still didn't see something like the following: JkShmFile /var/log/memory.shm This wasn't necessary in 1.2.6 and may not be necessary in 1.2.14, but according to the documentation it's used on UNIX platforms. In workers.properties lbfactor is used to set the relative weight of a worker when you're doing load balancing. Since you're not doing load balancing, letting it default to 1 should be fine. You have two JkMounts for docstore. I'm thinking that only: JkMount /docstore/* worker1 is necessary. If the entire web application (including static files) lives in $CATALINA_HOME/webapps, then the Apache process will need access to those directories and files. Finally, a long time ago the order of startup was important. I think it was Tomcat first, then Apache. It's been a while, and right now I'm on the Windows side of this machine so I can't check. The order of startup issue went away with Apache 2.0.x, but it may still be an issue with your environment (Apache 1.3.x). I would be interested in seeing your error logs from mod_jk as well as seeing what catalina.out has in it when you try to get to a web application via port 8080. Hope this gives you some avenues to explore. /mde/ __ 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]
Re: Mod_jk setup problems
A couple of things here. I'll try to insert comment where appropriate. --- Don Boling [EMAIL PROTECTED] wrote: I can't seem to get anything to successfully pass though the mod_jk connector to the webapp. What version of mod_jk? My mod_jk.conf , workers.properties are as follows. $ less mod_jk.conf # JkWorkersFile /usr/local/etc/apache/workers.properties JkLogFile /var/log/jk.log JkLogLevel debug Later versions of mod_jk need JkShmFile on UNIX. JkMount /*.jsp worker1 JkMount /servlet/* worker1 JkMount /examples/* worker1 JkMount /docstore worker1 JkMount /docstore/* worker1 My installs of Tomcat on Linux and Windows do not have an examples web application. I have /jsp-examples and a /servlets-examples contexts. You might try: JkMount /jsp-examples/*.jsp worker1 JkMount /servlet-examples/servlet/* worker1 I don't know what your other applications are, but I'll comment on a general setup in a bit. # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.reclycle_timeout=300 You probably don't need worker.worker1.lbfactor since you're not using load balancing. Recycle (worker.worker1.reclycle_timeout) needs to be spelled correctly. [Lots of log stuff deleted] With the exceptin of docstore, I did not see anything that matched your JkMount statements. Since there was no match, no requests were forwarded. In general, you will probably not have $CATALINA_HOME/webapps and Apache's DocumentRoot ovelapping each other. Since they don't overlap, Apache will not know anything about static files (html, css, etc.) that live in $CATALINA_HOME/webapps. You can use Directory and Alias directives in Apache to set up access and map the directory into a URI space that Apache knows about. With later versions of mod_jk, you can use JkAutoAlias to map directories for you. From the documentation at http://jakarta.apache.org/tomcat/connectors-doc/config/apache.html JkAutoAlias /opt/tomcat/webapps Then you can use JkMount to map certain requests (*.jsp, /*/servlet/*). JkMount /jsp-examples/*.jsp worker1 The value of JkAutoAlias appears to be prepended to the JkMount directive to find the physical location. I've not used JkAutoAlias, but this appears to be a nice alternative to Directory and Alias directives in httpd.conf. In short: 1. Add JkShmFile to httpd.conf 2. Remove lbfactor from workers.properties 3. Change the spelling of recycle 4. Use JkAutoAlias or Directory / Alias directives to put the appropriate directories within Apache's document and URI space. I hope that gets you up and running. /mde/ __ 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]
Re: mod_jk setup
It'll only bring you pain and grief, but here's how I did it on linux:q http://www.pubbitch.org/jboss I'll test with the latest CVS when I get a chance and update the HOWTO. There's been a site with tips for win32 that's been posted to the list several times. Have a root through the archives and it'll prolly show up. On Fri, May 10, 2002 at 05:27:09PM -0400, [EMAIL PROTECTED] wrote: I use Apache2 and want to install mod_jk too. Thanks Cheers, Simon -- Winny and I lived in a house that ran on static electricity... If you wanted to run the blender, you had to rub balloons on your head. Steven Wright -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk setup
can anyone please help me - Original Message - From: KL OOI [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 1:10 PM Subject: Re: mod_jk setup Apache 1.3.24 - Original Message - From: Michael Leditschke [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:58 PM Subject: RE: mod_jk setup What version of Apache? -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 May 2002 1:11 PM To: TOMCAT-USER Subject: mod_jk setup Hi all, Can anyone provide a clear step by step that how to setup Apache and Tomcat 4.0.3 with mod_jk in Windows 2000 Pro? I have go thorough the documentation by I am lost and unsuccessful. Thanks. Regards KL -- 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: mod_jk setup
Subject: Re: mod_jk setup From: Bruno V [EMAIL PROTECTED] === You should check : http://www.acg-gmbh.de/mod_jk/ Other guides and tutorial about Apache + tomcat + connectors : http://bruno.vernay.free.fr/HowTo/bWebServerHowTo/ch05.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk setup
Step are as follows; 1) copy mod_jk.dll into apache modules directory 2) edit http.conf add new line Include c:/progra~1/apache~1/apache/conf/mod_jk.conf 3) create mod_jk.conf LoadModule jk_module modules/mod_jk.dll AddModule mod_jk.c JkWorkersFile c:\progra~1\apache~1\apache\conf\workers.properties JkLogFile d:\progra~1\apache~1\apache\logs\mod_jk.log JkLogLevel error JkMount /servlet/* ajp JkMount /*.jsp ajp 4) create workers.properties workers.java_home=c:\jdk1.4.0 ps=\ worker.list=ajp worker.ajp.port=8009 worker.ajp.host=localhost worker.ajp.type=ajp13 5) edit tomcat server.xml remark all connector except ajp13 6) all your context on server.xml - Original Message - From: KL OOI [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:11 AM Subject: Re: mod_jk setup can anyone please help me - Original Message - From: KL OOI [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 1:10 PM Subject: Re: mod_jk setup Apache 1.3.24 - Original Message - From: Michael Leditschke [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:58 PM Subject: RE: mod_jk setup What version of Apache? -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 May 2002 1:11 PM To: TOMCAT-USER Subject: mod_jk setup Hi all, Can anyone provide a clear step by step that how to setup Apache and Tomcat 4.0.3 with mod_jk in Windows 2000 Pro? I have go thorough the documentation by I am lost and unsuccessful. Thanks. Regards KL -- 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: mod_jk setup
I use Apache2 and want to install mod_jk too. Thanks -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 1:10 AM To: Tomcat Users List Subject: Re: mod_jk setup Apache 1.3.24 - Original Message - From: Michael Leditschke [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:58 PM Subject: RE: mod_jk setup What version of Apache? -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 May 2002 1:11 PM To: TOMCAT-USER Subject: mod_jk setup Hi all, Can anyone provide a clear step by step that how to setup Apache and Tomcat 4.0.3 with mod_jk in Windows 2000 Pro? I have go thorough the documentation by I am lost and unsuccessful. Thanks. Regards KL -- 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: mod_jk setup
What version of Apache? -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 May 2002 1:11 PM To: TOMCAT-USER Subject: mod_jk setup Hi all, Can anyone provide a clear step by step that how to setup Apache and Tomcat 4.0.3 with mod_jk in Windows 2000 Pro? I have go thorough the documentation by I am lost and unsuccessful. Thanks. Regards KL -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk setup
Apache 1.3.24 - Original Message - From: Michael Leditschke [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:58 PM Subject: RE: mod_jk setup What version of Apache? -Original Message- From: KL OOI [mailto:[EMAIL PROTECTED]] Sent: Friday, 10 May 2002 1:11 PM To: TOMCAT-USER Subject: mod_jk setup Hi all, Can anyone provide a clear step by step that how to setup Apache and Tomcat 4.0.3 with mod_jk in Windows 2000 Pro? I have go thorough the documentation by I am lost and unsuccessful. Thanks. Regards KL -- 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]