Re: looking for sample MBean code for tomcat 6
Please read this: http://java.sun.com/developer/technicalArticles/J2SE/jmx.html http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html Peter Am 09.01.2008 um 08:03 schrieb Frank Z: hello, I am looking some sample MBean code for TC 6.0.. I was able to model some code after the source code (e.g. MemoryUserDatabaseMBean.java in the org.apache.catalina.users. package) . I was also able to create the mbeans-descriptor.xml One question that I have is that even though the code compiled and deployed TC, i am not able to see my custom MBean via JConsole . Are there additional things needed to get the MBean registered properly in TC? Thanks in advance. __ __ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/ newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forwarding with jkmount
Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is posted in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter) The situation is the following: Currently we have several web applications running on a Tomcat 6 server. For the sake of this explanation I will call then web1 and web2. I have apache set up to use jkmount to forward requests from the apache server to the tomcat server. The problem is that I can only get apache to forward things like www.esat.kuleuven.be/web1 and www.esat.kuleuven.be/web2. I would like to be able to forward things like www.esat.kuleuven.be//somefancyname//web1 to the same application on the Tomcat server. I know this is possible with ProxyPassReverse in apache, but I would like to be able to do this with jkmount so that I keep the possibility to easily jump to a backup server if the main server goes down (Tomcat crashes more often for us then the http server does). To add to the problem, the web applications I am talking about are updates from earlier versions. We still have the older versions running on older versions of Tomcat and the forwarding rules of www.esat.kuleuven.be/web1 need to continue to point to the old server. As far as I can tell using the location tag in the apache conf file will not help since it seems to me that jkmount takes that location as a parameter to forward to Tomcat. And since my application is called web1 and not somefancyname/web1 it cant find it in the web applications folder. Using a subdomain in a virtualhost could probably fix the problem in a way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new web application, but it is very unlikely that our system administrators will allow us to set up this subdomain. And even if they would it isn't really the url I was hoping for. So in sumary, what I would like is 2 types of links: www.esat.kuleuven.be/web1 to point to the older web application www.esat.kuleuven.be//somefancyname//web1 to point to the new web application (both have the same name but are on a different tomcat server) Any help would be welcome. With kind regards, Edwin Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk/tomcat problem
Hi I'm trying to balance connections using mod_jk, but I'm getting this error: [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_send_request::jk_ajp_common.c (1359): (loadbalancer) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_service::jk_ajp_common.c (2204): (loadbalancer) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_handler::mod_jk.c (2364): Service error=-3 for worker=loadbalancer It's trying to connect to 127.0.0.1:8009, but on my workers.properties file I define that tomcat is listening on 8080: worker.list=loadbalancer,worker1,worker2 worker.loadbalancer.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=192.168.11.6 worker.worker1.port=8080 worker.worker1.lbfactor=1 worker.worker2.type=ajp13 worker.worker2.host=192.168.11.2 worker.worker2.port=8080 worker.worker2.lbfactor=1 Anyone could tell me why is trying to connect to 8009 insted of 8080? Thank you! Jordi -- .. __ / / Jordi Prats C E / S / C A Dept. de Sistemes /_/Centre de Supercomputació de Catalunya Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED] .. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat6 installation
Hello, I am trying to install tomcat6 on Solaris 8. I downloaded apache-tomcat-6.0.14-src.tar and untarred the archive to /usr/local/tomcat6/ I also changed the ownership to a normal user and modified the files under bin/ to executables. If I ran ./startup.sh: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program I defined these variables. The next error is: bash-2.03# ./startup.sh Using CATALINA_BASE: /usr/local/tomcat6/ Using CATALINA_HOME: /usr/local/tomcat6/ Using CATALINA_TMPDIR: /usr/local/tomcat6/ Using JRE_HOME: /usr/local/java/j2sdk1.4.2_08/jre/ touch: /usr/local/tomcat6/logs/catalina.out cannot create ./catalina.sh: /usr/local/tomcat6/logs/catalina.out: cannot create So I created manually logs folder. The next error is displayed under logs/catalina.out: bash$ more catalina.out Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s tartup/Bootstrap could you please advise? thanks ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?
On Tue, 08 Jan 2008 21:10:31 + Mark Thomas wrote: All I can suggest is start Tomcat with remote debugging enabled and when you see the error, connect, debug you way through a request and see if you can see what the security settings are and try and confirm that they match the policy file. I'll try to do this . Meanwhile, I've also seen something similar with the AJP connector. I'm pasting from the beginning of the stack traces. Sorry it's so long but it might give you some clue. This is the first stack trace after the container startup. Jan 9, 2008 9:15:25 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet action threw exception java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:951) at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:537) at sun.nio.cs.StreamEncoder.flushLeftoverChar(StreamEncoder.java:223) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:282) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:130) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:216) at java.io.PrintWriter.close(PrintWriter.java:295) at astarot.web.CompressionServletResponseWrapper.finishResponse(CompressionServletResponseWrapper.java:99) at astarot.web.CompressionFilter.doFilter(CompressionFilter.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at astarot.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at
Re: Preferred load-balanced worker
Hi, Nahor wrote: Hi, Is there a way to specify at runtime what worker the load-balancer should use first? For some request, we can't use cookies so we pass the session id via the URL or via the query string. We then force the worker using RewriteRule and the JK_WORKER_NAME env var. But then the request doesn't pass through the load-balancer anymore. So even if we stop that worker in the load-balancer, it will still receive the request instead of being redirected to another worker. So is there a JK_LB_PREFERRED_WORKER kind of variable or equivalent that the load-balancer would use instead of the cookie? Not directly, you could make use of the cookie and url encoding routing facilities of an lb though. - Make sure the JSESSIONID gets deleted before and the new request doesn't contain a wrong ;jsessionid URL encoding - Either use mod_headers to set a fake JSESSIONID Cookie header to the request - Or use mod_rewrite and append a fake ;jsessionid=... URL encoding at the end of the URL (but before the query string). The value of the Cookie resp. jsessionid would be X.MYROUTE, where MYROUTE is the name of the lb sub worker you want to gert chosen by the lb. Session with id X will not exist on the target MYROUTE, so a new session will be created for the request. Let us know if this works :) Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk/tomcat problem
I think you have given the wrong port for the worker configuration. You should give the AJP port and not the HTTP port for the worker. Jordi Prats [EMAIL PROTECTED] sTo users@tomcat.apache.org 01/09/2008cc 03:58 PM Subject mod_jk/tomcat problem Please respond to Tomcat Users List [EMAIL PROTECTED] pache.org Hi I'm trying to balance connections using mod_jk, but I'm getting this error: [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_send_request::jk_ajp_common.c (1359): (loadbalancer) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_service::jk_ajp_common.c (2204): (loadbalancer) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_handler::mod_jk.c (2364): Service error=-3 for worker=loadbalancer It's trying to connect to 127.0.0.1:8009, but on my workers.properties file I define that tomcat is listening on 8080: worker.list=loadbalancer,worker1,worker2 worker.loadbalancer.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=192.168.11.6 worker.worker1.port=8080 worker.worker1.lbfactor=1 worker.worker2.type=ajp13 worker.worker2.host=192.168.11.2 worker.worker2.port=8080 worker.worker2.lbfactor=1 Anyone could tell me why is trying to connect to 8009 insted of 8080? Thank you! Jordi -- .. __ / / Jordi Prats C E / S / C A Dept. de Sistemes /_/Centre de Supercomputació de Catalunya Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED] .. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 installation
Hello and thanks for the reply, I downloaded the binaries apache-tomcat-6.0.14.tar.gz export JAVA_HOME=/usr/local/java/j2sdk1.4.2_08/ export JRE_HOME=/usr/local/java/j2sdk1.4.2_08/jre/ the tomcat is still not starting: bash-2.03# more catalina.out Exception in thread main java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) could you please advise? thanks again --- David Delbecq [EMAIL PROTECTED] wrote: En l'instant précis du 09/01/08 11:16, Melanie Pfefer s'exprimait en ces termes: Hello, I am trying to install tomcat6 on Solaris 8. I downloaded apache-tomcat-6.0.14-src.tar and untarred the archive to /usr/local/tomcat6/ bash$ more catalina.out Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s tartup/Bootstrap could you please advise? thanks Sure, the -src file is the *source* file of tomcat, those need you to compile it and probably run a dist making script included in folder. If you just want to install tomcat, download the binary packages. -- http://www.devlog.be (a belgian developer's logs) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding with jkmount
Hi Edwin, Edwin Walsh wrote: Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is posted in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter) In fact the solution to the problem is non-trivial :) The situation is the following: Currently we have several web applications running on a Tomcat 6 server. For the sake of this explanation I will call then web1 and web2. I have apache set up to use jkmount to forward requests from the apache server to the tomcat server. The problem is that I can only get apache to forward things like www.esat.kuleuven.be/web1 and www.esat.kuleuven.be/web2. I would like to be able to forward things like www.esat.kuleuven.be//somefancyname//web1 to the same application on the Tomcat server. I know this is possible with ProxyPassReverse in apache, but I would like to be able to do this with jkmount so that I keep the possibility to easily jump to a backup server if the main server goes down (Tomcat crashes more often for us then the http server does). To add to the problem, the web applications I am talking about are updates from earlier versions. We still have the older versions running on older versions of Tomcat and the forwarding rules of www.esat.kuleuven.be/web1 need to continue to point to the old server. As far as I can tell using the location tag in the apache conf file will not help since it seems to me that jkmount takes that location as a parameter to forward to Tomcat. And since my application is called web1 and not somefancyname/web1 it cant find it in the web applications folder. Using a subdomain in a virtualhost could probably fix the problem in a way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new web application, but it is very unlikely that our system administrators will allow us to set up this subdomain. And even if they would it isn't really the url I was hoping for. So in sumary, what I would like is 2 types of links: www.esat.kuleuven.be/web1 to point to the older web application www.esat.kuleuven.be//somefancyname//web1 to point to the new web application (both have the same name but are on a different tomcat server) I think the solution should have 2 ingredients: 1) Make sure, that /web/ and /something/web match different JkMounts JkMount /web1|/* oldworker JkMount /?*/web1|/* newworker ? matches one character, so the second rule won't match /web1/..., except for /web1/.../web1/... The | character is a shortcut form for 2 rules in one: JkMount /web1|/* oldworker is equivalent to JkMount /web1 oldworker JkMount /web1/* oldworker 2) Rewrite request to remove /something before forwarding Have a look at mod_rewrite. With mod_rewrite you can change the URL with a pattern based syntax. In order to forward the changed URL and not the original URL through mod_jk, you need to also set the pass through flag [PT] in mod_rewrite Now the only thing I'm not sure at the moment is, if in case you rewrite the URL via mod_rewrite, the JkMounts are handeled before the rewrite (then this should work) or after (then it would obvisouly not). Play around a bit with the ideas, set JkLogLevel to debug and use a RewriteLog with a high level, so you can follow the URL manipulation and mapping in the log. If rewrite is done before JkMount, we'll have another solution :) Any help would be welcome. With kind regards, Edwin Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat6 installation
From: Melanie Pfefer [mailto:[EMAIL PROTECTED] Exception in thread main java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) Make sure you have at least JDK1.5 installed, and that your JAVA_HOME is pointing to that JDK. It looks like you're trying to run Tomcat on a 1.4 JDK. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 installation
Melanie; Am Wed, 9 Jan 2008 10:48:10 + (GMT) schrieb Melanie Pfefer [EMAIL PROTECTED]: export JAVA_HOME=/usr/local/java/j2sdk1.4.2_08/ export JRE_HOME=/usr/local/java/j2sdk1.4.2_08/jre/ [...] java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) tomcat 6.x requires JRE/JDK to be at least 5.0... Cheers, Kristian -- Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/ jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771 One dreaming alone, it will be only a dream; many dreaming together is the beginning of a new reality. (Hundertwasser) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk/tomcat problem
Hi Jordi, Jordi Prats wrote: Hi I'm trying to balance connections using mod_jk, but I'm getting this error: [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_send_request::jk_ajp_common.c (1359): (loadbalancer) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_service::jk_ajp_common.c (2204): (loadbalancer) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_handler::mod_jk.c (2364): Service error=-3 for worker=loadbalancer It's trying to connect to 127.0.0.1:8009, but on my workers.properties file I define that tomcat is listening on 8080: worker.list=loadbalancer,worker1,worker2 worker.loadbalancer.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=192.168.11.6 worker.worker1.port=8080 worker.worker1.lbfactor=1 worker.worker2.type=ajp13 worker.worker2.host=192.168.11.2 worker.worker2.port=8080 worker.worker2.lbfactor=1 Anyone could tell me why is trying to connect to 8009 insted of 8080? As you can see, it is not only using the wrong port, but also the wrong IP. In fact it is trying to use the worker named loadbalancer as a normal ajp13 worker instead of as an load-balancing worker. And for ajp workers, default host+port are localhost+8009. Solution: you forgot worker.loadbalancer.type=lb :) But: see also the other reply. Port 8080 by convention is used on the backend for an http connector, which will not work with JK. You need to define an AJP connector on the backends and use the port of this connector in workers.properties. Thank you! Jordi Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding with jkmount
While I was attempting to use rewrite and jk i found that you need to load the jk module before the rewrite module, so be warned ;) On Jan 9, 2008 10:53 AM, Rainer Jung [EMAIL PROTECTED] wrote: Hi Edwin, Edwin Walsh wrote: Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is posted in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter) In fact the solution to the problem is non-trivial :) The situation is the following: Currently we have several web applications running on a Tomcat 6 server. For the sake of this explanation I will call then web1 and web2. I have apache set up to use jkmount to forward requests from the apache server to the tomcat server. The problem is that I can only get apache to forward things like www.esat.kuleuven.be/web1 and www.esat.kuleuven.be/web2. I would like to be able to forward things like www.esat.kuleuven.be//somefancyname//web1 to the same application on the Tomcat server. I know this is possible with ProxyPassReverse in apache, but I would like to be able to do this with jkmount so that I keep the possibility to easily jump to a backup server if the main server goes down (Tomcat crashes more often for us then the http server does). To add to the problem, the web applications I am talking about are updates from earlier versions. We still have the older versions running on older versions of Tomcat and the forwarding rules of www.esat.kuleuven.be/web1 need to continue to point to the old server. As far as I can tell using the location tag in the apache conf file will not help since it seems to me that jkmount takes that location as a parameter to forward to Tomcat. And since my application is called web1 and not somefancyname/web1 it cant find it in the web applications folder. Using a subdomain in a virtualhost could probably fix the problem in a way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new web application, but it is very unlikely that our system administrators will allow us to set up this subdomain. And even if they would it isn't really the url I was hoping for. So in sumary, what I would like is 2 types of links: www.esat.kuleuven.be/web1 to point to the older web application www.esat.kuleuven.be//somefancyname//web1 to point to the new web application (both have the same name but are on a different tomcat server) I think the solution should have 2 ingredients: 1) Make sure, that /web/ and /something/web match different JkMounts JkMount /web1|/* oldworker JkMount /?*/web1|/* newworker ? matches one character, so the second rule won't match /web1/..., except for /web1/.../web1/... The | character is a shortcut form for 2 rules in one: JkMount /web1|/* oldworker is equivalent to JkMount /web1 oldworker JkMount /web1/* oldworker 2) Rewrite request to remove /something before forwarding Have a look at mod_rewrite. With mod_rewrite you can change the URL with a pattern based syntax. In order to forward the changed URL and not the original URL through mod_jk, you need to also set the pass through flag [PT] in mod_rewrite Now the only thing I'm not sure at the moment is, if in case you rewrite the URL via mod_rewrite, the JkMounts are handeled before the rewrite (then this should work) or after (then it would obvisouly not). Play around a bit with the ideas, set JkLogLevel to debug and use a RewriteLog with a high level, so you can follow the URL manipulation and mapping in the log. If rewrite is done before JkMount, we'll have another solution :) Any help would be welcome. With kind regards, Edwin Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat6 installation
thanks a lot. I appreciate your help. 1- how to change the http port number? 2- how to allow a non-root user to start tomcat? Is it only though file ownership modification (chown -R /usr/local/tomcat6)? thanks again. --- Peter Crowther [EMAIL PROTECTED] wrote: From: Melanie Pfefer [mailto:[EMAIL PROTECTED] Exception in thread main java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap (Unsupported major.minor version 49.0) Make sure you have at least JDK1.5 installed, and that your JAVA_HOME is pointing to that JDK. It looks like you're trying to run Tomcat on a 1.4 JDK. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat6 installation
From: Melanie Pfefer [mailto:[EMAIL PROTECTED] 1- how to change the http port number? Look at the various Connector elements in conf/server.xml 2- how to allow a non-root user to start tomcat? Is it only though file ownership modification (chown -R /usr/local/tomcat6)? Make sure you're not using a port under 1024 on UNIX, or Tomcat will have to bind that port as root anyway. Otherwise, you just need to make sure the non-root user has access to the appropriate Java and Tomcat files, yes. I routinely run Tomcat as a non-root user on various Linux systems, just by extracting a copy in my user directory and making sure I don't use any privileged ports. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forwarding with jkmount
Hi Rainer, I have been playing around with mod_rewrite, but as far as I can tell the rewrite is done before the jkmount. So I can get this wonderful url to be rewritten to the actual name of the web application, but since the old and the new versions have the same name it will not work. For a moment I thought it might have something to do with the forwarding rules of mod_jk, but as far as I can tell the standard option is ForwardURIProxy which means it sends the rewritten rule to tomcat instead of the original one. It would be wonderful if there would exist something to manipulate the url after is being forwarded with jkmount (or anything else that could help me get the results needed :) ) Rainer Jung wrote: Hi Edwin, Edwin Walsh wrote: Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is posted in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter) In fact the solution to the problem is non-trivial :) The situation is the following: Currently we have several web applications running on a Tomcat 6 server. For the sake of this explanation I will call then web1 and web2. I have apache set up to use jkmount to forward requests from the apache server to the tomcat server. The problem is that I can only get apache to forward things like www.esat.kuleuven.be/web1 and www.esat.kuleuven.be/web2. I would like to be able to forward things like www.esat.kuleuven.be//somefancyname//web1 to the same application on the Tomcat server. I know this is possible with ProxyPassReverse in apache, but I would like to be able to do this with jkmount so that I keep the possibility to easily jump to a backup server if the main server goes down (Tomcat crashes more often for us then the http server does). To add to the problem, the web applications I am talking about are updates from earlier versions. We still have the older versions running on older versions of Tomcat and the forwarding rules of www.esat.kuleuven.be/web1 need to continue to point to the old server. As far as I can tell using the location tag in the apache conf file will not help since it seems to me that jkmount takes that location as a parameter to forward to Tomcat. And since my application is called web1 and not somefancyname/web1 it cant find it in the web applications folder. Using a subdomain in a virtualhost could probably fix the problem in a way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new web application, but it is very unlikely that our system administrators will allow us to set up this subdomain. And even if they would it isn't really the url I was hoping for. So in sumary, what I would like is 2 types of links: www.esat.kuleuven.be/web1 to point to the older web application www.esat.kuleuven.be//somefancyname//web1 to point to the new web application (both have the same name but are on a different tomcat server) I think the solution should have 2 ingredients: 1) Make sure, that /web/ and /something/web match different JkMounts JkMount /web1|/* oldworker JkMount /?*/web1|/* newworker ? matches one character, so the second rule won't match /web1/..., except for /web1/.../web1/... The | character is a shortcut form for 2 rules in one: JkMount /web1|/* oldworker is equivalent to JkMount /web1 oldworker JkMount /web1/* oldworker 2) Rewrite request to remove /something before forwarding Have a look at mod_rewrite. With mod_rewrite you can change the URL with a pattern based syntax. In order to forward the changed URL and not the original URL through mod_jk, you need to also set the pass through flag [PT] in mod_rewrite Now the only thing I'm not sure at the moment is, if in case you rewrite the URL via mod_rewrite, the JkMounts are handeled before the rewrite (then this should work) or after (then it would obvisouly not). Play around a bit with the ideas, set JkLogLevel to debug and use a RewriteLog with a high level, so you can follow the URL manipulation and mapping in the log. If rewrite is done before JkMount, we'll have another solution :) Any help would be welcome. With kind regards, Edwin Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Busyness Method and others...
Hello Rainer; Thanks again for taking the time and for the information. if I quote you Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. But the million dollar question :-) is , if cping,cpong does not determine a nodes HEALTH OR LOAD as you put it, how is the LOAD on a node determined (what is used to monitor the health/load of nodes) technically by the methods please? Thanks and Best Regards Mohan Rainer Jung-3 wrote: Mohan2005 schrieb: Hello! The documentation says the following on the Busyness Method... QUOTE If set to B[usyness] the balancer will pick the worker with the lowest current load, based on how many requests the worker is currently serving. This number is divided by the workers lbfactor, and the lowest value (least busy) worker is picked. This method is especially interesting, if your request take a long time to process, like for a download application. END QUOTE What is defined as take a long time, is it 30 sec, 40 sec, or more ? Let us rephrase this. Busyness is especially useful, if the number of parallel requests you can handle is your limiting factor. Suppose you need to handle very high concurrency, like e.g. 10.000 parallel requests. Then you might come close to how many connections your components (OS, web server, Tomcat, etc.) can handle and you need to balance with respect to the expensive ressource connections instead of CPU etc. Now how does parallelity relate to long running requests? Parallelity = Throughput * ResponseTime So given some fixed throughput, parallelity grows proportional to reponse times. Talking about long response times is thus a simplified rephrasing of talking about high concurrency. If you have 10 request per second (not a high load), but the response time is 5 minutes, then you will end up with about 3.000 parallel requests and this could be a good scenario for busyness method. and from the clarifications I have got from this forum, the nodes load is determined by it network latency using cping and cping. These I believe are Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. used by all load-balancer methods to determine a nodes health. So checking the Requested hits (Acc in jkmanager) or Busy (Busy in jkmanager) or the Traffic are just checking the counters of a node that is more active than the other nodes. Essentially what all these methods does is check a node's health by cping, cping (Network latency) , and if it responds in good time, then check either yes the 'Acc', 'Busy' or 'Traffic' counters and send to the node with least 'Acc' if 'Request' method is used or Busy if 'Busy' method is used or Bytes IN/OUT if Traffic method is used. yes Is this summary of mod_jk in non-technical perspective accurate ?? Thanks Regards Mohan Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Busyness-Method-and-others...-tp14690721p14712091.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk/tomcat problem
Thank you both! Now it's working fine, thanks Jordi Shiby Maria John wrote: I think you have given the wrong port for the worker configuration. You should give the AJP port and not the HTTP port for the worker. Jordi Prats [EMAIL PROTECTED] sTo users@tomcat.apache.org 01/09/2008cc 03:58 PM Subject mod_jk/tomcat problem Please respond to Tomcat Users List [EMAIL PROTECTED] pache.org Hi I'm trying to balance connections using mod_jk, but I'm getting this error: [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_send_request::jk_ajp_common.c (1359): (loadbalancer) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] ajp_service::jk_ajp_common.c (2186): (loadbalancer) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2) [Wed Jan 09 11:12:55 2008] [31970:3086935744] [error] ajp_service::jk_ajp_common.c (2204): (loadbalancer) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Wed Jan 09 11:12:55 2008] [31970:3086935744] [info] jk_handler::mod_jk.c (2364): Service error=-3 for worker=loadbalancer It's trying to connect to 127.0.0.1:8009, but on my workers.properties file I define that tomcat is listening on 8080: worker.list=loadbalancer,worker1,worker2 worker.loadbalancer.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=192.168.11.6 worker.worker1.port=8080 worker.worker1.lbfactor=1 worker.worker2.type=ajp13 worker.worker2.host=192.168.11.2 worker.worker2.port=8080 worker.worker2.lbfactor=1 Anyone could tell me why is trying to connect to 8009 insted of 8080? Thank you! Jordi -- .. __ / / Jordi Prats C E / S / C A Dept. de Sistemes /_/Centre de Supercomputació de Catalunya Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED] .. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- .. __ / / Jordi Prats C E / S / C A Dept. de Sistemes /_/Centre de Supercomputació de Catalunya Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED] .. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ISAPI redirector log file not being written
Isapi_redirect.dll is not writing to its log file. I have Tomcat 5.5 installed on a Windows Server 2003 box and I am using the ISAPI redirector to redirect some requests from IIS. I am using the isapi_redirect.properties file for my configuration (as opposed to the registry settings) and my worker properties and worker mount file are being read just fine. Is there a permissions setting that I am missing? I have allowed full control for the user IUSR_MACHINE_NAME on this file and it makes no difference. Does anyone have any ideas about what could be wrong here? Thanks. -- View this message in context: http://www.nabble.com/ISAPI-redirector-log-file-not-being-written-tp14713815p14713815.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5.5, balancer
Hi all When we introduce load balancing and a 2nd tomcat worker, the time to service client requests is not balanced. Some clients are serviced as above, but others may take 10, 20, 30 seconds or more. Eventually, clients timeout and sessions are lost. We ran our test over night with just 20 clients. All requests were serviced evenly and we experienced no timeouts. However, the attached jkstatus page shows some interesting results. The 'Busy' and 'Max' values for the two workers are vastly different. For worker1, these values just keep incrementing. Also, worker2 has serviced way more requests. The 'Busy' and 'Max Busy' numbers in the other table keep growing as well. Is this behaviour normal? or does this point to a problem somewhere in the configuration? As we add more clients, the time it takes to service requests gets more and more imbalanced. Some requests get serviced in 1 second, others can take 20 or 30 seconds. The more clients we add, the longer it takes for some requests to get serviced. We are using apache 2.26, mod_jk 1.2.26 and tomcat 6.0.14 , JRE 1.5_06-b05 Apache and worker1 are on the same box. worker2 is in a different box We are relly new on this(balancer), as you can see below we were using tomcat 5.5.20 , apache 2.2.0 and mod_jk 1.2.25 so we updated them all , but still same problems Thanks a lot for your help Rainer Jung wrote: Julio Cesar Leiva schrieb: Hi all We have this setup 1 web server apache 2.2.0 I hope it's not 2.2.0 but something more recent (e.g. 2.2.4 or 2.2.6) 2 tomcat servers tomcat 5.5.20 mod_jk 1.2.25 This is our workers.properties Remove the next line, it's useless. workers.java_home=/usr/lib64/jvm/java worker.list=cbnbalancer,jkstatus Maybe add connect_timeout and prepost_timeout to the next two, and if it makes sense for the app also reply_timeout. See http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=172.20.23.12 worker.worker1.port=8009 worker.worker1.lbfactor=1 #worker.worker1.connection_pool_timeout=600 #worker.worker1.socket_keepalive=1 #worker.worker1.socket_timeout=60 worker.worker1.socket_timeout=0 # Define prefered failover node for worker1 worker.worker1.redirect=worker2 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=172.20.21.211 worker.worker2.port=8009 worker.worker2.lbfactor=1 #worker.worker2.connection_pool_timeout=600 #worker.worker2.socket_keepalive=1 #worker.worker2.socket_timeout=60 worker.worker2.socket_timeout=0 # Define prefered failover node for worker2 worker.worker2.redirect=worker1 method T (Traffic) does only make sense, if you are bandwidth limited in the network and thus want to balance w.r.t bytes transferred. # Set properties for balancer which use worker1 and worker2 worker.cbnbalancer.type=lb worker.cbnbalancer.method=T worker.cbnbalancer.balance_workers=worker2,worker1 # Enable sticky-sessions (aka session affinity) worker.cbnbalancer.sticky_session=1 # Define a 'jkstatus' worker using status worker.jkstatus.type=status # Add the jkstatus mount point Maybe a little simpler, if you omit the trailing '*', thus mapping the exact URL /jkmanager/. JkMount /jkmanager/* jkstatus # Enable the JK manager access from localhost only !-- Location /jkmanager/ You don't need the next line, because you already defined this mount. JkMount jkstatus Order deny,allow Deny from all # Allow from 127.0.0.1 Allow from all /Location -- This is part of one server.xml connectionTimeout=60 would be a good fit to the 600 in your jk configuration. 2000 Threads is a lot, are you sure, that your OS can create that many Threads for a JVM (Memory issues possible)? If you only allow 700 parallel requests in Apache, you don't need more than 700 (+1?) threads in the AJP connector. Engine name=Catalina defaultHost=localhost jvmRoute=worker1 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is the second tomcat Engine name=Catalina defaultHost=localhost jvmRoute=worker2 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is part of the apache conf Which mpm, prefork? # number of server processes to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers StartServers 5 # minimum number of server processes which are kept spare # http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers MinSpareServers 5 # maximum number of server processes which are kept spare # http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers MaxSpareServers 10 # highest possible MaxClients setting for the lifetime of the Apache
Re: Forwarding with jkmount
Edwin Walsh wrote: Hi Rainer, I have been playing around with mod_rewrite, but as far as I can tell the rewrite is done before the jkmount. So I can get this wonderful url to be rewritten to the actual name of the web application, but since the old and the new versions have the same name it will not work. For a moment I thought it might have something to do with the forwarding rules of mod_jk, but as far as I can tell the standard option is ForwardURIProxy which means it sends the rewritten rule to tomcat instead of the original one. It would be wonderful if there would exist something to manipulate the url after is being forwarded with jkmount (or anything else that could help me get the results needed :) ) OK, then plan B: mod_jk has a less known way of deciding which worker to use when forwarding requests. You can also put the name of the worker to use in an httpd environment variable. If no JkMount matches, mod_jk checks the value of this variable, and if set, it sends the request to the worker that has the same name as the value of the variable. What's nice: mod_rewrite in httpd 2.2 is able to set environment variables. So you can first have a rule, that takes the original URL and sets the name of the worker (old_worker vs. new_worker9 into the variable, and the next rule rewrites the URL (removing the /something). See 'env|E=VAR:VAL' (set environment variable) in http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html. For the name of the environment variable, it is JK_WORKER_NAME. You can even change the name of the variable, if you don't like it with the directive JkWorkerIndicator. For the details and an example see Using SetHandler and Environment Variables in http://tomcat.apache.org/connectors-doc/reference/apache.html Have fun! Rainer Rainer Jung wrote: Hi Edwin, Edwin Walsh wrote: Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is posted in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter) In fact the solution to the problem is non-trivial :) The situation is the following: Currently we have several web applications running on a Tomcat 6 server. For the sake of this explanation I will call then web1 and web2. I have apache set up to use jkmount to forward requests from the apache server to the tomcat server. The problem is that I can only get apache to forward things like www.esat.kuleuven.be/web1 and www.esat.kuleuven.be/web2. I would like to be able to forward things like www.esat.kuleuven.be//somefancyname//web1 to the same application on the Tomcat server. I know this is possible with ProxyPassReverse in apache, but I would like to be able to do this with jkmount so that I keep the possibility to easily jump to a backup server if the main server goes down (Tomcat crashes more often for us then the http server does). To add to the problem, the web applications I am talking about are updates from earlier versions. We still have the older versions running on older versions of Tomcat and the forwarding rules of www.esat.kuleuven.be/web1 need to continue to point to the old server. As far as I can tell using the location tag in the apache conf file will not help since it seems to me that jkmount takes that location as a parameter to forward to Tomcat. And since my application is called web1 and not somefancyname/web1 it cant find it in the web applications folder. Using a subdomain in a virtualhost could probably fix the problem in a way that I could use /somefancyname/.esat.kuleuven.be/web1 for the new web application, but it is very unlikely that our system administrators will allow us to set up this subdomain. And even if they would it isn't really the url I was hoping for. So in sumary, what I would like is 2 types of links: www.esat.kuleuven.be/web1 to point to the older web application www.esat.kuleuven.be//somefancyname//web1 to point to the new web application (both have the same name but are on a different tomcat server) I think the solution should have 2 ingredients: 1) Make sure, that /web/ and /something/web match different JkMounts JkMount /web1|/* oldworker JkMount /?*/web1|/* newworker ? matches one character, so the second rule won't match /web1/..., except for /web1/.../web1/... The | character is a shortcut form for 2 rules in one: JkMount /web1|/* oldworker is equivalent to JkMount /web1 oldworker JkMount /web1/* oldworker 2) Rewrite request to remove /something before forwarding Have a look at mod_rewrite. With mod_rewrite you can change the URL with a pattern based syntax. In order to forward the changed URL and not the original URL through mod_jk, you need to also set the pass through flag [PT] in mod_rewrite Now the only thing I'm not sure at the moment is, if in case you
RemoteHostValve config problem
My RemoteHostValve config is causing a NPE when my app deploys, and I can't figure out why. It seems to be that the class can't be found, but the tomcat-optional.jar w/ the class is in the standard /server/lib dir. I'm using Tomcat 5.5.25 (OS X) and 5.5.20 (linux) and am getting the same error on both. The Valve is defined in my app's context.xml as so: ?xml version=1.0 encoding=UTF-8? Context ... Resource ... / Valve classname=org.apache.catalina.valves.RemoteHostValve allow=localhost/ /Context The error message in catalina.out I'm getting after adding the valve: Jan 9, 2008 9:40:35 AM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.NullPointerException at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:273) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205) at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:782) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:722) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:987) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5071) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3984) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) at java.lang.Thread.run(Thread.java:613) Jan 9, 2008 9:40:35 AM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in context.xml for /SumProgAdmin java.lang.NullPointerException at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) at
Re: Busyness Method and others...
Mohan2005 wrote: Hello Rainer; Thanks again for taking the time and for the information. if I quote you Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. But the million dollar question :-) is , if cping,cpong does not determine a nodes HEALTH OR LOAD as you put it, how is the LOAD on a node determined It *does* influence Health status, but not load status. (what is used to monitor the health/load of nodes) technically by the Health: independant of method. Always: timeouts (if configured, socket_timeout, cping/cpong=connect_timeout and prepost_timeout, response time=reply_timeout, max_reply_timeouts, fail_on_status, recovery_options, see http://tomcat.apache.org/connectors-doc/reference/workers.html For all healthy ones: if lb has sticky_sessions and there is a session with a route coming with the request, do not balance but use the best worker w.r.t the session (but only from the healthy ones): The result is influenced by activation, the worker name, route, redirect, domain (and I think distance). If sticky, but all allowed workers are not healthy and sticky_session_force: error Else or if not sticky: pure balancing (between the healthy workers) influenced by activation, and lb_factor. Balancing itself choses the worker with the lowest lb_value. How do we get an lb_value. I cite myself: === - method Request (default): increase the load value of a worker by one for each request send to the worker and divide by two all load values every now and then (app. once a minute). So the load value is the comulative number of requests handled by the worker with a envelope curve that counts older requests less than more recent ones. This method tries to keep total work balanced. - method Session: the same as Request, but do only count a request, if it didn't contain a session cookie or URL encoded session. It is not the same as actually knowing how many sessions each backend has. - method Busyness: load value is the number of requests currently being processed by a worker. For example when load is low, most or all workers will have load value 0. This method tries to keep concurrency balanced. It will not be good in balancing total work. === and finally (I forgot in the original mail) - method Traffic: Like request, but for each request do not increment by one, instead increment by the number of bytes transferred to the backend for the request plus receuved from the backend with the response. methods please? Thanks and Best Regards Mohan Regards, Rainer Rainer Jung-3 wrote: Mohan2005 schrieb: Hello! The documentation says the following on the Busyness Method... QUOTE If set to B[usyness] the balancer will pick the worker with the lowest current load, based on how many requests the worker is currently serving. This number is divided by the workers lbfactor, and the lowest value (least busy) worker is picked. This method is especially interesting, if your request take a long time to process, like for a download application. END QUOTE What is defined as take a long time, is it 30 sec, 40 sec, or more ? Let us rephrase this. Busyness is especially useful, if the number of parallel requests you can handle is your limiting factor. Suppose you need to handle very high concurrency, like e.g. 10.000 parallel requests. Then you might come close to how many connections your components (OS, web server, Tomcat, etc.) can handle and you need to balance with respect to the expensive ressource connections instead of CPU etc. Now how does parallelity relate to long running requests? Parallelity = Throughput * ResponseTime So given some fixed throughput, parallelity grows proportional to reponse times. Talking about long response times is thus a simplified rephrasing of talking about high concurrency. If you have 10 request per second (not a high load), but the response time is 5 minutes, then you will end up with about 3.000 parallel requests and this could be a good scenario for busyness method. and from the clarifications I have got from this forum, the nodes load is determined by it network latency using cping and cping. These I believe are Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. used by all load-balancer methods to determine a nodes health. So checking the Requested hits (Acc in jkmanager) or Busy (Busy in jkmanager) or the Traffic are just checking the counters of a node that is more active than the other nodes. Essentially what all these methods does is check a node's health by
RE: ISAPI redirector log file not being written
Have you tried the registry entries? Charlie Wingate [EMAIL PROTECTED] The significant problems we have cannot be solved at the same level of thinking with which we created them. ~ Albert Einstein -Original Message- From: pmarchwiak [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 10:19 AM To: users@tomcat.apache.org Subject: ISAPI redirector log file not being written Isapi_redirect.dll is not writing to its log file. I have Tomcat 5.5 installed on a Windows Server 2003 box and I am using the ISAPI redirector to redirect some requests from IIS. I am using the isapi_redirect.properties file for my configuration (as opposed to the registry settings) and my worker properties and worker mount file are being read just fine. Is there a permissions setting that I am missing? I have allowed full control for the user IUSR_MACHINE_NAME on this file and it makes no difference. Does anyone have any ideas about what could be wrong here? Thanks. -- View this message in context: http://www.nabble.com/ISAPI-redirector-log-file-not-being-written-tp1471 3815p14713815.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. --- This message is a CONFIDENTIAL communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ISAPI redirector log file not being written
pmarchwiak wrote: Isapi_redirect.dll is not writing to its log file. I have Tomcat 5.5 installed on a Windows Server 2003 box and I am using the ISAPI redirector to redirect some requests from IIS. I am using the isapi_redirect.properties file for my configuration (as opposed to the registry settings) and my worker properties and worker mount file are being read just fine. Is there a permissions setting that I am missing? I have allowed full control for the user IUSR_MACHINE_NAME on this file and it makes no difference. Does anyone have any ideas about what could be wrong here? Thanks. No good idea. Others? Just to make sure: - possible problem with spaces in path? - often the file only appear5s, after the first request has beend handled by the server - is the properties file in the same directory as the dll, i.e. in the virtual directory? Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Busyness Method and others...
Great information. This was what we were looking for. This will help us a lot in future changes to our cluster and node infrastructure. Thank you very much. Regards Mohan Rainer Jung-3 wrote: Mohan2005 wrote: Hello Rainer; Thanks again for taking the time and for the information. if I quote you Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. But the million dollar question :-) is , if cping,cpong does not determine a nodes HEALTH OR LOAD as you put it, how is the LOAD on a node determined It *does* influence Health status, but not load status. (what is used to monitor the health/load of nodes) technically by the Health: independant of method. Always: timeouts (if configured, socket_timeout, cping/cpong=connect_timeout and prepost_timeout, response time=reply_timeout, max_reply_timeouts, fail_on_status, recovery_options, see http://tomcat.apache.org/connectors-doc/reference/workers.html For all healthy ones: if lb has sticky_sessions and there is a session with a route coming with the request, do not balance but use the best worker w.r.t the session (but only from the healthy ones): The result is influenced by activation, the worker name, route, redirect, domain (and I think distance). If sticky, but all allowed workers are not healthy and sticky_session_force: error Else or if not sticky: pure balancing (between the healthy workers) influenced by activation, and lb_factor. Balancing itself choses the worker with the lowest lb_value. How do we get an lb_value. I cite myself: === - method Request (default): increase the load value of a worker by one for each request send to the worker and divide by two all load values every now and then (app. once a minute). So the load value is the comulative number of requests handled by the worker with a envelope curve that counts older requests less than more recent ones. This method tries to keep total work balanced. - method Session: the same as Request, but do only count a request, if it didn't contain a session cookie or URL encoded session. It is not the same as actually knowing how many sessions each backend has. - method Busyness: load value is the number of requests currently being processed by a worker. For example when load is low, most or all workers will have load value 0. This method tries to keep concurrency balanced. It will not be good in balancing total work. === and finally (I forgot in the original mail) - method Traffic: Like request, but for each request do not increment by one, instead increment by the number of bytes transferred to the backend for the request plus receuved from the backend with the response. methods please? Thanks and Best Regards Mohan Regards, Rainer Rainer Jung-3 wrote: Mohan2005 schrieb: Hello! The documentation says the following on the Busyness Method... QUOTE If set to B[usyness] the balancer will pick the worker with the lowest current load, based on how many requests the worker is currently serving. This number is divided by the workers lbfactor, and the lowest value (least busy) worker is picked. This method is especially interesting, if your request take a long time to process, like for a download application. END QUOTE What is defined as take a long time, is it 30 sec, 40 sec, or more ? Let us rephrase this. Busyness is especially useful, if the number of parallel requests you can handle is your limiting factor. Suppose you need to handle very high concurrency, like e.g. 10.000 parallel requests. Then you might come close to how many connections your components (OS, web server, Tomcat, etc.) can handle and you need to balance with respect to the expensive ressource connections instead of CPU etc. Now how does parallelity relate to long running requests? Parallelity = Throughput * ResponseTime So given some fixed throughput, parallelity grows proportional to reponse times. Talking about long response times is thus a simplified rephrasing of talking about high concurrency. If you have 10 request per second (not a high load), but the response time is 5 minutes, then you will end up with about 3.000 parallel requests and this could be a good scenario for busyness method. and from the clarifications I have got from this forum, the nodes load is determined by it network latency using cping and cping. These I believe are Who told you that? cping/cpong have nothing to do with load decisions. They only help in deciding, if a worker is in error status or not. Load is distributed between all nodes that are not in error. To which of those nodes a request goes is not decided by cping cpong. used by all
Re: Why use a Web Server over Tomcat?
Apache is considerably lighter on its feet to serve static pages and images quicker than TC Apache's HTTP server resource management algorithm revolves around Prefork MPM OK if you have 1-10 processes..considerably more problematic when Apache attempting to manage 100 concurrent processes Tomcat's superior multi-threading can manage multiple resources much more effectively.. Anyone else? M-- - Original Message - From: Alan Chaney [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 09, 2008 9:09 AM Subject: Re: Why use a Web Server over Tomcat? One reason for doing this, is again not whether IIS or APACHE is better although APACHE on linux in the hands of a guru is very good, its because Tomcat carries clear text passwords, so if a hacker did get at the machine, they would probably see the Active X LDAP master password, I don't understand this comment at all. 'Passwords' in tomcat can be managed by a whole host of authentication schemes. I use SSL to protect access to the password on the net and MD5 encoded passwords in a database for user authentication and access control. It depends entirely upon how you configure your system. Regards Alan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4784031b130881839419991! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Content_Length Problem
Just wanted to reply and let you guys know that enabling chunked encoding solved my connection issues with CICS. Thanks for all the help, I would have never found this solution without your assistance. Thanks- Joe -Original Message- From: Tim Whittington [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 4:36 PM To: 'Tomcat Users List' Subject: RE: Content_Length Problem That log statement indicates you haven't enabled chunked encoding in the connector config (it's off by default). Add enable_chunked_encoding=true to your isapi_redirect.properties (or as a registry setting if you're using that) and restart IIS. tim -Original Message- From: Woytasik Joe [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 January 2008 3:25 a.m. To: Tomcat Users List Subject: RE: Content_Length Problem I have tried the isapi_redirect.dll Tim provided, and it appeared to almost work. CICS made the request and received my response but for some reason did not interpret it correctly. Is there something in the redirector's log that I can look at to verify it is using chunked encoding? I see the following line, but never see one where chunked encoding is true. [Tue Jan 08 08:05:07.220 2008] [13680:12960] [debug] init_jk::jk_isapi_plugin.c (2146): Using chunked encoding? false. Thanks- Joe -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Saturday, January 05, 2008 11:05 AM To: Tomcat Users List Subject: Re: Content_Length Problem In Joes case CICS seems to get used as an HTTP client, not an HTTP server. Nevertheless the server page you found includes a link to http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/topic/com.ibm.cics. ts31.doc/dfhtl/topics/dfhtl_cwschunking.htm that contains the following information: === When CICS as an HTTP client receives a chunked message as a response to an application program's request, the chunks are also assembled before being passed to the application program as an entity body, and any trailing headers can be read using the HTTP header commands. You can specify how long the application will wait to receive the response, using the RTIMOUT attribute of the transaction profile definition for the transaction ID that relates to the application program. === So it seems, that CICS 3.1 does support chunked encoding when reading an HTTP response. So using either apache httpd or the chunked-encoding enabled variant of the isapi redirector could indeed be the solution. Regards, Rainer Martin Gainty schrieb: Tim-Thanks for the comprehensive explanationI found this link helpful for CICS transactions http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/ com.ibm.cics.ts31.doc/dfhtl/topics/dfhtl_http11serverintro.htm tml?ocid=TXT_TAGHM_Wave2_sharelife_012008 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is confidential. If you are not the intended recipient, you must not disclose or use the information contained in it. If you have received this e-mail in error, please tell us immediately by return e-mail to [EMAIL PROTECTED] and delete the document. E-mails containing unprofessional, discourteous or offensive remarks violate Sentry policy. You may report employee violations by forwarding the message to [EMAIL PROTECTED] No recipient may use the information in this e-mail in violation of any civil or criminal statute. Sentry disclaims all liability for any unauthorized uses of this e-mail or its contents. This e-mail constitutes neither an offer nor an acceptance of any offer. No contract may be entered into by a Sentry employee without express approval from an authorized Sentry manager. Warning: Computer viruses can be transmitted via e-mail. Sentry accepts no liability or responsibility for any damage caused by any virus transmitted with this e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ISAPI redirector log file not being written
pmarchwiak wrote: Isapi_redirect.dll is not writing to its log file. I have allowed full control for the user IUSR_MACHINE_NAME on this file and it makes no difference. If it's working (I suppose it is from your comment), then you should allow the permission read/write/create permission to the directory itself, not to the file. Regards -- ™ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 problem with log4j and policy
As an alternative can you point me to an howto about best pratices in logging with tomcat? R. - Roberto Riggio [EMAIL PROTECTED] wrote: Hi, sorry for the mistake, this is the directory where I'm logging: drwxr-x--- 2 tomcat55 adm 4096 2008-01-08 09:23 tomcat5.5 so the path that I'm using is: /var/log/tomcat5.5/myapp.log Tomcat is running under the user tomcat55 R. - Vinu Varghese [EMAIL PROTECTED] wrote: Hi, Under which user the tomcat process is running?. It seems the user doesn't have enough privilege to write to the folder. regards Roberto Riggio wrote: Hi, I'm deploying a struts 1.3.x webapp on tomcat 5.5. I'm using log4j 1.2.13 for logging and I've configured to log everything at /var/tmp/myapp.log However when i try to deploy the app tomcat complains that the webapp is not allowed to write on /var/log/myapp.log. How should I modify the policy files in order to enable proper logging? Moreover: is it correct to specify the log name in the log4j.properties files inside the webapp? Is there another more general way to do this so i do not have to modify it if I deploy the webapp on win instead of linux? Thanks R -- signature full-name Vinu Varghese /full-name company-email [EMAIL PROTECTED] /company-email company-website www.x-minds.org /company-website big-words Success always occurs in private, and failure in full view. /big-words company-name-big \/ ._ _ o .__| _ /\ ~~ | | | | | | (_| _\ /company-name-big /signature -- Roberto Riggio, PhD Student CREATE-NET Via alla Cascata 56/C 38100 Trento (Italy) E-mail: [EMAIL PROTECTED] HomePage: http://disi.unitn.it/~riggio/ Tel: +39.0461.314.960 Fax: +39.0461.314.972 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Riggio, PhD Student CREATE-NET Via alla Cascata 56/C 38100 Trento (Italy) E-mail: [EMAIL PROTECTED] HomePage: http://disi.unitn.it/~riggio/ Tel: +39.0461.314.960 Fax: +39.0461.314.972 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for sample MBean code for tomcat 6
Hi Peter, Thanks for sending the link. I guess what my real question was: how would I get TC to 'declaratively' instantiate my MBeans ? From the example, most of them has a main() method to instantiate and register the MBeans to the platform MBean Server. What would you recommend for TC , a servlet that loads on startup and within the init method it would create and register the MBeans? I am porting my MBeans from JBoss (embedding TC) and JBoss provides a declarative method do so without the needs of a servlet. It is done by creating a service archive (e.g. myservice.sar - containing a jboss-service.xml [similar to mbeans-descriptor.xml] that declares the MBeans). The JBoss container would then instantiate the MBeans via the MBean's start() method. public class Main { public static void main(String[] args) throws Exception { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName name = new ObjectName(com.example.mbeans:type=Hello); Hello mbean = new Hello(); mbs.registerMBean(mbean, name); System.out.println(Waiting forever...); Thread.sleep(Long.MAX_VALUE); } } Thanks Frank. - Original Message From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 9, 2008 1:20:10 AM Subject: Re: looking for sample MBean code for tomcat 6 Please read this: http://java.sun.com/developer/technicalArticles/J2SE/jmx.html http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html Peter Am 09.01.2008 um 08:03 schrieb Frank Z: hello, I am looking some sample MBean code for TC 6.0.. I was able to model some code after the source code (e.g. MemoryUserDatabaseMBean.java in the org.apache.catalina.users. package) . I was also able to create the mbeans-descriptor.xml One question that I have is that even though the code compiled and deployed TC, i am not able to see my custom MBean via JConsole . Are there additional things needed to get the MBean registered properly in TC? Thanks in advance. __ __ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/ newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why use a Web Server over Tomcat?
Alan and Johnny, I agree with Alan. I'm using the same scheme to save passwords in database, and SSL too. But, Johnny's answer help me understand some things. Johnny, when you say: So in those organization Tomcat is probably behind the second internal firewall for staff to use as well. What do you mean? If you have a Tomcat inside a DMZ, usually we have one firewall, that separates internet from intranet, i.e., the firewall filters requests that comes from de outside. Isn't that? Thanks, Regards, Bárbara Vieira -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 9 de Janeiro de 2008 14:10 To: Tomcat Users List Subject: Re: Why use a Web Server over Tomcat? One reason for doing this, is again not whether IIS or APACHE is better although APACHE on linux in the hands of a guru is very good, its because Tomcat carries clear text passwords, so if a hacker did get at the machine, they would probably see the Active X LDAP master password, I don't understand this comment at all. 'Passwords' in tomcat can be managed by a whole host of authentication schemes. I use SSL to protect access to the password on the net and MD5 encoded passwords in a database for user authentication and access control. It depends entirely upon how you configure your system. Regards Alan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4784031b130881839419991! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why use a Web Server over Tomcat?
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: Re: Why use a Web Server over Tomcat? Apache is considerably lighter on its feet to serve static pages and images quicker than TC While that was true several years ago, the current versions of Tomcat achieve virtually identical performance when delivering static content. Adding the overhead of another comm node for every request will hurt performance, not enhance it. Others have presented valid reasons for using httpd, but performance isn't one of them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RemoteHostValve config problem
Solved: A coworker spotted the problem: I wrote classname instead of className (camelCase). Alex Alex Jacoby wrote: My RemoteHostValve config is causing a NPE when my app deploys, and I can't figure out why. It seems to be that the class can't be found, but the tomcat-optional.jar w/ the class is in the standard /server/lib dir. I'm using Tomcat 5.5.25 (OS X) and 5.5.20 (linux) and am getting the same error on both. The Valve is defined in my app's context.xml as so: ?xml version=1.0 encoding=UTF-8? Context ... Resource ... / Valve classname=org.apache.catalina.valves.RemoteHostValve allow=localhost/ /Context The error message in catalina.out I'm getting after adding the valve: [...] Thanks for any ideas, Alex -- View this message in context: http://www.nabble.com/RemoteHostValve-config-problem-tp14714628p14715819.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5.5, balancer
Julio, Double check your httpd.conf to make sure there isn't multiple MaxClients entries that way you are certain the one being used us indeed the entry included in the snippet you had shared with us. Apache does not throw an error for Duplicate MaxClients entries. Julio Cesar Leiva wrote: Hi all When we introduce load balancing and a 2nd tomcat worker, the time to service client requests is not balanced. Some clients are serviced as above, but others may take 10, 20, 30 seconds or more. Eventually, clients timeout and sessions are lost. We ran our test over night with just 20 clients. All requests were serviced evenly and we experienced no timeouts. However, the attached jkstatus page shows some interesting results. The 'Busy' and 'Max' values for the two workers are vastly different. For worker1, these values just keep incrementing. Also, worker2 has serviced way more requests. The 'Busy' and 'Max Busy' numbers in the other table keep growing as well. Is this behaviour normal? or does this point to a problem somewhere in the configuration? As we add more clients, the time it takes to service requests gets more and more imbalanced. Some requests get serviced in 1 second, others can take 20 or 30 seconds. The more clients we add, the longer it takes for some requests to get serviced. We are using apache 2.26, mod_jk 1.2.26 and tomcat 6.0.14 , JRE 1.5_06-b05 Apache and worker1 are on the same box. worker2 is in a different box We are relly new on this(balancer), as you can see below we were using tomcat 5.5.20 , apache 2.2.0 and mod_jk 1.2.25 so we updated them all , but still same problems Thanks a lot for your help Rainer Jung wrote: Julio Cesar Leiva schrieb: Hi all We have this setup 1 web server apache 2.2.0 I hope it's not 2.2.0 but something more recent (e.g. 2.2.4 or 2.2.6) 2 tomcat servers tomcat 5.5.20 mod_jk 1.2.25 This is our workers.properties Remove the next line, it's useless. workers.java_home=/usr/lib64/jvm/java worker.list=cbnbalancer,jkstatus Maybe add connect_timeout and prepost_timeout to the next two, and if it makes sense for the app also reply_timeout. See http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=172.20.23.12 worker.worker1.port=8009 worker.worker1.lbfactor=1 #worker.worker1.connection_pool_timeout=600 #worker.worker1.socket_keepalive=1 #worker.worker1.socket_timeout=60 worker.worker1.socket_timeout=0 # Define prefered failover node for worker1 worker.worker1.redirect=worker2 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=172.20.21.211 worker.worker2.port=8009 worker.worker2.lbfactor=1 #worker.worker2.connection_pool_timeout=600 #worker.worker2.socket_keepalive=1 #worker.worker2.socket_timeout=60 worker.worker2.socket_timeout=0 # Define prefered failover node for worker2 worker.worker2.redirect=worker1 method T (Traffic) does only make sense, if you are bandwidth limited in the network and thus want to balance w.r.t bytes transferred. # Set properties for balancer which use worker1 and worker2 worker.cbnbalancer.type=lb worker.cbnbalancer.method=T worker.cbnbalancer.balance_workers=worker2,worker1 # Enable sticky-sessions (aka session affinity) worker.cbnbalancer.sticky_session=1 # Define a 'jkstatus' worker using status worker.jkstatus.type=status # Add the jkstatus mount point Maybe a little simpler, if you omit the trailing '*', thus mapping the exact URL /jkmanager/. JkMount /jkmanager/* jkstatus # Enable the JK manager access from localhost only !-- Location /jkmanager/ You don't need the next line, because you already defined this mount. JkMount jkstatus Order deny,allow Deny from all # Allow from 127.0.0.1 Allow from all /Location -- This is part of one server.xml connectionTimeout=60 would be a good fit to the 600 in your jk configuration. 2000 Threads is a lot, are you sure, that your OS can create that many Threads for a JVM (Memory issues possible)? If you only allow 700 parallel requests in Apache, you don't need more than 700 (+1?) threads in the AJP connector. Engine name=Catalina defaultHost=localhost jvmRoute=worker1 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is the second tomcat Engine name=Catalina defaultHost=localhost jvmRoute=worker2 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is part of the apache conf Which mpm, prefork? # number of server processes to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers StartServers 5 # minimum number of server processes which are kept spare #
response.sendRedirect() failing mysteriously in struts application
Hi all, I'm running into a problem in a struts application I'm working on. In my struts-config.xml, I have this action-mapping: action path=/register scope=session name=RegistrationForm type=com.foo.RegistrationAction forward name=success path=/index.jsp redirect=true/ forward name=failure path=/register.jsp redirect=true/ /action The RegistrationAction.execute() method takes several request parameters and uses them to create an account; when this is successful, it returns mapping.findForward(success), and otherwise, it returns mapping.findForward(failure). For reasons I have not been able to determine, the redirection often fails. RegistrationAction.execute() will run successfully, the mapping.findForward() succeeds and finds the correct forward, which is then returned -- but an exception is thrown while the redirect is sent to the client. This is the full log output: Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet action threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435) at org.apache.struts.chain.commands.servlet.PerformForward.handleAsRedirect(PerformForward.java:125) at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:94) at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardHostValve custom SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp] java.lang.IllegalStateException at org.apache.coyote.Response.reset(Response.java:297) at org.apache.catalina.connector.Response.reset(Response.java:652) at org.apache.catalina.connector.Response.reset(Response.java:916) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:417) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) I understand that the second exception happens because, after sending a redirect, it is no longer possible to forward to the error page, but what is a complete mystery to me is why the first exception occurs. RegistrationAction.execute() never touches the response, so struts should have no problem sending the redirect to /index.jsp (or back to /register.jsp, in the case of failure). This exception does not happen consistently. Sometimes it does, sometimes it doesn't, with no
Re: response.sendRedirect() failing mysteriously in struts application
The illegalStateException while sendRedirect happens because some content has already been submitted to client, thus the http code (OK) was already send and it's too late to change headers. Check your action don't do make output in the action. Thomas Okken wrote: Hi all, I'm running into a problem in a struts application I'm working on. In my struts-config.xml, I have this action-mapping: action path=/register scope=session name=RegistrationForm type=com.foo.RegistrationAction forward name=success path=/index.jsp redirect=true/ forward name=failure path=/register.jsp redirect=true/ /action The RegistrationAction.execute() method takes several request parameters and uses them to create an account; when this is successful, it returns mapping.findForward(success), and otherwise, it returns mapping.findForward(failure). For reasons I have not been able to determine, the redirection often fails. RegistrationAction.execute() will run successfully, the mapping.findForward() succeeds and finds the correct forward, which is then returned -- but an exception is thrown while the redirect is sent to the client. This is the full log output: Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet action threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435) at org.apache.struts.chain.commands.servlet.PerformForward.handleAsRedirect(PerformForward.java:125) at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:94) at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardHostValve custom SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp] java.lang.IllegalStateException at org.apache.coyote.Response.reset(Response.java:297) at org.apache.catalina.connector.Response.reset(Response.java:652) at org.apache.catalina.connector.Response.reset(Response.java:916) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:417) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) I understand that the second exception happens because, after sending a redirect, it is no longer possible to forward to the error page, but what is a complete mystery to me is why the first exception
Re: looking for sample MBean code for tomcat 6
--- HARBOR: http://coolharbor.100free.com/index.htm The best application server on earth --- Hi Frank, I played with this a long time ago, and I've completely forgotten what I did. When it comes to monitoring servlets (own code) I came to the conclusion that its very hard to top a web server and an admin web page behind a password... but ok thats why I didnt persue it. But there were 2 links in particular that I found very useful... http://oss.wxnet.org/mbeans.html which talks about general tomcat config your question is in there, the Mbean starts with a context listener. and this... http://www.netbeans.org/kb/articles/jmx-tutorial.html which is a JMX plug-in for NB... makes testing and just getting the formats right easy. and then on tomcat I vaguely remember having to set up DJava command lines so the TC would expose a port to Jconsole... I dont remember seeing XML config to explicitly start a Mbean, I remember seeing that EJB containers tend to automate all this for you but servlet containers tend to be a little more manual. Anyway I think armed with those tools, you'll be on your way. I rember seeing it work on TC 5.5 but I dont think much changes other than the location of common/lib Have fun hello, I am looking some sample MBean code for TC 6.0.. I was able to model some code after the source code (e.g. MemoryUserDatabaseMBean.java in the org.apache.catalina.users. package) . I was also able to create the mbeans-descriptor.xml One question that I have is that even though the code compiled and deployed TC, i am not able to see my custom MBean via JConsole . Are there additional things needed to get the MBean registered properly in TC? Thanks in advance. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk and Host matches server name
I've seen many references to this problem, but since the message is an umbrella to many possible problems, nothing of what I've read so far offers a solution for my particular symptoms. In the back I've got Tomcat 5.5.23 with default configuration: 1. default host is localhost 2. HTTP connector on 8080 3. AJP connector on 8009 After reading a message, I also added an alias to Host just to be sure. the application is deployed from a war into the default context with ROOT.xml descriptor On the front, I have Apache 2.2.4 with mod_jk 1.2.26 built from source (I needed a 64 bit version that would work with apache 2.2.4) Now, here are the symptoms: - Connecting to tomcat directly on the localhost interface: gets content - Connecting to tomcat directly on eth0:gets content - Connecting via mod_jk with worker.host=localhost: 400 No Host matches server name - Connecting via mod_jk with worker.host=10.10.1.12:400 No Host matches server name (The details of these tests are below) Any ideas what's going on here? Thanks Dmitry - Connecting directly to tomcat on the localhost interface: $ telnet localhost 8080 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. GET / HTTP/1.1 Host: jira1 HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=365B38ABA34CBC8A1B3B9B456704517B; Path=/ Location: http://jira1/secure/Dashboard.jspa - - Connecting to tomcat on the eth0 interface: $ telnet jira1 8080 Trying 10.10.1.12... Connected to europe.travelsecure.local (10.10.1.12). Escape character is '^]'. GET / HTTP/1.1 Host: jira1 HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=BE2BE7AE2BFDF59EE393D6D76D8DF278; Path=/ Location: http://jira1/secure/Dashboard.jspa Content-Type: text/html;charset=UTF-8 Content-Length: 0 Date: Wed, 09 Jan 2008 17:42:09 GMT - - Connecting via mod_jk through jira1 host interface with the worker connecting on eth0 worker.worker_normal.type=ajp13 # worker.worker_normal.host=europe# worker.worker_normal.port=8009 # [EMAIL PROTECTED] Jira]$ telnet jira1 80 Trying 10.10.1.12... Connected to europe.travelsecure.local (10.10.1.12). Escape character is '^]'. GET / HTTP/1.1 Host: jira1 HTTP/1.1 400 No Host matches server name jira1 Date: Wed, 09 Jan 2008 17:48:08 GMT Server: Apache/2.2.3 (CentOS) Connection: close Transfer-Encoding: chunked Content-Type: text/plain; charset=UTF-8 from mod_jk.log: [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] init_ws_service::mod_jk.c (888): Service protocol=HTTP/1.1 method=GET host=(null) addr=10.10.1.12 name=jira1 port=80 auth=(null) user=(null) laddr=10.10.1.12 raddr=10.10.1.12 uri=/ [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_get_endpoint::jk_ajp_common.c (2579): acquired connection pool slot=0 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (553): ajp marshaling done [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_service::jk_ajp_common.c (2050): processing worker_normal with 2 retries [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_send_request::jk_ajp_common.c (1352): (worker_normal) all endpoints are disconnected, detected by connect check (0), cping (0), send (0) [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] jk_open_socket::jk_connect.c (448): socket TCP_NODELAY set to On [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] jk_open_socket::jk_connect.c (548): trying to connect socket 23 to 10.10.1.12:8009 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] jk_open_socket::jk_connect.c (574): socket 23 connected to 10.10.1.12:8009 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_connect_to_endpoint::jk_ajp_common.c (878): Connected socket 23 to (10.10.1.12:8009) [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (934): sending to ajp13 pos=4 len=66 max=8192 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (934): 12 34 00 3E 02 02 00 08 48 54 54 50 2F 31 2E 31 - .4.HTTP/1.1 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (934): 001000 00 01 2F 00 00 0A 31 30 2E 31 30 2E 31 2E 31 - .../...10.10.1.1 [Wed Jan 09 09:48:12 2008] [14014:2934367456] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (934): 002032 00 FF FF 00 05 6A 69 72 61 31 00 00 50 00 00 -
web.xml configured correctly, but still getting '404...resource not found'
error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above, http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2 http://localhost:8080/cucoweb/classes/HelloServlet I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown tomcat and restarted it. And when i tried to access those 2 urls again, I got the above error. (Actually I had the same web.xml before except that it didnt have the /classes in front in the url-pattern. I was able to access it by the same url - without the /classes - and then the next day when started tomcat and tried to access it, it didnt work, same error.) In this example, cucoweb is the context root, correct ? Shouldn't the url-pattern be relative to the context root ? Thats how I have it now, I think. Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib:/usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib I havent tried this yet because doing this is kind of tricky in ubuntu. (You have etc/environment and bash.bashrc, for ex.) But if I try that and it works I will post about it. I suspect its something else, though, because it worked once, before restarting tomcat, thats why I'm posting here first. Any info, even educated guesses, would be greatly appreciated. Thanks in advance. -- View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14717184.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why use a Web Server over Tomcat?
In my CISSP training, we covered the possiblity of putting a web server in between two firewalls. The outer one cleans the course junk out of the data stream like denial of service attacks, web server compromise attackes, malformed packets, as well as closing down server services that should be available to the company, but not the public. The inner one is more fine grained possibly protecting company data assets from disclosure or blocking unapproved websites from being accessed by employees. Just trying to say there is a business case for two firewalls -- it has more to do with protecting company assets than protecting the web server. --David Bárbara Vieira wrote: Alan and Johnny, I agree with Alan. I'm using the same scheme to save passwords in database, and SSL too. But, Johnny's answer help me understand some things. Johnny, when you say: So in those organization Tomcat is probably behind the second internal firewall for staff to use as well. What do you mean? If you have a Tomcat inside a DMZ, usually we have one firewall, that separates internet from intranet, i.e., the firewall filters requests that comes from de outside. Isn't that? Thanks, Regards, Bárbara Vieira -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 9 de Janeiro de 2008 14:10 To: Tomcat Users List Subject: Re: Why use a Web Server over Tomcat? One reason for doing this, is again not whether IIS or APACHE is better although APACHE on linux in the hands of a guru is very good, its because Tomcat carries clear text passwords, so if a hacker did get at the machine, they would probably see the Active X LDAP master password, I don't understand this comment at all. 'Passwords' in tomcat can be managed by a whole host of authentication schemes. I use SSL to protect access to the password on the net and MD5 encoded passwords in a database for user authentication and access control. It depends entirely upon how you configure your system. Regards Alan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4784031b130881839419991! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting '404...resource not found'
From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: web.xml configured correctly, but still getting '404...resource not found' What's in the logs? Then I shutdown tomcat and restarted it. Are you using a real Tomcat, or some 3rd-party repackaged (i.e., broken) version? Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? Absolutely not. Never, never add webapp libraries to the classpath. I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib: /usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/: /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib Other than the current directory (.), none of that stuff should be on the CLASSPATH variable. In fact, it's best just to completely eliminate the CLASSPATH variable - it causes a lot more trouble than it was ever worth. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with data input
I hope I am able to explain this problem adequately. If I have gaps in my explanation let me know and I will attempt to clarify further. I know enough about Tomcat to be dangerous, as they say. I hope you guys might be able to help me so here goes. We have a MySQL database that we input case information into using a web based application written in Java and running in Apache Tomcat 5.1.5.15. On Monday one of our users was attempting to input some data into a specific section of the database but the data was not stored. This is, so far, only happening in this one specific area of data entry that inputs data into a specific table in the database. We receive well over 100 new court filings that occur every day. We have multiple users inputting data into the new cases and existing cases every day throughout the day. So most of the data input is operating normally. It is just input into this one area that I am seeing problems. It could be there are other areas with problems but we just haven't seen them yet. Whatever the case may be though, at present it is this one area where I am seeing the problem. I have been able to log into the database using MySQL Query Browser 1.1.6 and insert the data into the appropriate field for that record in the table. When I input that data I can then log into the web application, navigate to that case and see the entry showing up as I just entered it. However, if I try to alter that data from the web application nothing happens. I had attempted to send this to the thread earlier with attached copies of two logs for Monday and for Tuesday. I never was able to see my post on the thread so I am resending in the belief that my attachments may have been cause for the forum to block my post. If I need to post logs please let me know what is the best way to send my logs. Can someone assist me with finding out what may be causing this problem and give some idea of how to resolve it? Thanks, Steve
RE: problem with data input
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: problem with data input running in Apache Tomcat 5.1.5.15. No such level; what are you really running? Also, what OS and what JVM? However, if I try to alter that data from the web application nothing happens. Are the requests even making it to the database server? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml configured correctly, but still getting '404...resource not found'
Messing with the classpath will bring you nothing but pain and misery. I would strongly recommend you leave it alone. Also the servlet mappings are relative to the context so your good on that front as well. Are there any messages in your tomcat logs regarding the request? Are you sure the webapp is running after you restart tomcat? --David cuco2772 wrote: error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above, http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2 http://localhost:8080/cucoweb/classes/HelloServlet I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown tomcat and restarted it. And when i tried to access those 2 urls again, I got the above error. (Actually I had the same web.xml before except that it didnt have the /classes in front in the url-pattern. I was able to access it by the same url - without the /classes - and then the next day when started tomcat and tried to access it, it didnt work, same error.) In this example, cucoweb is the context root, correct ? Shouldn't the url-pattern be relative to the context root ? Thats how I have it now, I think. Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib:/usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib I havent tried this yet because doing this is kind of tricky in ubuntu. (You have etc/environment and bash.bashrc, for ex.) But if I try that and it works I will post about it. I suspect its something else, though, because it worked once, before restarting tomcat, thats why I'm posting here first. Any info, even educated guesses, would be greatly appreciated. Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How Do I do (Can I do) Apache like redirects in Tomcat
There is a project called URL Filter doing just that. http://tuckey.org/urlrewrite/ Nix., - Original Message From: Rob Tanner [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, January 8, 2008 7:51:45 AM Subject: How Do I do (Can I do) Apache like redirects in Tomcat Hi, I would like to setup an HTTPS connector in Tomcat (v 5.5.23) that listens on port 28080. That part's easy enough and there is already a certificate installed. Here's the part I'm having trouble with. Whenever a browser send a GET request to that port, I need to return a redirect to an entirely different server (different IP, etc) listening on port 28443. I cannot figure out anyway to do that. Any ideas? Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
RE: problem with data input
running in Apache Tomcat 5.1.5.15. No such level; what are you really running? Also, what OS and what JVM? I am not sure then what version of Tomcat. How can I find this information? When I startup the service I get this return: [EMAIL PROTECTED] bin]# sh startup.sh Using CATALINA_BASE: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_HOME: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_TMPDIR: /home/movedfromusr/apache-tomcat-5.5.15/temp Using JRE_HOME: /usr/java/jdk1.5.0_04 OS is RedHat AS 3 What is JVM? Like I said, I am not too knowledgeable about these things so forgive my ignorance. However, if I try to alter that data from the web application nothing happens. Are the requests even making it to the database server? How can I check to see if they are making it to the database server? All of our users are still inputting data into the database using the web application so I think that other information being entered is making it to the database server. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
debugging connectors
Hi, I can't find any definitive documentation on this. Does the Connector element in Tomcat 5.5. support the debug property (I've seen examples of this in older Tomcats)? If so, where will the output go? Thanks Dmitry - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 12:59 PM To: Tomcat Users List Subject: RE: problem with data input From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: problem with data input running in Apache Tomcat 5.1.5.15. No such level; what are you really running? Also, what OS and what JVM? However, if I try to alter that data from the web application nothing happens. Are the requests even making it to the database server? I have some logs from Monday and Tuesday that may be helpful but I am not sure how to get them on here for review. When I originally sent my request to the forum I attached them to my email but that email never showed up on the forum. So I am assuming that email was blocked. If these logs would be useful for someone to review please let me know how I can send them so you could look at them. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat5.5, balancer
I double checked just one entry in server-tunning.conf Gabe Wong wrote: Julio, Double check your httpd.conf to make sure there isn't multiple MaxClients entries that way you are certain the one being used us indeed the entry included in the snippet you had shared with us. Apache does not throw an error for Duplicate MaxClients entries. Julio Cesar Leiva wrote: Hi all When we introduce load balancing and a 2nd tomcat worker, the time to service client requests is not balanced. Some clients are serviced as above, but others may take 10, 20, 30 seconds or more. Eventually, clients timeout and sessions are lost. We ran our test over night with just 20 clients. All requests were serviced evenly and we experienced no timeouts. However, the attached jkstatus page shows some interesting results. The 'Busy' and 'Max' values for the two workers are vastly different. For worker1, these values just keep incrementing. Also, worker2 has serviced way more requests. The 'Busy' and 'Max Busy' numbers in the other table keep growing as well. Is this behaviour normal? or does this point to a problem somewhere in the configuration? As we add more clients, the time it takes to service requests gets more and more imbalanced. Some requests get serviced in 1 second, others can take 20 or 30 seconds. The more clients we add, the longer it takes for some requests to get serviced. We are using apache 2.26, mod_jk 1.2.26 and tomcat 6.0.14 , JRE 1.5_06-b05 Apache and worker1 are on the same box. worker2 is in a different box We are relly new on this(balancer), as you can see below we were using tomcat 5.5.20 , apache 2.2.0 and mod_jk 1.2.25 so we updated them all , but still same problems Thanks a lot for your help Rainer Jung wrote: Julio Cesar Leiva schrieb: Hi all We have this setup 1 web server apache 2.2.0 I hope it's not 2.2.0 but something more recent (e.g. 2.2.4 or 2.2.6) 2 tomcat servers tomcat 5.5.20 mod_jk 1.2.25 This is our workers.properties Remove the next line, it's useless. workers.java_home=/usr/lib64/jvm/java worker.list=cbnbalancer,jkstatus Maybe add connect_timeout and prepost_timeout to the next two, and if it makes sense for the app also reply_timeout. See http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=172.20.23.12 worker.worker1.port=8009 worker.worker1.lbfactor=1 #worker.worker1.connection_pool_timeout=600 #worker.worker1.socket_keepalive=1 #worker.worker1.socket_timeout=60 worker.worker1.socket_timeout=0 # Define prefered failover node for worker1 worker.worker1.redirect=worker2 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=172.20.21.211 worker.worker2.port=8009 worker.worker2.lbfactor=1 #worker.worker2.connection_pool_timeout=600 #worker.worker2.socket_keepalive=1 #worker.worker2.socket_timeout=60 worker.worker2.socket_timeout=0 # Define prefered failover node for worker2 worker.worker2.redirect=worker1 method T (Traffic) does only make sense, if you are bandwidth limited in the network and thus want to balance w.r.t bytes transferred. # Set properties for balancer which use worker1 and worker2 worker.cbnbalancer.type=lb worker.cbnbalancer.method=T worker.cbnbalancer.balance_workers=worker2,worker1 # Enable sticky-sessions (aka session affinity) worker.cbnbalancer.sticky_session=1 # Define a 'jkstatus' worker using status worker.jkstatus.type=status # Add the jkstatus mount point Maybe a little simpler, if you omit the trailing '*', thus mapping the exact URL /jkmanager/. JkMount /jkmanager/* jkstatus # Enable the JK manager access from localhost only !-- Location /jkmanager/ You don't need the next line, because you already defined this mount. JkMount jkstatus Order deny,allow Deny from all # Allow from 127.0.0.1 Allow from all /Location -- This is part of one server.xml connectionTimeout=60 would be a good fit to the 600 in your jk configuration. 2000 Threads is a lot, are you sure, that your OS can create that many Threads for a JVM (Memory issues possible)? If you only allow 700 parallel requests in Apache, you don't need more than 700 (+1?) threads in the AJP connector. Engine name=Catalina defaultHost=localhost jvmRoute=worker1 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is the second tomcat Engine name=Catalina defaultHost=localhost jvmRoute=worker2 Connector port=8009 minProcessors=5 maxThreads=2000 minSpareThreads=100 maxSpareThreads=150 maxProcessors=0 protocol=AJP/1.3 connectionTimeout=0/ This is part of the apache conf Which mpm, prefork? # number of server processes to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers StartServers 5 # minimum number of server
Re: looking for sample MBean code for tomcat 6
Hi Frank, you can add your Mbeans at following file === $catalina.base/conf/tomca5-mbeans.xml == bean mbean name=Bean:type=Bean code=test.MyBean attribute name=name value=Peter/ /mbean jmx-operation objectName=Bean:type=Bean operation=show/ mbean name=Bean:type=Bean2 code=test.MyBean/ jmx-operation objectName=Bean:type=Bean2 operation=setAll arg type=java.lang.String value=Willy/ arg type=java.lang.StringGo to water/arg /jmx-operation jmx-operation objectName=Bean:type=Bean2 operation=show/ /bean === The Engine element at server.xml can load those MBean instance declaration. Server ... ... Engine name=Catalina mbeansFile=${catalina.base}/conf/tomcat5-mbeans.xml defaultHost=localhost jvmRoute=node01 ... If you implement a init(),start()/stop(),destroy() method your MBeans also notified from Engine Lifecycle :-) Install your MBean Code at common or server classLoader. === common/classes/test/MyBean.java package test; public class MyBean implements MyBeanMBean { private String name ; public String getName() { return name ; } public void setName(String name) { this.name = name ; System.out.println(name) ;} private String street ; public String getStreet() { return street ; } public void setStreet(String street) { this.street = street ; System.out.println(street) ; } public void show() { System.out.println(name + -- + street) ; } public void setAll(String name , String street) { this.name = name ; this.street = street ; } } === === common/classes/test/MyBeanMBean.java package test; public interface MyBeanMBean { public String getName() ; public void setName(String name) ; public String getStreet() ; public void setStreet(String street) ; public void show() ; public void setAll(String name , String street); } I test the example with tomcat 5.5.25. I am hasn't tested with tomcat 6, but the insourced modeler code seems also working! Regards Peter Look at my old fixed issue : http://issues.apache.org/jira/browse/ MODELER-17 But I am not sure that that patch at 2.0.1 is complete ( jmx- attribute element not exists) Am 09.01.2008 um 17:25 schrieb Frank Z: Hi Peter, Thanks for sending the link. I guess what my real question was: how would I get TC to 'declaratively' instantiate my MBeans ? From the example, most of them has a main() method to instantiate and register the MBeans to the platform MBean Server. What would you recommend for TC , a servlet that loads on startup and within the init method it would create and register the MBeans? I am porting my MBeans from JBoss (embedding TC) and JBoss provides a declarative method do so without the needs of a servlet. It is done by creating a service archive (e.g. myservice.sar - containing a jboss-service.xml [similar to mbeans-descriptor.xml] that declares the MBeans). The JBoss container would then instantiate the MBeans via the MBean's start() method. public class Main { public static void main(String[] args) throws Exception { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName name = new ObjectName (com.example.mbeans:type=Hello); Hello mbean = new Hello(); mbs.registerMBean(mbean, name); System.out.println(Waiting forever...); Thread.sleep(Long.MAX_VALUE); } } Thanks Frank. - Original Message From: Peter Rossbach [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, January 9, 2008 1:20:10 AM Subject: Re: looking for sample MBean code for tomcat 6 Please read this: http://java.sun.com/developer/technicalArticles/J2SE/jmx.html http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/ tutorialTOC.html Peter Am 09.01.2008 um 08:03 schrieb Frank Z: hello, I am looking some sample MBean code for TC 6.0.. I was able to model some code after the source code (e.g. MemoryUserDatabaseMBean.java in the org.apache.catalina.users. package) . I was also able to create the mbeans-descriptor.xml One question that I have is that even though the code compiled and deployed TC, i am not able to see my custom MBean via JConsole . Are there additional things needed to get the MBean registered properly in TC? Thanks in advance. _ _ __ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/ newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: debugging connectors
no debug property anymore, you can add org.apache.coyote.http11.level=FINE in your logging.properties file Filip Dmitry Beransky wrote: Hi, I can't find any definitive documentation on this. Does the Connector element in Tomcat 5.5. support the debug property (I've seen examples of this in older Tomcats)? If so, where will the output go? Thanks Dmitry - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml configured correctly, but still getting '404...resource not found'
The guide I've been using for trying to set this up is the coreservlets book by Marty Hall. He says set the classpath but the info there is for tomcat 4. Are you saying I could just get rid of the classpath environment variable entirely and it wouldn't make any difference ? (I did set it to where the jvm is) Here is the output of 2 of my tomcat logs : [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.out Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.2008-01-09.log Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms So its saying Context startup failed, but I have no idea how to determine what the 'previous errors' are. FWIW, I am running tomcat through apache, not as a stand alone server. David Smith-2 wrote: Messing with the classpath will bring you nothing but pain and misery. I would strongly recommend you leave it alone. Also the servlet mappings are relative to the context so your good on that front as well. Are there any messages in your tomcat logs regarding the request? Are you sure the webapp is running after you restart tomcat? --David cuco2772 wrote: error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above, http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2 http://localhost:8080/cucoweb/classes/HelloServlet I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown tomcat and restarted it. And when i tried to access those 2 urls again, I got the above error. (Actually I had the same web.xml before except that it didnt have the /classes in front in the url-pattern. I was able to access it by the same url - without the /classes - and then the next day when started tomcat and tried to access it, it didnt work, same error.) In this example, cucoweb is the context root, correct ? Shouldn't the url-pattern be relative to the context root ? Thats how I have it now, I think. Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib:/usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib I havent tried this yet because doing this is kind of tricky in ubuntu. (You have etc/environment and bash.bashrc, for ex.) But if I try that and it works I will post about it. I suspect its something else, though, because it worked once, before restarting tomcat, thats why I'm posting here first. Any info, even educated guesses, would be greatly appreciated. Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14721405.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.0.28 and SSL setup
If you are still looking for a solution: There is a mismatch in your informations: you wrote, the keystore file would be located in your home directory but in the connector properties the keystore is referenced to be located at /user/machine/.keystore: are you aware of this difference? Johann - Original Message - From: Tami Corn [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Saturday, January 05, 2008 3:10 PM Subject: tomcat 5.0.28 and SSL setup My problem: Port 8443 won't open. But I can see port 8080. Running Tomcat 5.0.28 on Mac OS 10.4.11 (no firewall yet). I'm not using a self-assigned cert. I created a CSR request, got my certs and have imported my certs in the following order using Terminal. Everything I have researched says they have to be installed in a particular order or the will not work.: root - AddTrustExternalCARoot.crt inter - UTNAddTrustServer_CA.crt chain - NetworkSolutions_CA.crt tomcat - mydomain.com.crt (My keystore is located my user's home directory along with a folder that has the certs in it.) If I printcerts in Terminal, they look good to me compared to documentation and examples online. (howeverI'm a newbie.) I have uncommented the connector port in the server.xml config. Connector port=8443 maxThreads=100 minSpareThreads=5 maxSpareThreads=25 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS keyAlias=tomcat keystoreFile=/Users/machine/.keystore keystorePass=... / Tomcat Log shows: 2008-01-05 07:25:56 StandardContext[/servlets-examples] ContextListener: attributeReplaced ('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@8e7b84') 2008-01-05 07:25:56 StandardContext[/servlets-examples] ContextListener: attributeReplaced ('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@4f53eb') 2008-01-05 07:25:56 StandardContext[/servlets-examples] ContextListener: attributeReplaced ('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@e6b82') 2008-01-05 07:25:56 StandardContext[/servlets-examples] SessionListener: contextDestroyed() 2008-01-05 07:25:56 StandardContext[/servlets-examples] ContextListener: contextDestroyed() 2008-01-05 07:25:56 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@8e45a8') 2008-01-05 07:25:56 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@7f3202') 2008-01-05 07:25:56 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@ac5c8b') 2008-01-05 07:25:56 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2008-01-05 07:25:56 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2008-01-05 07:29:44 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester (RulesParser.java:65) at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43) at org.apache.webapp.balancer.BalancerFilter.init (BalancerFilter.java:79) at org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:225) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init (ApplicationFilterConfig.java:79) at org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3698) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 595) at org.apache.catalina.core.StandardHostDeployer.install (StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories (HostConfig.java:701) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 478) at org.apache.catalina.core.StandardService.start (StandardService.java:480) at
Re: web.xml configured correctly, but still getting '404...resource not found'
The tomcat startup script set's it's own classpath, ignoring the environment set classpath. This has been the case since tomcat 4. Tomcat 3 used to be a real headache because of the need to set a classpath. If I remember correctly, tomcat 3.3 was the first version to start offering a classloader architecture instead of making people work the classpath. Us the -n option of tail to get more log info like tail -n 100 catalina.out. See if you can get more of the log file since there appears to be an error message in there further up. --David cuco2772 wrote: The guide I've been using for trying to set this up is the coreservlets book by Marty Hall. He says set the classpath but the info there is for tomcat 4. Are you saying I could just get rid of the classpath environment variable entirely and it wouldn't make any difference ? (I did set it to where the jvm is) Here is the output of 2 of my tomcat logs : [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.out Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.2008-01-09.log Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms So its saying Context startup failed, but I have no idea how to determine what the 'previous errors' are. FWIW, I am running tomcat through apache, not as a stand alone server. David Smith-2 wrote: Messing with the classpath will bring you nothing but pain and misery. I would strongly recommend you leave it alone. Also the servlet mappings are relative to the context so your good on that front as well. Are there any messages in your tomcat logs regarding the request? Are you sure the webapp is running after you restart tomcat? --David cuco2772 wrote: error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above, http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2 http://localhost:8080/cucoweb/classes/HelloServlet I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown tomcat and restarted it. And when i tried to access those 2 urls again, I got the above error. (Actually I had the same web.xml before except that it didnt have the /classes in front in the url-pattern. I was able to access it by the same url - without the /classes - and then the next day when started tomcat and tried to access it, it didnt work, same error.) In this example, cucoweb is the context root, correct ? Shouldn't the url-pattern be relative to the context root ? Thats how I have it now, I think. Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib:/usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib I havent tried this yet because doing this is kind of tricky in ubuntu. (You have etc/environment and bash.bashrc, for ex.) But if I try that and it works I will post about it. I suspect its something else, though, because it worked once, before restarting tomcat, thats why I'm posting here first. Any info, even educated guesses, would be greatly appreciated. Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting '404...resourcenot found'
From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: Re: web.xml configured correctly, but still getting '404...resourcenot found' The guide I've been using for trying to set this up is the coreservlets book by Marty Hall. He says set the classpath but the info there is for tomcat 4. Even then, that was a really bad suggestion. Are you saying I could just get rid of the classpath environment variable entirely and it wouldn't make any difference ? It might make things better, certainly no worse. (I did set it to where the jvm is) That should never be done, under any circumstances. The JVM knows where its files are, you don't have to tell it. So its saying Context startup failed, but I have no idea how to determine what the 'previous errors' are. Anything in the other log files? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input validateJarFile(/usr/local/tomcat/webapps/occa/WEB-INF/lib/ servlet-api-2.3.jar) - jar not loaded. No servlet-api jar should be part of a webapp. The servlet API classes are provided by Tomcat (and every other app server on the market). Take it out of WEB-INF/lib; also remove any other jars from WEB-INF/lib that are versions of ones Tomcat provides. Jan 7, 2008 7:48:09 AM org.keel.clients.KeelClientUtil getLogger WARNING: Unable to locate client.properties file - using default settings Who provides org.keel.clients? You may need to be talking to them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting '404...resource not found'
I did touch web.xml and it worked. Weird. Of course if I restart tomcat it wont work again. Its the latest tomcat 6.0.14. The tomcat error logs are posted in the above reply. Caldarale, Charles R wrote: From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: web.xml configured correctly, but still getting '404...resource not found' What's in the logs? Then I shutdown tomcat and restarted it. Are you using a real Tomcat, or some 3rd-party repackaged (i.e., broken) version? Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ? Absolutely not. Never, never add webapp libraries to the classpath. I'm in ubuntu, when I do echo $CLASSPATH, I get : .:/usr/lib/jvm/java-6-sun-1.6.0.00/lib: /usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/: /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib Other than the current directory (.), none of that stuff should be on the CLASSPATH variable. In fact, it's best just to completely eliminate the CLASSPATH variable - it causes a lot more trouble than it was ever worth. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14722246.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 3:33 PM To: Tomcat Users List Subject: RE: problem with data input From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input validateJarFile(/usr/local/tomcat/webapps/occa/WEB-INF/lib/ servlet-api-2.3.jar) - jar not loaded. No servlet-api jar should be part of a webapp. The servlet API classes are provided by Tomcat (and every other app server on the market). Take it out of WEB-INF/lib; also remove any other jars from WEB-INF/lib that are versions of ones Tomcat provides. Jan 7, 2008 7:48:09 AM org.keel.clients.KeelClientUtil getLogger WARNING: Unable to locate client.properties file - using default settings Who provides org.keel.clients? You may need to be talking to them. All of the Tomcat, Java, org.keel., etc. was developed in house by a guy who is no longer here. He created everything that is currently in place. I do not have access to him in order to address these issues so that leaves me trying to explore this without really knowing what the heck I am doing. I know enough about this stuff to tell you things that are probably not necessarily so (i.e. the version of Tomcat we are running). So basically you are talking to a novice in terms of all of this. Prior to Monday things were working without any glitches. I do not know what might have occurred Monday to change things but something happened. I do not have enough knowledge to know what I am seeing let alone where to see it. Ughhh. So If there is a jar not loaded where should it be? How do I see it and/or go fix what may be broken in order to have it load properly? Why would it have not loaded on Monday when it appears it was properly functioning prior to Monday? Perhaps I am delving into things I can only make worse with my inexperience. I really do not know where to start. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
Ok, I am not having much luck resolving my problem. I am including some information from the logs I have below. Here is some of the content for a log from 01-07-2008: Jan 7, 2008 7:46:51 AM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 Jan 7, 2008 7:46:52 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Jan 7, 2008 7:46:55 AM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Jan 7, 2008 7:46:55 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime Jan 7, 2008 7:47:24 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.5.0_04/jre/lib/i386/server:/usr/java/jdk1.5.0_04/jre/lib/ i386:/usr/java/jdk1.5.0_04/jre/../lib/i386:/opt/CA/SharedComponents/lib Jan 7, 2008 7:47:25 AM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 7, 2008 7:47:25 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2759 ms Jan 7, 2008 7:47:25 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 7, 2008 7:47:25 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.15 Jan 7, 2008 7:47:25 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Jan 7, 2008 7:47:27 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive occa.war Jan 7, 2008 7:47:28 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/usr/local/tomcat/webapps/occa/WEB-INF/lib/servlet-api-2 .3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jan 7, 2008 7:47:39 AM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 7, 2008 7:47:39 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 7, 2008 7:47:39 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/56 config=null Jan 7, 2008 7:47:39 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Jan 7, 2008 7:47:39 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 14136 ms Jan 7, 2008 7:48:09 AM org.keel.clients.KeelClientUtil getLogger WARNING: Unable to locate client.properties file - using default settings Jan 7, 2008 7:48:09 AM org.keel.clients.DefaultClientConnector logInfo INFO: Struts Client Connector starting. Jan 7, 2008 7:48:09 AM org.keel.clients.DefaultClientConnector logInfo INFO: Configuring Client 1 Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. Jan 7, 2008 7:48:18 AM org.keel.util.i18n.DynamicMessageSupport getMessages WARNING: [DynamicMessageSupport] Model name with prefixe 'oscn', and a bundle was found under that key. This last part goes on all day with this showing up around 12:17 pm: Jan 7, 2008 12:17:47 PM org.keel.clients.DefaultClientConnector logError SEVERE: Stack for error from oscn.seq.promptUpdateCaseMaster, Key: 'InvalidStatenoatissuedate Message: Submitted date without At Issue date. org.keel.services.model.ModelException: Application Error at org.keel.services.model.defaultmodel.DefaultModelResponse.addError(Defau ltModelResponse.java:322) at org.keel.services.model.defaultmodel.DefaultModelResponse.addErrors(Defa ultModelResponse.java:403) at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source) at
Re: DataSource question
I am using lambdaprobe to monitor the datasource and it shows that many maxActive connections for each webapp deployed. So the total possible max connections to the database would become maxActive times number of webapps. But I would like to confirm that as I have had occasional database connectivity errors and I was suspecting if what lambdaprobe is showing isn't correct and the total possible max connections to database for all webapps combined is actually what is specified in maxActive? Anyone familiar with what I am talking about? Thanks. --- Victor Saez [EMAIL PROTECTED] wrote: I think that's the MaxActive connections on the database. Depending on how you configure the datasource it will be available for one or all webapps. The tomcat docs have a good explanation, here you got the link for tomcat 5.5. http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html Please correct me if I'm wrong, or if I missunderstood your question. Cheers! 2008/1/8, Eqbal [EMAIL PROTECTED]: I have defined my jndi DataSource for connecting to the database under the conf/context.xml file. I would like to understand what it means in terms of availability of the datasource to each of the web apps and the thing I am confused about is what is the maximum number of connections available? Is it the maxActive times number of web apps or just maxActive? Thanks. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Víctor Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml configured correctly, but still getting '404...resource not found'
Check this out, I did 'touch web.xml' then hit reload in the browser window and it worked. If I restart tomcat though, it probably wont work as before. Here's what my catalina.out looked like after that: [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.outJan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms Jan 9, 2008 2:30:03 PM org.apache.catalina.startup.HostConfig checkResources INFO: Reloading context [/cucoweb] Jan 9, 2008 2:30:03 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cucoweb] has not been started Not sure what the last line means. Incidentally, when compiling the servlet, I had to use the classpath option, ie javac -classpath to tell javac where the servlet-api.jar is in tomcat. This seems weird to me that the servlet interface is not in the Java EE SDK, or if it is, it doesnt know where to find it. David Smith-2 wrote: The tomcat startup script set's it's own classpath, ignoring the environment set classpath. This has been the case since tomcat 4. Tomcat 3 used to be a real headache because of the need to set a classpath. If I remember correctly, tomcat 3.3 was the first version to start offering a classloader architecture instead of making people work the classpath. Us the -n option of tail to get more log info like tail -n 100 catalina.out. See if you can get more of the log file since there appears to be an error message in there further up. --David cuco2772 wrote: The guide I've been using for trying to set this up is the coreservlets book by Marty Hall. He says set the classpath but the info there is for tomcat 4. Are you saying I could just get rid of the classpath environment variable entirely and it wouldn't make any difference ? (I did set it to where the jvm is) Here is the output of 2 of my tomcat logs : [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.out Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.2008-01-09.log Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms So its saying Context startup failed, but I have no idea how to determine what the 'previous errors' are. FWIW, I am running tomcat through apache, not as a stand alone server. David Smith-2 wrote: Messing with the classpath will bring you nothing but pain and misery. I would strongly recommend you leave it alone. Also the servlet mappings are relative to the context so your good on that front as well. Are there any messages in your tomcat logs regarding the request? Are you sure the webapp is running after you restart tomcat? --David cuco2772 wrote: error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above, http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2 http://localhost:8080/cucoweb/classes/HelloServlet I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown tomcat and restarted it. And when i tried to access those 2 urls again, I got the above error. (Actually I had the same web.xml before except that it didnt have the /classes in front in the
RE: problem with data input
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 3:37 PM To: Tomcat Users List Subject: RE: problem with data input From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input running in Apache Tomcat 5.1.5.15. No such level; what are you really running? Also, what OS and what JVM? I am not sure then what version of Tomcat. How can I find this information? You just did, in your message below. Note that 5.5.15 != 5.1.5.15. Using CATALINA_BASE: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_HOME: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_TMPDIR: /home/movedfromusr/apache-tomcat-5.5.15/temp Using JRE_HOME: /usr/java/jdk1.5.0_04 What is JVM? Java Virtual Machine. You have level 1.5.0_04 installed. How can I check to see if they are making it to the database server? Usually by turning on traces on the db server or using something like Wireshark to watch the network traffic between your Tomcat and db server boxes. Ok, the MySQL database resides on the same server as Java and Tomcat. I ran netstat -an about two hours ago and saw this: [EMAIL PROTECTED] bin]# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp0 0 0.0.0.0:80000.0.0.0:* LISTEN tcp0 0 0.0.0.0:32768 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:32769 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:60510.0.0.0:* LISTEN tcp0 0 127.0.0.1:8005 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:80090.0.0.0:* LISTEN tcp0 0 0.0.0.0:32777 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:33060.0.0.0:* LISTEN tcp0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN tcp0 0 0.0.0.0:60000.0.0.0:* LISTEN tcp0 0 0.0.0.0:1 0.0.0.0:* LISTEN tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:250.0.0.0:* LISTEN tcp0 0 0.0.0.0:13110.0.0.0:* LISTEN tcp0 0 172.16.255.100:57557172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:58997172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59004172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59025172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59026172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59030172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59036172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59041172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59046172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59055172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59060172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59064172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59067172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59069172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59071172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59072172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59074172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59077172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59078172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59081172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59082172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59083172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59084172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59085172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59087172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59088172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59089172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59091172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59092172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59093172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59094172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59099172.16.255.100:3306 TIME_WAIT tcp0 0 172.16.255.100:59100
RE: problem with data input
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input running in Apache Tomcat 5.1.5.15. No such level; what are you really running? Also, what OS and what JVM? I am not sure then what version of Tomcat. How can I find this information? You just did, in your message below. Note that 5.5.15 != 5.1.5.15. Using CATALINA_BASE: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_HOME: /home/movedfromusr/apache-tomcat-5.5.15 Using CATALINA_TMPDIR: /home/movedfromusr/apache-tomcat-5.5.15/temp Using JRE_HOME: /usr/java/jdk1.5.0_04 What is JVM? Java Virtual Machine. You have level 1.5.0_04 installed. How can I check to see if they are making it to the database server? Usually by turning on traces on the db server or using something like Wireshark to watch the network traffic between your Tomcat and db server boxes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input So If there is a jar not loaded where should it be? No one said there was a jar not being loaded - just that you have at least one jar in WEB-INF/lib that should be removed. Tomcat usually figures out that it should ignore such duplications, but in the interests of getting things as clean as possible so the real problem can be uncovered, get rid of it. If you find any others in WEB-INF/lib that appear to be duplicates of ones in Tomcat's common/lib or server/lib directories, the extra ones in WEB-INF/lib should be discarded as well (ask first if you're not comfortable doing so on your own). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Startup Hitting Webpage
Ok, I'm sure I read this somewhere but can't find it. I have a few apps that need to have threads started when Tomcat starts. Isn't there a way to tell Tomcat to hit the addresses of these apps to start them up when Tomcat starts up? I've searched everywhere and can't find anything. Not finding anything has made me believe that Tomcat can't do this and it was wishful thinking. Thanks. -- Troy Davidson Senior Programmer Maverik, Inc. 880 W. Center St. NSL, Utah 84054 Thank you for allowing us to service your technical needs, Your Technical Services Team - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preferred load-balanced worker
Rainer Jung wrote: Hi, Nahor wrote: Hi, Is there a way to specify at runtime what worker the load-balancer should use first? For some request, we can't use cookies so we pass the session id via the URL or via the query string. We then force the worker using RewriteRule and the JK_WORKER_NAME env var. But then the request doesn't pass through the load-balancer anymore. So even if we stop that worker in the load-balancer, it will still receive the request instead of being redirected to another worker. So is there a JK_LB_PREFERRED_WORKER kind of variable or equivalent that the load-balancer would use instead of the cookie? Not directly, you could make use of the cookie and url encoding routing facilities of an lb though. - Make sure the JSESSIONID gets deleted before and the new request doesn't contain a wrong ;jsessionid URL encoding - Either use mod_headers to set a fake JSESSIONID Cookie header to the request I can't set a fake cookie because we want to be able to set the cookie in the response if it was missing in the request (for instance, when switching from HTTPS (and secure cookies) to HTTP). - Or use mod_rewrite and append a fake ;jsessionid=... URL encoding at the end of the URL (but before the query string). Thanks, I didn't think about rewriting the request. Let us know if this works :) It does! Thanks! :) Nahor - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Embedded Tomcat 5.5.17 error
Hi All, I am trying to develop a web application using EMBEDDED TOMCAT (5.5.17 version). I am using standard function registWAR(contextPath, warPATH). Inside this function, right after adding CONTEXT to HOST, I am getting this exception. Any help with this EXCEPTION and EMBEDDED TOMCAT (5.5.17) would be of great help. Thanks Exception in thread main java.lang.NoSuchMethodError: org.apache.naming.NamingContextBindingsEnumeration.init(Ljava/util/Iterator;Ljavax/naming/Context;)V at org.apache.naming.resources.FileDirContext.listBindings(FileDirContext.java:337) at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:515) at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:142) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4035) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at test.embed.WebAppServer.registerWAR(WebAppServer.java:203) at test.embed.WebAppServer.main(WebAppServer.java:252) -- View this message in context: http://www.nabble.com/Embedded-Tomcat-5.5.17-error-tp14723535p14723535.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml configured correctly, but still getting '404...resource not found'
Fixed. There was a parse error at context.xml, line 20, column 2. The offending line: Context path= docBase=webapps/ROOT debug=0 reloadable=true crossContext=true /Context I read somewhere that you were supposed to do this. Evidently bad info or old info. Thanks for all the replies. cuco2772 wrote: Check this out, I did 'touch web.xml' then hit reload in the browser window and it worked. If I restart tomcat though, it probably wont work as before. Here's what my catalina.out looked like after that: [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.outJan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms Jan 9, 2008 2:30:03 PM org.apache.catalina.startup.HostConfig checkResources INFO: Reloading context [/cucoweb] Jan 9, 2008 2:30:03 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cucoweb] has not been started Not sure what the last line means. Incidentally, when compiling the servlet, I had to use the classpath option, ie javac -classpath to tell javac where the servlet-api.jar is in tomcat. This seems weird to me that the servlet interface is not in the Java EE SDK, or if it is, it doesnt know where to find it. David Smith-2 wrote: The tomcat startup script set's it's own classpath, ignoring the environment set classpath. This has been the case since tomcat 4. Tomcat 3 used to be a real headache because of the need to set a classpath. If I remember correctly, tomcat 3.3 was the first version to start offering a classloader architecture instead of making people work the classpath. Us the -n option of tail to get more log info like tail -n 100 catalina.out. See if you can get more of the log file since there appears to be an error message in there further up. --David cuco2772 wrote: The guide I've been using for trying to set this up is the coreservlets book by Marty Hall. He says set the classpath but the info there is for tomcat 4. Are you saying I could just get rid of the classpath environment variable entirely and it wouldn't make any difference ? (I did set it to where the jvm is) Here is the output of 2 of my tomcat logs : [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.out Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.2008-01-09.log Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/36 config=null Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1455 ms So its saying Context startup failed, but I have no idea how to determine what the 'previous errors' are. FWIW, I am running tomcat through apache, not as a stand alone server. David Smith-2 wrote: Messing with the classpath will bring you nothing but pain and misery. I would strongly recommend you leave it alone. Also the servlet mappings are relative to the context so your good on that front as well. Are there any messages in your tomcat logs regarding the request? Are you sure the webapp is running after you restart tomcat? --David cuco2772 wrote: error from tomcat. Here is my web.xml: servlet servlet-nameHelloServlet/servlet-name servlet-classHelloServlet/servlet-class /servlet servlet servlet-nameHelloServlet2/servlet-name servlet-classcoreservlets.HelloServlet2/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/classes/HelloServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameHelloServlet2/servlet-name url-pattern/classes/coreservlets.HelloServlet2/url-pattern /servlet-mapping /web-app when I went to the following urls after I had edited web.xml to the above,
RE: problem with data input
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 4:21 PM To: Tomcat Users List Subject: RE: problem with data input From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input So If there is a jar not loaded where should it be? No one said there was a jar not being loaded - just that you have at least one jar in WEB-INF/lib that should be removed. Tomcat usually figures out that it should ignore such duplications, but in the interests of getting things as clean as possible so the real problem can be uncovered, get rid of it. Ok, I understand now. I have removed servlet-api-2.3.jar from /usr/local/tomcat/webapps/occa/WEB-INF/lib/. If you find any others in WEB-INF/lib that appear to be duplicates of ones in Tomcat's common/lib or server/lib directories, the extra ones in WEB-INF/lib should be discarded as well (ask first if you're not comfortable doing so on your own). There are a tub load of jar files in that directory. So I can look in /usr/local/tomcat/common/lib and any duplicates of those in /usr/local/tomcat/webapps/occa/WEB-INF/lib I will remove. However, I do not want to remove anything without knowing which ones first so I will ask: Am I thinking about this correctly? I appreciate your time and efforts assisting me. I am at the end of my shift so I will not be able to reply until tomorrow to any other posts on this but would appreciate the opportunity to continue with this tomorrow. I will look for any new posts first thing. Thanks, Steve - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input So I can look in /usr/local/tomcat/common/lib and any duplicates of those in /usr/local/tomcat/webapps/occa/WEB-INF/lib I will remove. Am I thinking about this correctly? Yes. Just remember this is getting rid of the noise so we can better find the cause of the real problem, since I doubt this is it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting '404...resourcenot found'
From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: Re: web.xml configured correctly, but still getting '404...resourcenot found' There was a parse error at context.xml, line 20, column 2. Which context.xml? If it's in the webapp's META-INF directory or conf/Catalina/[hostname]/[appname], it must not include the path or docBase attributes. Is that what you removed? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Startup Hitting Webpage
From: Troy Davidson [mailto:[EMAIL PROTECTED] Subject: Tomcat Startup Hitting Webpage I have a few apps that need to have threads started when Tomcat starts. Read the servlet spec, especially the section on lifecycle listeners. Make sure you terminate the threads when the webapp is shutting down. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Startup Hitting Webpage
Charles, Thanks for the info. I knew it was out there somewhere. Troy Davidson Senior Programmer Maverik, Inc. 880 W. Center St. NSL, Utah 84054 Thank you for allowing us to service your technical needs, Your Technical Services Team Caldarale, Charles R wrote: From: Troy Davidson [mailto:[EMAIL PROTECTED] Subject: Tomcat Startup Hitting Webpage I have a few apps that need to have threads started when Tomcat starts. Read the servlet spec, especially the section on lifecycle listeners. Make sure you terminate the threads when the webapp is shutting down. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting '404...resourcenot found'
This context.xml was the one in conf. All I did was copy the original context.xml back. I have 3 context.xmls : /usr/local/tomcat/apache-tomcat-6.0.14/webapps/host-manager/META-INF/context.xml /usr/local/tomcat/apache-tomcat-6.0.14/webapps/manager/META-INF/context.xml /usr/local/tomcat/apache-tomcat-6.0.14/conf/context.xml Just for my own info, what are these for and why do we need 3 ? I don't need an in depth answer, I'd just like to get a general idea of what context.xml does. I did read the documentation on it a while back, but didn't come away with a good understanding of it. Thanks for your help. Caldarale, Charles R wrote: From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: Re: web.xml configured correctly, but still getting '404...resourcenot found' There was a parse error at context.xml, line 20, column 2. Which context.xml? If it's in the webapp's META-INF directory or conf/Catalina/[hostname]/[appname], it must not include the path or docBase attributes. Is that what you removed? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14725202.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: web.xml configured correctly, but still getting'404...resourcenot found'
From: cuco2772 [mailto:[EMAIL PROTECTED] Subject: RE: web.xml configured correctly, but still getting'404...resourcenot found' This context.xml was the one in conf. That explains why you had problems. The one in conf contains attributes to be shared by *all* webapps; under no circumstances should it ever contain any app-specific settings. The other context.xml files define Tomcat-specific attributes for each associated webapp that are needed for proper treatment of the webapp but are not described in the servlet spec. Each container handles this a bit differently. Once upon a time, Context elements had to be in server.xml, which required restarting Tomcat if anything needed changing. For the past few years, Tomcat has made it possible to place Context elements in webapp-specific locations, allowing changes with only a restart of the particular webapp, not the whole container. Consequently, the path and docBase attributes are no longer appropriate in most instances. The Context doc is here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with data input
-Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 5:02 PM To: Tomcat Users List Subject: RE: problem with data input From: Steve Ingraham [mailto:[EMAIL PROTECTED] Subject: RE: problem with data input So I can look in /usr/local/tomcat/common/lib and any duplicates of those in /usr/local/tomcat/webapps/occa/WEB-INF/lib I will remove. Am I thinking about this correctly? Yes. Just remember this is getting rid of the noise so we can better find the cause of the real problem, since I doubt this is it. Thought I would log on from home and check the mail list. I will look at this first thing when I get in. Once I clear those up what should be the next thing to do? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getting WARNING: Error sending end packet in my catalina.out file
Hello, Just built a new box. it is Centos 5 Apache/2.2.3 tomcat-5.5.15 mod_jk-1.2.23-apache-2.2.x-linux-x86_64.so i am getting tons of these in my log file: I would appreciate any help in debugging this thanks Jan 10, 2008 6:19:50 AM org.apache.jk.core.MsgContext action WARNING: Error sending end packet 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:518) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112) at org.apache.jk.core.MsgContext.action(MsgContext.java:293) at org.apache.coyote.Response.action(Response.java:182) at org.apache.coyote.Response.finish(Response.java:304) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Jan 10, 2008 6:19:50 AM org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
created new box, can not see Cluster
hello, Just build a new box on Centos 5, i have two other boxes on FC4 they are all running jdk1.5.0_11 tomcat-5.5.15 I can not get the new server to join the cluster. this is from the logfile: Jan 10, 2008 7:39:46 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Jan 10, 2008 7:39:46 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter start INFO: Start ClusterSender at cluster Catalina:type=Cluster,host=localhost with name Catalina:type=ClusterSender,host=localhost Jan 10, 2008 7:39:46 AM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership Jan 10, 2008 7:39:48 AM org.apache.catalina.cluster.mcast.McastService registerMBean INFO: membership mbean registered (Catalina:type=ClusterMembership,host=localhost) Jan 10, 2008 7:39:48 AM org.apache.catalina.cluster.deploy.FarmWarDeployer start INFO: Cluster FarmWarDeployer started. Jan 10, 2008 7:39:49 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Register manager to cluster element Host with name localhost Jan 10, 2008 7:39:49 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager at Jan 10, 2008 7:39:49 AM org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions INFO: Manager []: skipping state transfer. No members active in cluster group. All three boxes have the same cluster config in the server.xml Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true notifyListenersOnReplication=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.9 mcastPort=45564 mcastFrequency=500mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=35/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled ackTimeout=15000/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;.*\.pdf;\*.wav;\*.mp3;/ Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ watchEnabled=false/ ClusterListener className=org.apache.catalina.cluster.session.ClusterSessionListener/ /Cluster Thanks for any help - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]