Re: JkMount in httpd.conf
it working using mod_jk.conf-auto. Have you been able to get it working without virtuals at the apache end? cheers dim Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.
Problem with stopping Tomcat
Hi all... When I tried to minimize my configuration I reach a state when tomcat.sh stop ends with this message. Only Classpath information was before it. Stop tomcat java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.doConnect(Compiled Code) at java.net.PlainSocketImpl.connectToAddress(Compiled Code) at java.net.PlainSocketImpl.connect(Compiled Code) at java.net.Socket.init(Compiled Code) at java.net.Socket.init(Compiled Code) at org.apache.tomcat.task.StopTomcat.execute(Compiled Code) at org.apache.tomcat.startup.Tomcat.stopTomcat(Compiled Code) at org.apache.tomcat.startup.Tomcat.execute(Compiled Code) at org.apache.tomcat.startup.Tomcat.main(Compiled Code) I've got only one worker defined in server.xml on port 8444. What can I miss in my config-files? I really don't know when this started to occure, so I can't say which file is siner. But httpd.conf is not. I tried older version and it doesn't help me. I changed tomcat-configs without backin them up... so. :-))) What connection is tried when tomcat goes down? Thanks Virgo Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.
Re: JkMount in httpd.conf
Hi all... From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED], Richard Richter [EMAIL PROTECTED] Subject: Re: JkMount in httpd.conf Date: Thu, 28 Jun 2001 09:17:15 +1000 Richard, sorry for the latency here... our connection is proving a right pain... No matter of time. ;-) Here (you wrote similar advice Re: Servlet configuration to somebody else) I looked to web.xml, which contains: servlet servlet-nameHello/servlet-name servlet-classHello/servlet-class /servlet servlet servlet-nameHelloServlet/servlet-name servlet-classHello/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/hello/url-pattern /servlet-mapping did I write that? shit. there should only be one servlet ... /servlet entry per servlet _name_ (although you can deploy the same servlet class as different servlets and use different parameters to achieve different behaviour). So if you remove the first of the two servlet ... /servlet entries it would be correct. OH SORRY... I didn't want to say that you gave advice with TWO servlet tags - no YOU DIDN'T... The fact that two are too much wasn't known to me - you know, example of web.xml is the only thing I have to learn from. ;-))) This was web.xml of one of my mate in work - I was just trying to let it run as admin of Tomcat ;-)... Now I can see that I have to write it from scratch or something... ;-) Maybe there is some redundancy or missing... but where? Because Hello.class is in webapps/intranet/WEB-INF/classes (with all classes generated from jsps) and web.xml is in WEB-INF... that's right I hope. URI is still the same: [sidenote] the JSPs get compiled in the $TOMCAT_HOME/work directory, unless you're compiling them yourself (which I dont think there's any reason to) they shouldn't be in the WEB-INF/classes directory. host:port/intranet/servlet/hello ok - I'm a bit frazzled here because its been a while since I last wrote about this, so let me refresh my mind... I'm assuming you have tomcat available as well? Assuming you're running both on the same box... can you request http://localhost:8080/intranet/servlet/hello (straight through tomcat). Okey, I blow up comments of Httpblabla... in server.xml and tried it - and EVERYTHING works. So now there is a question why localhost:8080 functions and my.virtual.host:port don't (BUT ONLY FOR SERVLETS! - jsps are good). I don't wanna use tomcat as standalone... BTW: /intranet/hello was right path, I don't see what are the lines with /.../servlet/hello for (in mod_jk.conf-auto) - but this is detail. ;-) When I get frustrated I do a tail -f logs/* and see if that helps me (o: not sure if that'll be any help... anyway I think the approach should first be to check that everything is working in standalone. So - after your last mail I woke up and I'm checking logs now... but all at all - the only thing I see is in mod_jk.log well known two lines: [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match cheesr dim Another so - so where is the differences between Apache-mod_jk-Tomcat and standalone Tomcat? I mean differences in servlet processing. On localhost:8080 everything runs perfectly and via virtual host of Apache and mod_jk... only jsp. But - as I can see now - servlet request is redirected - jk_uri_worker_map can't resolve it and Apache then sends obvious Not found. Hm... Thank you for care :-) Virgo Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.
Re: JkMount in httpd.conf
Hi all... Thanx Dim for a step forward... You're right... Apache redirected the request. :-))) I was looked only at terminal (thinking that debug=9 is enough) - but in fact, just in mod_jk.log there is two lines for every request to my servlet: [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done withou t a match Here (you wrote similar advice Re: Servlet configuration to somebody else) I looked to web.xml, which contains: servlet servlet-nameHello/servlet-name servlet-classHello/servlet-class /servlet servlet servlet-nameHelloServlet/servlet-name servlet-classHello/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/hello/url-pattern /servlet-mapping Maybe there is some redundancy or missing... but where? Because Hello.class is in webapps/intranet/WEB-INF/classes (with all classes generated from jsps) and web.xml is in WEB-INF... that's right I hope. URI is still the same: host:port/intranet/servlet/hello But I tried also Hello HelloServlet, all without servlet... etc. (Despair. :-)) Is it possible to let log mapping from URI to absolut path? With JSP this is done, but with servlets I have no additional information from where it tries load it. As fast I was done with JSP - I'm now stuck in this problem. I except that solution is easy, but I can't see it. Thanks for anything Richard Virgo Richter From: Dmitri Colebatch [EMAIL PROTECTED] To: [EMAIL PROTECTED], Richard Richter [EMAIL PROTECTED] Subject: Re: JkMount in httpd.conf Date: Tue, 26 Jun 2001 15:37:04 +1000 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Not sure if anyone responded to this - our mailserver's been down (or more accurately our ISP) for the last couple of days... On Mon, 25 Jun 2001 19:28, Richard Richter wrote: virtual host and your question is about server.xml (I have no experience with that kind of virtual host). Tomcat also supports virtual hosts - although as I said, I haven't been able to get it to work on a port-based virtual. Strange for me is that one JkMount works and another doesn't. I read Working with mod_jk papers, but there are more examples than formal definitions. So I can ask: Is this path /intranet/WEB-INF/classes/Hello covered with these JkMounts? 1. JkMount /intranet/* worker 2. JkMount /*classes/* worker 3. JkMount /classes/* worker Is second parameter used as a needed substring or what? What happens in your tomcat logs when the request comes in? My guess is that apache gets the request for /intranet/servletname and correctly forwards it to tomcat, which then looks for a file called intranet/servletname 'cause (I'm guessing) its not matching the servlet. What servletmapping are you using? hope this helps cheers dim And when talking about redirection from Apache to Tomcat... One another question: I have a picture x.jpg in Tomcat project and so it is deployed as webapps/payportal/x.jpg among another jsps. Now when browser loads this jsp (in fact on client side it is only html) it finds out that there is an image and sends a reqest for it, doesn't it? Now - how can Apache know, that this image is not in my web-data/payportal/x.jpg (which doesn't exist in fact) and that this request has to be redirected to Tomcat. JPG is not JSP! I have no JkMount for this case? Is there any implicit redirection? These mechanisms are not transparent for me (or I don't understend them). ;-) Richard Virgo Richter On Fri, 22 Jun 2001 23:22, Richard Richter wrote: Hello... I'm using Apache with mod_jk and Tomcat for jsps and servlets. JSP is without problem, but servlet don't want to run. Because informations about absolute path of requested document is written to terminal, where Tomcat was started, I found out that servlet (URI: http://poseidon.bgs.sk:/intranet/WEB-INF/classes/Hello) is not translated from relative to absolute path - nothing apears on terminal. I think, that Apache don't redirect this request to Tomcat (or appropriate worker)... my httpd.conf has this section: VirtualHost poseidon.bgs.sk: ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/virgo/web-data Location /export/home/virgo/web-data Options Indexes FollowSymLinks AllowOverride None SetHandler default-handler Order allow,deny Allow from all /Location ServerName poseidon.bgs.sk JkMount /*.jsp virgo JkMount /intranet/* virgo ErrorLog /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/error_log TransferLog /opt/oracle/ias/product/8.1.7/Apache
Re: Obtaining mod_jk.so
Hi Mike... Everything can be found on jakarta.apache.org... E.g. binaries: http://jakarta.apache.org/site/binindex.html And more exactly (for 3.2.2 Tomcat in which you have to find mod_jk): http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/bin/ Choose your platform... etc. ;-) More difficult way is to compile it up... but if you don't need it, don't do it. Documentation: http://jakarta.apache.org/tomcat/index.html Here you will find your version of Tomcat... E.g. for 3.2.2 try this page: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html Virgo Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Date: Tue, 26 Jun 2001 08:34:45 -0700 (PDT) From: Mike Korotun [EMAIL PROTECTED] Subject: Obtaining mod_jk.so To: [EMAIL PROTECTED] MIME-Version: 1.0 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, All!! How can I obtain the mod_jk.so? Please, advice. Thanx. = Best Regards, Mike Korotun Masiona Group , Software Developer --Magic Internet Solutions-- __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.
JkMount in httpd.conf
Hello... I'm using Apache with mod_jk and Tomcat for jsps and servlets. JSP is without problem, but servlet don't want to run. Because informations about absolute path of requested document is written to terminal, where Tomcat was started, I found out that servlet (URI: http://poseidon.bgs.sk:/intranet/WEB-INF/classes/Hello) is not translated from relative to absolute path - nothing apears on terminal. I think, that Apache don't redirect this request to Tomcat (or appropriate worker)... my httpd.conf has this section: VirtualHost poseidon.bgs.sk: ServerAdmin [EMAIL PROTECTED] DocumentRoot /export/home/virgo/web-data Location /export/home/virgo/web-data Options Indexes FollowSymLinks AllowOverride None SetHandler default-handler Order allow,deny Allow from all /Location ServerName poseidon.bgs.sk JkMount /*.jsp virgo JkMount /intranet/* virgo ErrorLog /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/error_log TransferLog /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/access_ log /VirtualHost *.jsp works good, but second JkMount not... I tried many versions of second field of that line - but nothing. Always 404 Forbidden (Apache signed on the bottom of page ;-))... How I have to force Apache to redirect requests for servlets (eg. for URI specified upper) to Tomcat (or worker called virgo in my case)??? Thanks for any suggestion Richard Richter ([EMAIL PROTECTED]) Application Programmer, Business Global Systems a. s.