Session tracking with Apache 2.0.x + Tomcat 4.0.x/4.1.x + mod_jk 1.2.x
We have a webapp running on Tomcat 4.0.x/4.1.x behind an Apache web server. Apache and Tomcat talk to each other using mod_jk 1.2.x (we have several installations with different versions of Apache, Tomcat and mod_jk). Users connect to the webapp via Apache over SSL and we use a custom authentication mechanism that is not related to Tomcat or Apache authentication (using a transaction on a separate server). I have been asked to investigate the possibility of using session tracking based on the SSL session (as per the 2.3 Java servlet specification). Would that be possible in our setup ? My main concern would be that the SSL session would not be known to Tomcat because of the Apache front end (which we can't do without without completely refactoring our app). TIA Sven -- Sven Bovin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with mod_jk 1.2 - 500 Internal Server Error
I'm using JBoss 4.0.1 with integrated Tomcat 5, and I'm trying to connect it to Apache 2. Whenever I make a request to a resource that should be passed along to Tomcat, I get a 500 Internal Server error. Looking at the mod_jk.log shows: [Thu Jan 13 13:45:34 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Thu Jan 13 13:45:34 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/status' [Thu Jan 13 13:45:34 2005] [jk_uri_worker_map.c (473)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match default - /status [Thu Jan 13 13:45:34 2005] [mod_jk.c (1689)]: Into handler r-proxyreq=0 r-handler=jakarta-servlet r-notes=140779720 worker=default [Thu Jan 13 13:45:34 2005] [jk_worker.c (90)]: Into wc_get_worker_for_name default [Thu Jan 13 13:45:34 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done did not find a worker [Thu Jan 13 13:45:34 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker So it looks like it maps to the correct worker, but then can't find the worker. I've got no clue why this is happening. Here's my workers.properties file: # Define worker workers.list=default worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 And here's the section of httpd.conf where it's all set up # # mod_jk settings # JkWorkersFile conf/workers.properties JkLogfile logs/mod_jk.log JkLogLevel debug JkMount /*.jsp default JkMount /*.do default JkMount /status default # End of mod_jk settings I'm really confused and frustrated with this...I'd appreciate any help. Thanks, Pat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with mod_jk 1.2 - 500 Internal Server Error
Pat Maddox wrote: I'm using JBoss 4.0.1 with integrated Tomcat 5, and I'm trying to connect it to Apache 2. Whenever I make a request to a resource that should be passed along to Tomcat, I get a 500 Internal Server error. Looking at the mod_jk.log shows: [Thu Jan 13 13:45:34 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done did not find a worker # Define worker workers.list=default worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 Can you resolve the 'localhost'? See if you have localhost inside etc/hosts or use 127.0.0.1 for host name. Also, you can provide the mod_jk version used (1.2.8, etc.) Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with mod_jk 1.2 - 500 Internal Server Error
Well, I managed to get it. And I feel unbelievably stupid (as is the case with most problems). The simple fix is worker.list=default rather than workers.list=default On Jan 13, 2005, at 11:03 AM, Mladen Turk wrote: Pat Maddox wrote: I'm using JBoss 4.0.1 with integrated Tomcat 5, and I'm trying to connect it to Apache 2. Whenever I make a request to a resource that should be passed along to Tomcat, I get a 500 Internal Server error. Looking at the mod_jk.log shows: [Thu Jan 13 13:45:34 2005] [jk_worker.c (94)]: wc_get_worker_for_name, done did not find a worker # Define worker workers.list=default worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 Can you resolve the 'localhost'? See if you have localhost inside etc/hosts or use 127.0.0.1 for host name. Also, you can provide the mod_jk version used (1.2.8, etc.) Mladen. - 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 1.2
On Fri, Mar 26, 2004 at 01:37:35PM +0100, Petr Nepoitek wrote: Hi, I downloaded the latest version of the jk_12 connector for Solaris 8, but when expanding the tar file there's a checksum error. Does anybody have a correct version of the connector for Sun? Try using GNU tar to extract the tarball. The filenames are too long for Solaris tar. G -- The art of taxation consists of plucking the goose so as to obtain the most feathers with the least hissing. -- Jean-Baptiste Colbert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk 1.2
Hi, I downloaded the latest version of the jk_12 connector for Solaris 8, but when expanding the tar file there's a checksum error. Does anybody have a correct version of the connector for Sun? Thanks in advance, Nep. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with mod_jk 1.2: error in action code
I don't see any reason why an object in the context should have any thing to do with the stacktrace. What makes you think that they are related ? What makes you think that the pool is lost ? (context.getAttribute(AttribName) == null ?) Or do you just don't get connections from the pool ? Or are the connections you get from your pool just invalid ? Or what else happens ? -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 7:14 PM To: Tomcat Users List Subject: AW: problem with mod_jk 1.2: error in action code I programmed a connection pool by myself as an object, that I put into a global variable by context.setAttribute(myConnectionPool). The lost of the pool is a subsequent error, that occures as a reason of the error in the action code of the coyote connector. In the mysql logs there is nothing to see about errors. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with mod_jk 1.2: error in action code
Hello, I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). I think the problem is due to the mod_jk connector between apache and tomcat. The web application is accessible over apache 1.3.27, that connects to tomcat 4.1.27 via jk connector mod_jk 1.2.25. The exception I got in catalina.out is: 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268) 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.jav a:619) at java.lang.Thread.run(Thread.java:534) 10.03.2004 15:59:58 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection The HTTP connector defined in tomcats server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=10 debug=5 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler scheme=http secure=false / The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Here is the summary of my environment options: - tomcat 4.1.27 - apache 1.3.27 - mod_jk 1.2.25 - Suse Linux 7.2 - Java 2 RE Standard Edition, Version 1.4.1 (build Blackdown-1.4.1-01) My special problem is, that I'm not able to reproduce the error, it occurs after an unspecified period of time. I found nothing related to this problem. Any ideas? Thanks in advance M.Goerlich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with mod_jk 1.2: error in action code
Well I run in exactly the same environment except it's a RedHat 6.2 (-ish) box My server.xml is setup like so: !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=3 maxProcessors=15 acceptCount=10 debug=0/ The connector is setup like so: # BEGIN workers.properties worker.list=ajp13 worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.whatever.com worker.ajp13.type=ajp13 # END workers.properties HTH. I can't see anything in your setup which instantly looks wrong but there appear to be some parameters which are unnessecary, although I'm not sure. Could it be anything to do with your timeout set to 0? Apart from that it looks like it could be something on the SQL side that's causing the problem. IMHO, have a glance at the sql server logs. Adam On Fri, 2004-03-12 at 15:53, Michael Grlich (CSC) wrote: Hello, I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). I think the problem is due to the mod_jk connector between apache and tomcat. The web application is accessible over apache 1.3.27, that connects to tomcat 4.1.27 via jk connector mod_jk 1.2.25. The exception I got in catalina.out is: 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268) 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.jav a:619) at java.lang.Thread.run(Thread.java:534) 10.03.2004 15:59:58 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection The HTTP connector defined in tomcats server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=10 debug=5 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler scheme=http secure=false / The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Here is the summary of my environment options: - tomcat 4.1.27 - apache 1.3.27 - mod_jk 1.2.25 - Suse Linux 7.2 - Java 2 RE Standard Edition, Version 1.4.1 (build Blackdown-1.4.1-01) My special problem is, that I'm not able to reproduce the error, it occurs after an unspecified period of time. I found nothing related to this problem. Any ideas? Thanks in advance M.Goerlich - 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: problem with mod_jk 1.2: error in action code
I don't think that this message has anything to with the lost connection pool. (Do you really mean 'connection pool' and not just 'connection' ?) If you lose your connection, it may be caused by the databaseserver that cancels idle connections after a while. Look for validationQuery in: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html The message in the mod_jk.log is typically indication that a browser was closed while tomcat was sending an answer. I'm not shure if the message in catalina.out is related to that. -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 4:53 PM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with mod_jk 1.2: error in action code
Yep I get the same errors quite often, apart from being annoying they do not cause any other issues, the error is what Ralph says it is. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: 12 March 2004 16:14 To: Tomcat Users List Subject: RE: problem with mod_jk 1.2: error in action code I don't think that this message has anything to with the lost connection pool. (Do you really mean 'connection pool' and not just 'connection' ?) If you lose your connection, it may be caused by the databaseserver that cancels idle connections after a while. Look for validationQuery in: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html The message in the mod_jk.log is typically indication that a browser was closed while tomcat was sending an answer. I'm not shure if the message in catalina.out is related to that. -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 4:53 PM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
RE: problem with mod_jk 1.2: error in action code
when you specify the connection to mysql, are you including the 'autoreconnect=true' parameter? If not, the connections will be closed by mysql after (I think) 8 hrs. -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 9:53 AM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code Hello, I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). I think the problem is due to the mod_jk connector between apache and tomcat. The web application is accessible over apache 1.3.27, that connects to tomcat 4.1.27 via jk connector mod_jk 1.2.25. The exception I got in catalina.out is: 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268) 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(ChannelSo cket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) 10.03.2004 15:59:58 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection The HTTP connector defined in tomcats server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=10 debug=5 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler scheme=http secure=false / The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Here is the summary of my environment options: - tomcat 4.1.27 - apache 1.3.27 - mod_jk 1.2.25 - Suse Linux 7.2 - Java 2 RE Standard Edition, Version 1.4.1 (build Blackdown-1.4.1-01) My special problem is, that I'm not able to reproduce the error, it occurs after an unspecified period of time. I found nothing related to this problem. Any ideas? Thanks in advance M.Goerlich - 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: problem with mod_jk 1.2: error in action code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Curwen wrote: when you specify the connection to mysql, are you including the 'autoreconnect=true' parameter? If not, the connections will be closed by mysql after (I think) 8 hrs. I wish I could kill the 'autoReconnect' feature. You shouldn't be using it if you're using a connection pool :) Use the correct properties on your connection pool and you should be good to go. For example, setting 'timeBetweenEvictionRunsMillis' (set to some sensible number of milliseconds, I would suggest something around 5 minutes) and 'minEvictableIdleTimeMillis' (set to the number of milliseconds you have 'wait_timeout' set to on the server minus some %) should catch MySQL closing idle connections. Setting 'validationQuery' (set to 'SELECT 1') and 'testOnBorrow' or 'testOnReturn' should catch MySQL server restarts or general network flakiness. In any case, you should also see the new example in the troubleshooting section of the Connector/J docs that shows how your code can also detect whether a SQLException was caused by a lost connection, or some other error (section 4.4 under the following link): http://www.mysql.com/documentation/connector-j/index.html#id2803835 -Mark (the guy who wrote the 'autoReconnect' functionality, and now wishes he could remove it from the JDBC driver) - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAUe8FtvXNTca6JD8RAmpmAJ0Wq/1rT/Fcw40H4fB1/g8UmheonACbBYwU mpRzou4Jb2yXUsGSNooLCKs= =DW3u -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with mod_jk 1.2: error in action code
All, when you specify the connection to mysql, are you including the 'autoreconnect=true' parameter? If not, the connections will be closed by mysql after (I think) 8 hrs. I'm not sure why everyne's caught up in database connection code. This is a Coyote connector exception -- which is the HTTP/1.1 protocol connector. It allows you to connect directly to Tomcat using a browser, instead of going through Apache. Usually the Broken Pipe means the the client hung up before listening for all the data. That could mean pressing the STOP button on the browser, following another link before the page fully loads, or pressing the back button. I wouldn't worry too much about it, unless your users are somehow being affected. -chris -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 9:53 AM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code Hello, I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). I think the problem is due to the mod_jk connector between apache and tomcat. The web application is accessible over apache 1.3.27, that connects to tomcat 4.1.27 via jk connector mod_jk 1.2.25. The exception I got in catalina.out is: 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268) 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(ChannelSo cket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) 10.03.2004 15:59:58 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection The HTTP connector defined in tomcats server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=10 debug=5 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler scheme=http secure=false / The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Here is the summary of my environment options: - tomcat 4.1.27 - apache 1.3.27 - mod_jk 1.2.25 - Suse Linux 7.2 - Java 2 RE Standard Edition, Version 1.4.1 (build Blackdown-1.4.1-01) My special problem is, that I'm not able to reproduce the error, it occurs after an unspecified period of time. I found nothing related to this problem. Any ideas? Thanks in advance M.Goerlich - 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] signature.asc Description: OpenPGP digital signature
RE: problem with mod_jk 1.2: error in action code
So is autoReconnectForPools a hack to use with autoReconnect? -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: 12 March 2004 17:11 To: Tomcat Users List Subject: Re: problem with mod_jk 1.2: error in action code -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Curwen wrote: when you specify the connection to mysql, are you including the 'autoreconnect=true' parameter? If not, the connections will be closed by mysql after (I think) 8 hrs. I wish I could kill the 'autoReconnect' feature. You shouldn't be using it if you're using a connection pool :) Use the correct properties on your connection pool and you should be good to go. For example, setting 'timeBetweenEvictionRunsMillis' (set to some sensible number of milliseconds, I would suggest something around 5 minutes) and 'minEvictableIdleTimeMillis' (set to the number of milliseconds you have 'wait_timeout' set to on the server minus some %) should catch MySQL closing idle connections. Setting 'validationQuery' (set to 'SELECT 1') and 'testOnBorrow' or 'testOnReturn' should catch MySQL server restarts or general network flakiness. In any case, you should also see the new example in the troubleshooting section of the Connector/J docs that shows how your code can also detect whether a SQLException was caused by a lost connection, or some other error (section 4.4 under the following link): http://www.mysql.com/documentation/connector-j/index.html#id2803835 -Mark (the guy who wrote the 'autoReconnect' functionality, and now wishes he could remove it from the JDBC driver) - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAUe8FtvXNTca6JD8RAmpmAJ0Wq/1rT/Fcw40H4fB1/g8UmheonACbBYwU mpRzou4Jb2yXUsGSNooLCKs= =DW3u -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
AW: problem with mod_jk 1.2: error in action code
Hi, I programmed a connection pool by myself as an object, that I put into a global variable by context.setAttribute(myConnectionPool). The lost of the pool is a subsequent error, that occures as a reason of the error in the action code of the coyote connector. In the mysql logs there is nothing to see about errors. By the way, my workers.properties are: worker.list=worker1 worker.worker1.port=8009 worker.worker1.host=localhost worker.worker1.type=ajp13 worker.worker1.lbfactor=50 worker.worker1.cachesize=100 #worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 #worker.worker1.socket_timeout=300 Great problem!!! -Ursprüngliche Nachricht- Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 12. März 2004 17:14 An: Tomcat Users List Betreff: RE: problem with mod_jk 1.2: error in action code I don't think that this message has anything to with the lost connection pool. (Do you really mean 'connection pool' and not just 'connection' ?) If you lose your connection, it may be caused by the databaseserver that cancels idle connections after a while. Look for validationQuery in: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html The message in the mod_jk.log is typically indication that a browser was closed while tomcat was sending an answer. I'm not shure if the message in catalina.out is related to that. -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 4:53 PM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems - 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: problem with mod_jk 1.2: error in action code
I don't deny the stacktraces the original poster included are from a connector. But... the original problem relates to loosing a 'database connection pool', which should have nothing at all to do with the jk connector. I don't think it's very clear yet, what is *actually* going on. If you are correct, and the database thing is a red herring, then fine, he can ignore that annoying (and common) jk message. I get them all the time, I've asked a couple times for help in getting them shut off... oh well. That's jk for you. If, otoh, he's got a database problem, and while trying to diagnose the trouble, noticed those common jk errors, and related the two (his database trouble to the jk error messages), then his trouble is *not* with jk, but with his connection pool. He did, after all, say I think I was attempting to eliminate a very common cause of 'lost connections' to a mysql database. This is a Coyote connector exception -- which is the HTTP/1.1 protocol connector. It allows you to connect directly to Tomcat using a browser, instead of going through Apache. And.. who first mentioned the Coyote HTTP connector ?? I see in the original poster's server.xml: protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler that looks the configuration for an AJP 1.3 connection to Apache. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 11:17 AM To: Tomcat Users List Subject: Re: problem with mod_jk 1.2: error in action code All, when you specify the connection to mysql, are you including the 'autoreconnect=true' parameter? If not, the connections will be closed by mysql after (I think) 8 hrs. I'm not sure why everyne's caught up in database connection code. This is a Coyote connector exception -- which is the HTTP/1.1 protocol connector. It allows you to connect directly to Tomcat using a browser, instead of going through Apache. Usually the Broken Pipe means the the client hung up before listening for all the data. That could mean pressing the STOP button on the browser, following another link before the page fully loads, or pressing the back button. I wouldn't worry too much about it, unless your users are somehow being affected. -chris -Original Message- From: Michael Görlich (CSC) [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 9:53 AM To: Tomcat Mailinglist Subject: problem with mod_jk 1.2: error in action code Hello, I've got problems with a tomcat web application, that establishes a connection pool to a database (mysql). This connection pool is lost after an unspecified period of time the system wasn't used (f.e. 8 houres). I think the problem is due to the mod_jk connector between apache and tomcat. The web application is accessible over apache 1.3.27, that connects to tomcat 4.1.27 via jk connector mod_jk 1.2.25. The exception I got in catalina.out is: 10.03.2004 15:59:58 org.apache.jk.server.JkCoyoteHandler action SCHWERWIEGEND: Error in action code java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler. java:385) at org.apache.coyote.Response.action(Response.java:222) at org.apache.coyote.Response.finish(Response.java:343) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler. java:268) 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(ChannelSo cket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) 10.03.2004 15:59:58 org.apache.jk.common.ChannelSocket processConnection INFO: server has been restarted or reset this connection The HTTP connector defined in tomcats server.xml is: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=8443 acceptCount=10 debug=5 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler scheme=http secure=false / The log in mod_jk.log shows the following: [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1052)]: ERROR sending data to client. Connection aborted or network problems [Wed Mar 10 15:59:58 2004] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Here is the summary
mod_jk 1.2 so Bug ?
The latest mod_jk1.2 binary for Solaris 8 , apache 2.x , tomcat 4.x does not connect with tomcat. Is it a bug ? I keep getting the following error in the log, [Thu Nov 20 11:36:39 2003] [jk_connect.c (233)]: jk_open_socket, connect() failed errno = 128 [Thu Nov 20 11:36:39 2003] [jk_ajp_common.c (676)]: Error connecting to tomcat. Tomcat is probably n ot started or is listenning on the wrong port. Failed errno = 128 [Thu Nov 20 11:36:39 2003] [jk_ajp_common.c (955)]: Error connecting to the Tomcat process. [Thu Nov 20 11:36:39 2003] [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop. err=2 [Thu Nov 20 11:36:39 2003] [jk_ajp_common.c (1318)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=worker1 failed errno = 128 [Thu Nov 20 11:36:39 2003] [jk_lb_worker.c (378)]: lb: All tomcat instances failed, no more workers left. Thanks
Re: mod_jk 1.2 so Bug ?
Sundar, The latest mod_jk1.2 binary for Solaris 8 , apache 2.x , tomcat 4.x does not connect with tomcat. Are Apache and Tomcat both running on the same machine? Are your port numbers in workers.properties correct? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk 1.2 binary for Linux?
I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Hi, I sugest that you compile the src, it's not to dificult if you now the steps, download it from here: http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz to compile (in Redhat 9): $ tar xzf XXX $ cd XXX/jk/native/ $ sh buildconf.sh $ ./configure --with-apxs=/usr/sbin/apxs $ make The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so I hope this helps. Regards, _ Manolo Ramirez T. Stu Statman wrote: I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - 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 1.2 binary for Linux?
I would recommend compiling it, and it doesn't seem that there's a linux binary available for download. I will be adding JK2 tutorial (only JK1.2 for now) shortly on my site, but looking at it now and John Turner's site, you should be able to figure it out. I find that it's always a gamble using a pre-built connector anyways. http://daydream.stanford.edu/tomcat/install_web_services.html I link to John Turner's site and other helpful sites on my page. Oscar On Sat, 25 Oct 2003, Stu Statman wrote: I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - 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 1.2 binary for Linux?
Silly me. I thought you were looking for ModJK2.0. You should have no problem. And full instructions are on my site as well. http://daydream.stanford.edu/tomcat/install_web_services.html Oscar On Sat, 25 Oct 2003, Manolo Ramirez T. wrote: Hi, I sugest that you compile the src, it's not to dificult if you now the steps, download it from here: http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz to compile (in Redhat 9): $ tar xzf XXX $ cd XXX/jk/native/ $ sh buildconf.sh $ ./configure --with-apxs=/usr/sbin/apxs $ make The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so I hope this helps. Regards, _ Manolo Ramirez T. Stu Statman wrote: I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Oscar Carrillo wrote: Silly me. I thought you were looking for ModJK2.0. Heh, no prob. We'll go to 2.0 eventually, but we're not quite ready (organizationally) to take that leap quite yet. You should have no problem. And full instructions are on my site as well. http://daydream.stanford.edu/tomcat/install_web_services.html Thanks! Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Manolo Ramirez T. wrote: Hi, I sugest that you compile the src, it's not to dificult if you now the steps, download it from here: http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz to compile (in Redhat 9): $ tar xzf XXX $ cd XXX/jk/native/ $ sh buildconf.sh $ ./configure --with-apxs=/usr/sbin/apxs $ make The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so I hope this helps. That's approximately the way I built it last (though expressed somewhat more cleanly than my Uh, just, you know, build it.). I'll pass it on, thanks much ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
You should be able to get the RPM from http://www.jpackage.org. Stu Statman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
looking for docs on building mod_jk 1.2.x for AIX 4.3.x
No luck with the encap package for mod_jk as i don't have the required encap for Apache. Now I am trying to build from src files and am having trouble. If you know of any docs or even different locations for pre-built so files, I would appreciate hearing about them. Thanks!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache 1.3, mod_jk 1.2, jakarta 4.1.12, and cookies
In tomcat 3.3 if I had a load balanced worker the cookie set had a .worker_name appended to the end of it. I'm trying to set up tomcat 4.1.12 with mod_jk 1.2 and apache 1.3 and the cookie no longer has the worker name appended to the end of it and (I believe as a result) my session doesn't stick to one server. Has anyone else seen this behavior? Is it a tomcat bug or a configuration directive that I'm missing somewhere? Please cc me as I'm not subscribed to the list. Thanks, Jason -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problems with paths using mod_jk 1.2
Hi, I had been redirecting from Apache 2.0.42 index page to Tomcat 4.1.12 successfully. Then I had a corrupt filesystem and have had to do a complete installation. This time I am using Apache 1.3.23 with Tomcat 4.1.12 and for some reason my Turbine based servlet did not like th eredicrect and had an 'Infinite Redited exception'. So I am forced to get mod_jk working. What I am trying to achieve is have people who hit my 'www.roamware.com' URL be directed to 'www.roamware.com:8080/rwsite/servlet/template' I downloaded the binaries for mod_jk 1.2 and installed them successfully. I have my config files below. I followed an example given by a fellow Turbine user, but I get a connection refused error. My workers.properties is basic: workers.tomcat_home=/usr/share/jakarta-tomcat-4.1.12-LE-jdk14 workers.java_home=/usr/java/j2sdk1.4.1 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=www.roamware.com worker.ajp13.type=ajp13 In my index.shtml page in Apaches html directory I have the following: head meta http-equiv=Refresh content=0; url=/rwsite/ meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 meta name=GENERATOR content=Mozilla/4.61 [en] (X11; I; Linux 2.2.9-23mdk i686) [Netscape] meta name=Author content=DavidWynter titleWelcome to roamware/title !-- Background white, links blue (unvisited), navy (visited), red (active) -- /head body onload=location='http://www.roamware.com:8080/rwsite/servlet/rwsite/templates/index.vm'; etc. I understand this should direct to the /rwsite/ path as defined in the refresh above through the JkMount and Alias as defined in my mod_jk.conf below. Also doesn't the VirtualHost append the 8080 port? If not how do you do this? JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel error VirtualHost www.roamware.com:8080 ServerName www.roamware.com # Root context mounts for Tomcat # JkMount /rwsite/* ajp13 # # The following line makes apache aware of the location of the /rwsite context # Alias /rwsite /usr/share/jakarta-tomcat-4.1.12-LE-jdk14/webapps/rwsite/servlet/rwsite/template Directory /usr/share/jakarta-tomcat-4.1.12-LE-jdk14/webapps/rwsiteservlet/rwsite/template Options Indexes FollowSymLinks /Directory # # The following line mounts the /servlet/ uri to tomcat # JkMount /rwsite/servlet/* ajp13 # # The following line prohibits users from directly access WEB-INF # Location /rwsite/WEB-INF/ AllowOverride None deny from all /Location Location /rwsite/META-INF/ AllowOverride None deny from all /Location /VirtualHost Finally I hav eenabled the ssi and cgi in Tomcat (which I tested and it works) Th eServlet.xml has th ehost name in Engine an dHost Elements as www.roamware.com and the context with the empty path points to /rwsite as the docBase. I Also have the 8009 Ajp13 connector define and the 8080 port connector defined. I can see in the mod_jk log that the mod_jk loads just fine. In my httpd error log I get [Thu Oct 3 16:48:53 2002] [error] [client 213.120.115.98] File does not exist: /var/www/html/rwsite/ So clearly it is not connecting through to Tomcat. Can anyone see what is wrong with my config above? I figure it has to be mod_jk.conf that is wrong. Thanks David -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problems with paths using mod_jk 1.2
Whoa, I think you've got some things mixed up. If you want to use mod_jk, then requests NEVER go to 8080. That's the whole point of a connector. It connects Apache to Tomcat so that requests are served on port 80, not port 8080. I hesitate to get involved, because we went around and around in circles the last time you had a problem, so I will try and sum things up as clearly as I can: - if you are getting some error message from a Turbine servlet, then fix that error...don't go grabbing at straws - if you want your app served on port 8080, don't use Apache at all...use Tomcat in stand-alone mode - if you want your app served on port 80, and don't mind running Tomcat as root (some people do mind this) then change server.xml to listen on port 80 and be done with it - if you want your app served on port 80 with Apache, then setup Apache with mod_jk. There are NUMEROUS docs on this available, most of them fairly good, including the docs from the Tomcat site. - if you use Apache + mod_jk + Tomcat you DON'T need a refresh in index.html to redirect to 8080...that just makes Apache and mod_jk completely irrelevant - you didn't post your server.xml in any case, but my guess is that whatever you are trying to do (I'm not exactly sure why you are following the path you are following) isn't working because your hostnames look pretty goofy...you're telling Apache to listen on port 8080 (VirtualHost IP:8080) but then you want to run Tomcat on port 8080, but then you want to serve content on port 80 with a redirect to 8080 etc. etc. etc. etc. Too crazy to even begin sorting it out, to be honest. My advice: Either 1) get Apache working on port 80 serving a single static page, then post back here and explain EXACTLY where you want to go from there so that people can help, or 2) stop trying to use Apache, use Tomcat in stand-alone mode and post back here and explain EXACTLY what the error message that you get from your Turbine servlet is. I don't mean to sound critical, but you've really got things munged up. I know you are desperate, I know your site is down, but you aren't making it any better. Slow down, keep it simple, and take things one step at a time. Follow any of the Apache + mod_jk + Tomcat HOWTOs available...none of them say anything about setting things up the way you've got them set up. Don't wing it, you'll only spin your wheels as a result. John -Original Message- From: David Wynter [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:17 PM To: [EMAIL PROTECTED] Subject: problems with paths using mod_jk 1.2 Hi, I had been redirecting from Apache 2.0.42 index page to Tomcat 4.1.12 successfully. Then I had a corrupt filesystem and have had to do a complete installation. This time I am using Apache 1.3.23 with Tomcat 4.1.12 and for some reason my Turbine based servlet did not like th eredicrect and had an 'Infinite Redited exception'. So I am forced to get mod_jk working. What I am trying to achieve is have people who hit my 'www.roamware.com' URL be directed to 'www.roamware.com:8080/rwsite/servlet/template' I downloaded the binaries for mod_jk 1.2 and installed them successfully. I have my config files below. I followed an example given by a fellow Turbine user, but I get a connection refused error. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problems with paths using mod_jk 1.2
Dave, I have to agree with John. I spent a great deal of time helping on that debacle as well...it is really sad to hear that you lost everything as a result of a corrupt file system...(:) You have to know what you want to achieve before I would be willing to lend more assistance. How will you get there if you don't know where you are going? Apache...Tomcat...port 80...port 8080...meta-redirects...body onload handlers...this is way more complex than it needs to be. I think John's idea of running tomcat as root and changing the http connector listen port from 8080 to 80 is the simplest idea. Why you would use apache just to redirect from port 80 to 8080 is beyond me. Your situation is exactly what Craig McClanahan was referring to recently when he made a valid case for using tomcat in a standalone environment. -Mike Schulz -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:43 PM To: 'Tomcat Users List' Subject: RE: problems with paths using mod_jk 1.2 Whoa, I think you've got some things mixed up. If you want to use mod_jk, then requests NEVER go to 8080. That's the whole point of a connector. It connects Apache to Tomcat so that requests are served on port 80, not port 8080. I hesitate to get involved, because we went around and around in circles the last time you had a problem, so I will try and sum things up as clearly as I can: - if you are getting some error message from a Turbine servlet, then fix that error...don't go grabbing at straws - if you want your app served on port 8080, don't use Apache at all...use Tomcat in stand-alone mode - if you want your app served on port 80, and don't mind running Tomcat as root (some people do mind this) then change server.xml to listen on port 80 and be done with it - if you want your app served on port 80 with Apache, then setup Apache with mod_jk. There are NUMEROUS docs on this available, most of them fairly good, including the docs from the Tomcat site. - if you use Apache + mod_jk + Tomcat you DON'T need a refresh in index.html to redirect to 8080...that just makes Apache and mod_jk completely irrelevant - you didn't post your server.xml in any case, but my guess is that whatever you are trying to do (I'm not exactly sure why you are following the path you are following) isn't working because your hostnames look pretty goofy...you're telling Apache to listen on port 8080 (VirtualHost IP:8080) but then you want to run Tomcat on port 8080, but then you want to serve content on port 80 with a redirect to 8080 etc. etc. etc. etc. Too crazy to even begin sorting it out, to be honest. My advice: Either 1) get Apache working on port 80 serving a single static page, then post back here and explain EXACTLY where you want to go from there so that people can help, or 2) stop trying to use Apache, use Tomcat in stand-alone mode and post back here and explain EXACTLY what the error message that you get from your Turbine servlet is. I don't mean to sound critical, but you've really got things munged up. I know you are desperate, I know your site is down, but you aren't making it any better. Slow down, keep it simple, and take things one step at a time. Follow any of the Apache + mod_jk + Tomcat HOWTOs available...none of them say anything about setting things up the way you've got them set up. Don't wing it, you'll only spin your wheels as a result. John -Original Message- From: David Wynter [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:17 PM To: [EMAIL PROTECTED] Subject: problems with paths using mod_jk 1.2 Hi, I had been redirecting from Apache 2.0.42 index page to Tomcat 4.1.12 successfully. Then I had a corrupt filesystem and have had to do a complete installation. This time I am using Apache 1.3.23 with Tomcat 4.1.12 and for some reason my Turbine based servlet did not like th eredicrect and had an 'Infinite Redited exception'. So I am forced to get mod_jk working. What I am trying to achieve is have people who hit my 'www.roamware.com' URL be directed to 'www.roamware.com:8080/rwsite/servlet/template' I downloaded the binaries for mod_jk 1.2 and installed them successfully. I have my config files below. I followed an example given by a fellow Turbine user, but I get a connection refused error. -- 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: problems with paths using mod_jk 1.2
I think best approach is to install Apache 2.0.42 as I had before the corrupt filesystem where it all worked using the redirect with the configuration I had without the Turbine error. I don't find the Apache HowTo on mod_jk very good, the standard mod_jk.conf you get when you install has Alias and Directory used in contexts that are not explained in the HowTos. Also these are not explained in isolation anyway. Possibly this is only a small part of my problem, but rather than try to understand mod_jk I will be better to build what know worked. I thought that I could change the URL so that it inserted the 8080 port part for that first URL hit using a VirtualHost or Alias , which I gather from John response I cannot do. Thanks David -Original Message- From: Michael Schulz [mailto:[EMAIL PROTECTED]] Sent: 03 October 2002 18:54 To: Tomcat Users List Subject: RE: problems with paths using mod_jk 1.2 Dave, I have to agree with John. I spent a great deal of time helping on that debacle as well...it is really sad to hear that you lost everything as a result of a corrupt file system...(:) You have to know what you want to achieve before I would be willing to lend more assistance. How will you get there if you don't know where you are going? Apache...Tomcat...port 80...port 8080...meta-redirects...body onload handlers...this is way more complex than it needs to be. I think John's idea of running tomcat as root and changing the http connector listen port from 8080 to 80 is the simplest idea. Why you would use apache just to redirect from port 80 to 8080 is beyond me. Your situation is exactly what Craig McClanahan was referring to recently when he made a valid case for using tomcat in a standalone environment. -Mike Schulz -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:43 PM To: 'Tomcat Users List' Subject: RE: problems with paths using mod_jk 1.2 Whoa, I think you've got some things mixed up. If you want to use mod_jk, then requests NEVER go to 8080. That's the whole point of a connector. It connects Apache to Tomcat so that requests are served on port 80, not port 8080. I hesitate to get involved, because we went around and around in circles the last time you had a problem, so I will try and sum things up as clearly as I can: - if you are getting some error message from a Turbine servlet, then fix that error...don't go grabbing at straws - if you want your app served on port 8080, don't use Apache at all...use Tomcat in stand-alone mode - if you want your app served on port 80, and don't mind running Tomcat as root (some people do mind this) then change server.xml to listen on port 80 and be done with it - if you want your app served on port 80 with Apache, then setup Apache with mod_jk. There are NUMEROUS docs on this available, most of them fairly good, including the docs from the Tomcat site. - if you use Apache + mod_jk + Tomcat you DON'T need a refresh in index.html to redirect to 8080...that just makes Apache and mod_jk completely irrelevant - you didn't post your server.xml in any case, but my guess is that whatever you are trying to do (I'm not exactly sure why you are following the path you are following) isn't working because your hostnames look pretty goofy...you're telling Apache to listen on port 8080 (VirtualHost IP:8080) but then you want to run Tomcat on port 8080, but then you want to serve content on port 80 with a redirect to 8080 etc. etc. etc. etc. Too crazy to even begin sorting it out, to be honest. My advice: Either 1) get Apache working on port 80 serving a single static page, then post back here and explain EXACTLY where you want to go from there so that people can help, or 2) stop trying to use Apache, use Tomcat in stand-alone mode and post back here and explain EXACTLY what the error message that you get from your Turbine servlet is. I don't mean to sound critical, but you've really got things munged up. I know you are desperate, I know your site is down, but you aren't making it any better. Slow down, keep it simple, and take things one step at a time. Follow any of the Apache + mod_jk + Tomcat HOWTOs available...none of them say anything about setting things up the way you've got them set up. Don't wing it, you'll only spin your wheels as a result. John -Original Message- From: David Wynter [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:17 PM To: [EMAIL PROTECTED] Subject: problems with paths using mod_jk 1.2 Hi, I had been redirecting from Apache 2.0.42 index page to Tomcat 4.1.12 successfully. Then I had a corrupt filesystem and have had to do a complete installation. This time I am using Apache 1.3.23 with Tomcat 4.1.12 and for some reason my Turbine based servlet did not like th eredicrect and had an 'Infinite Redited exception'. So I am forced to get mod_jk working. What I am trying to achieve is have people who hit my
RE: problems with paths using mod_jk 1.2
No, that isn't what I said. What I said is that you can't have Apache on port 8080 and Tomcat on port 8080. When you specify VirtualHost some_ip:8080 to Apache, you are telling Apache to listen on that port. If you tell Apache to listen on that port, you can't tell Tomcat to listen on that port. System Administration 101. You can certainly have a meta-refresh in an HTML page that redirects to a URL on a non-standard (non 80) port. However, you have to make sure that ONLY ONE software service is listening on that port! You just have to think things through, or if you have done this, work on explaining it to us (or anyone trying to help you) better. It's really just that simple. If your app is all servlet/Tomcat, then don't even deal with Apache. Tell Tomcat to listen on port 80 and be done with it. I'm not tooting my own horn, but I've gotten emails from all over the world telling me my HOWTOs on using Apache + mod_jk + Tomcat are quite good. I don't know if you are using Redhat or not, but if you are, check them out: http://www.johnturner.com/howto There are other HOWTOs for Windows and other environments that are also done quite well. I'm not saying you have to use Apache and mod_jk, I am just pointing out that if you WANT to use them, there are plenty of concise documents available to help you use them. I'll repeat myself...don't just wing it and jump into something...think it through. If your site is down, getting it up is paramount, and the fastest way to do that is to do it the simplest way and deal with adding bells and whistles later. Also, I wanted to add that putting Apache into the mix will DO NOTHING to resolve a servlet error you're getting from Tomcat and your Turbine app. If anything, putting Apache and mod_jk into the mix will make it HARDER to diagnose the servlet error you are getting. Put Tomcat on port 80 and be done with it. John -Original Message- From: David Wynter [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 2:14 PM To: Tomcat Users List Subject: RE: problems with paths using mod_jk 1.2 I think best approach is to install Apache 2.0.42 as I had before the corrupt filesystem where it all worked using the redirect with the configuration I had without the Turbine error. I don't find the Apache HowTo on mod_jk very good, the standard mod_jk.conf you get when you install has Alias and Directory used in contexts that are not explained in the HowTos. Also these are not explained in isolation anyway. Possibly this is only a small part of my problem, but rather than try to understand mod_jk I will be better to build what know worked. I thought that I could change the URL so that it inserted the 8080 port part for that first URL hit using a VirtualHost or Alias , which I gather from John response I cannot do. Thanks David -Original Message- From: Michael Schulz [mailto:[EMAIL PROTECTED]] Sent: 03 October 2002 18:54 To: Tomcat Users List Subject: RE: problems with paths using mod_jk 1.2 Dave, I have to agree with John. I spent a great deal of time helping on that debacle as well...it is really sad to hear that you lost everything as a result of a corrupt file system...(:) You have to know what you want to achieve before I would be willing to lend more assistance. How will you get there if you don't know where you are going? Apache...Tomcat...port 80...port 8080...meta-redirects...body onload handlers...this is way more complex than it needs to be. I think John's idea of running tomcat as root and changing the http connector listen port from 8080 to 80 is the simplest idea. Why you would use apache just to redirect from port 80 to 8080 is beyond me. Your situation is exactly what Craig McClanahan was referring to recently when he made a valid case for using tomcat in a standalone environment. -Mike Schulz -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 12:43 PM To: 'Tomcat Users List' Subject: RE: problems with paths using mod_jk 1.2 Whoa, I think you've got some things mixed up. If you want to use mod_jk, then requests NEVER go to 8080. That's the whole point of a connector. It connects Apache to Tomcat so that requests are served on port 80, not port 8080. I hesitate to get involved, because we went around and around in circles the last time you had a problem, so I will try and sum things up as clearly as I can: - if you are getting some error message from a Turbine servlet, then fix that error...don't go grabbing at straws - if you want your app served on port 8080, don't use Apache at all...use Tomcat in stand-alone mode - if you want your app served on port 80, and don't mind running Tomcat as root (some people do mind this) then change server.xml to listen on port 80 and be done with it - if you want your app served on port 80