Re: JK Status URI Mappings empty
On 25.05.2010 23:16, Bob Jewell wrote: mod_jk 1.2.28, apache 2.2.3 (-43.el5) When viewing status in the JK Status Manager, our list of URI Mappings displays all the mappings accurately, but the statistical/informational values are all empty. Server URI Match Type Source Reply Timeout Fail on Status Active DisabledStopped Use Server Errors webserver [*:81]/urimap/* Wildcharuriworkermap-1 - - - - 0 (or from text view:) Map: id=1 server=webserver [*:81] uri=/urimap/* type=Wildchar source=uriworkermap reply_timeout=-1 fail_on_status= active= disabled= stopped= use_server_errors=0 My only success in searching for this behavior was finding public examples of other peoples' JK Status with the same non-values. Those are not statistical values, but instead configuration items, which by default are actually not set. They can be set by so-called rule extensions. Which of those exist and how you can use them is explained in http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html#Rule%20extensions Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
On 26/05/2010 04:08, Leon Kolchinsky wrote: Hello I've installed Tomcat 6.0.26 and running Confluence software on it. I think that maximum 2 concurrent users using this application in at this stage (testing now). Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): # # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? What was the last task that it was doing before requesting 2Gb more memory? What's in catalina.out, the matching host access log and any application logs immediately before the OOM? p # Internal Error (allocation.cpp:215), pid=5460, tid=1085901120 # Error: Chunk::new # # JRE version: 6.0_18-b07 # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 ) # An error report file with more information is saved as: # /tmp/hs_err_pid5460.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Any suggestion on how to avoid those errors and Tomcat failure in the future? May be some CATALINA_OPTS tuning options? Some system details: --- # cat /srv/tomcat/bin/setenv.sh export JAVA_HOME=/srv/jdk export PATH=${PATH}:${JAVA_HOME}/bin/ CATALINA_OPTS=-server -XX:+UseParallelGC -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Djava.awt.headless=true export CATALINA_OPTS export CATALINA_PID=$CATALINA_HOME/tomcat.pid # java -version java version 1.6.0_18 Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode) # free -m total used free sharedbuffers cached Mem: 3775730 3045 0280304 -/+ buffers/cache:144 3630 Swap: 1023 0 1023 --- S Y S T E M --- OS:Scientific Linux SL release 5.5 (Boron) uname:Linux 2.6.18-164.15.1.el5 #1 SMP Tue Mar 16 18:44:51 EDT 2010 x86_64 libc:glibc 2.5 NPTL 2.5 rlimit: STACK 10240k, CORE infinity, NPROC infinity, NOFILE 1024, AS infinity load average:0.88 0.29 0.10 CPU:total 1 (1 cores per cpu, 1 threads per core) family 16 model 4 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, popcnt, mmxext, 3dnow, 3dnowext, lzcnt, sse4a Memory: 4k page, physical 3866464k(13372k free), swap 1048568k(1048500k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (16.0-b13) for linux-amd64 JRE (1.6.0_18-b07), built on Dec 17 2009 13:42:22 by java_re with gcc 3.2.2 (SuSE Linux) Thanks for any help, Leon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
Am Wed, 26 May 2010 13:08:23 +1000 schrieb Leon Kolchinsky lkolc...@gmail.com: # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? Without knowing the application I would strongly estimate that it is an application bug if it requests a block of 2 GB memory. It might be a good idea to monitor the JVM and its memory management with JMX-tools like jconsole (X11) or LambdaProbe (Tomcat). CATALINA_OPTS=-server -XX:+UseParallelGC -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Djava.awt.headless=true We are using in our standard setups some more parameters although I'm not sure if they are necessary always or just still valid, e.g.: # Maximum Size of new generation; default: function of NewRatio JAVA_OPTS=$JAVA_OPTS -XX:MaxNewSize=400m # Default size of new generation; default: 30% larger JAVA_OPTS=$JAVA_OPTS -XX:NewSize=400m # Ratio of new/old generation sizes; default: 8 JAVA_OPTS=$JAVA_OPTS -XX:NewRatio=3 JAVA_OPTS=$JAVA_OPTS -XX:+UseParNewGC Here you find some parameter docs: http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp Generally I would ask the application vendor for suggested parameters. Gruß, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
On 26.05.2010 11:48, Pid wrote: On 26/05/2010 04:08, Leon Kolchinsky wrote: Hello I've installed Tomcat 6.0.26 and running Confluence software on it. I think that maximum 2 concurrent users using this application in at this stage (testing now). Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): # # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? What was the last task that it was doing before requesting 2Gb more memory? What's in catalina.out, the matching host access log and any application logs immediately before the OOM? Did you notice the full hotspot error file was attached to the OP's mail? Active threads seemed to be the hotspot compiler, but that wouldn't match with the 2GB allocation. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: R: RE: Re: intermittent SocketException on startup tomcat 5.5.28 and under JBOSS 4.2.3GA
On 24/05/2010 21:54, ago...@libero.it wrote: Thanks for suggestion. But i have win2008 with dual quad core processor, 4GB ram. The CPU usage is to 5% and ram is used to the 75% when error occours. So the server isn't under load. What block the reload time of page (in presence of error all is more slow the IE page often is white)? Is this a different question? Are you describing a different problem? What i can investigate when the error occours (i already seen process, TCP connection, firewall)? what can i do? Plese give me a help. You can examine the network traffic and try to catch a moment when it occurs, but Chuck is suggesting that it's a client disconnecting, so you would need to monitor the client too. Maybe you can compare access logs and error log timestamps and determine which of the client connections is causing the 'problem'. p Agostino Messaggio originale Da: chuck.caldar...@unisys.com Data: 24/05/2010 15.38 A: Tomcat Users Listusers@tomcat.apache.org, ago...@libero.it ago...@libero.it Ogg: RE: Re: intermittent SocketException on startup tomcat 5.5.28 and under JBOSS 4.2.3GA From: ago...@libero.it [mailto:ago...@libero.it] Subject: R: Re: intermittent SocketException on startup tomcat 5.5.28 and under JBOSS 4.2.3GA ERROR [org.apache.tomcat.util.net.JIoEndpoint] Socket accept failed java.net.SocketException: socket closed This isn't really a problem with the Tomcat server - it usually means the client terminated the connection attempt before the socket on the server end could be created. If this is happening persistently, then something in between the client and Tomcat (e.g., a firewall or flakey router) is dropping the connection before it can be fully established. There's also a possibility that Windows is reaching some resource limit and preventing creation of the server end of the connection. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: question for singlesignon for vertical cluster
On 24/05/2010 00:36, Okubo, Yasushi (TSD) wrote: Hi I would like to enable singlesignon on vertical cluster environment [multi-nodes on multiple hosts]. We are using clustersinglesignon under host element, and this works in horizontal cluster, but does not work in vertical cluster environment. How are you configuring the cluster in each case? What have you tried? p Is there any way to make this work as part of tomcat configuration? When the node goes down, and a user may be routed to the node located in a different host, it will ask a user to relogin again under the current setup. We would like to avoid a user for relogging to the application. Anyway, if tomcat does not provide singlesigeon solution for vertical cluster, is there any other open source solutions available? Thanks, yasushi OS: linux/redhat 5 - 64 bit Jvm : 1.6.x Tocmat : 6.0.24/26 Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.ha.authenticator.ClusterSingleSignOn / signature.asc Description: OpenPGP digital signature
RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
From: Leon Kolchinsky [mailto:lkolc...@gmail.com] Subject: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): This is not a Tomcat error - it's a bug in the JVM. The C2 (server) compiler is requesting an extremely large expansion of the C (not Java) heap. You can try increasing the swap space to see if that's a viable workaround, but you really should do this: # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
On 26/05/2010 11:15, Rainer Jung wrote: On 26.05.2010 11:48, Pid wrote: On 26/05/2010 04:08, Leon Kolchinsky wrote: Hello I've installed Tomcat 6.0.26 and running Confluence software on it. I think that maximum 2 concurrent users using this application in at this stage (testing now). Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): # # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? What was the last task that it was doing before requesting 2Gb more memory? What's in catalina.out, the matching host access log and any application logs immediately before the OOM? Did you notice the full hotspot error file was attached to the OP's mail? Active threads seemed to be the hotspot compiler, but that wouldn't match with the 2GB allocation. Nope. Didn't get the file. p Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
From: Caldarale, Charles R Subject: RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. Should also mention that another Tomcat admin reported occasional but persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above, but went back to 6u7 and that appeared to rectify the problem. I think the highest level he had tested was 6u17, but I'm not positive. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: EL 2.2 in Tomcat 7 RC1/RC2 does not fully support method invocation, such as #{helloWorldController.doSomething(helloWorldModel)}
Just to follow up. Same failure happens on Tomcat RC3. n828cl wrote: From: John Wu [mailto:johnwu@gmail.com] Subject: EL 2.2 in Tomcat 7 RC1/RC2 does not fully support method invocation, such as #{helloWorldController.doSomething(helloWorldModel)} I tried to use JSF 2.0 + Facelets (no JSP at all) in Tomcat 6 with EL 2.2 (extracted from Tomcat 7 RC2), and failed. And what happens if you try it with Tomcat 7 (currently at RC3)? - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/EL-2.2-in-Tomcat-7-RC1-RC2-does-not-fully-support-method-invocation%2C-such-as-%22-%7BhelloWorldController.doSomething%28helloWorldModel%29%7D%22-tp28671969p28680544.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
I am the person who reported occasional but persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above. I did go back to 6u7 and the application has run without a burp for three months. I had tested 6u18/6u19, both of which produced the same result. I am getting ready to start testing 6u20 as I would like to keep current so I don't have any security issues hanging out. Thanks, Carl - Original Message - From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, May 26, 2010 8:00 AM Subject: RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message From: Caldarale, Charles R Subject: RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. Should also mention that another Tomcat admin reported occasional but persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above, but went back to 6u7 and that appeared to rectify the problem. I think the highest level he had tested was 6u17, but I'm not positive. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0 always uses default host in multi-host config
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, May 25, 2010 4:47 PM To: Tomcat Users List Subject: RE: Tomcat 6.0 always uses default host in multi-host config From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config OK, to answer my own question on this, useIPVHosts is essentially a way to save some configuration writing at the expense of doing a reverse-DNS lookup on every access, correct? No. Setting useIPVHosts to true says to use the local IP address rather than the HTTP host header value for determining which Host to give the request to. Yes, but how does it determine the host to route to? That was the initial question. When you have a config like the OP, where each host is defined by name, not IP, in the server.xml, there is obviously some resolution of IP to name that has to take place. Now, whether it does that at each connection, or at startup cached, I don't know. I'm sure a search of source would provide that answer. I was only making an assumption about the process, but it still seems to me to be a little extra work involved for each connection to route it to the correct host. You can do it my way below, and have everything clearly spelled out It's only clearly spelled out to you, since you implemented. Looks like a lot more work and overhead to me, and certainly no simpler. or you can use this config trick and let TC manage it for you. It's clearly not a trick. Obviously, I meant clearer in terms of being able to understand what's going on without detailed understanding of the Tomcat source. It is more work to setup and not a simple implementation, but it is specific in the server.xml how traffic will route. There is nothing that Tomcat has to rely on outside the server.xml to properly route the traffic. Anything that magically does something is a trick, even if it's a specifically coded trick. The documentation I've seen essentially says, set this to true and tomcat will figure it out. I used trick in this manner, because I haven't found any specific documentation about how this feature is expected to function, i.e. how to set it up properly. Got a reference? Obviously, a real config trick is one where a certain combination of parameters produces beneficial effects but not ones specifically planned for (MS-based stuff is full of those). The term was misapplied in this case. But in a config setting useIPVHost=true will only route it to the correct host if the IP resolves to the host name or alias Which is exactly what the useIPVHosts setting is documented to do. Where? This is the only official documentation I have found on the feature: Set this attribute to true to cause Tomcat to use the IP address that the request was received on to determine the Host to send the request to. The default value is false. (http://tomcat.apache.org/tomcat-5.5-doc/config/http.html) That was my original question. As you can see, there is nothing about how it determines the host-IP mapping. In my researching the feature, I found 3 to 4 posts about folks having problems with this feature similar to the OP's over the past few years. Almost all were resolved with either an alias entry or setting an entry in the hosts file. I'm guessing a lot of folks don't set up reverse-DNS, and thus the problem. Aside from probably only needing to configure one port 80 connector, and probably allocating fewer resources as a result, is there any other advantage to the parameter? That seems to be a significant advantage to me. - Chuck I'm not saying it isn't an advantage, but given the drawback of having traffic route inappropriately if your name resolution is not perfect, is it that great? Are there other significant run-time advantages to this feature, or disadvantages or drawbacks to my setup? I'm not really advocating my set up as the way, as I can see this as a viable option, and one I might want to switch to if I understood it better. I have seen my config as a suggestion from others on this list in the last few weeks. OK, all the above aside, is my understanding of the feature essentially correct? To reitterate: 1) Set useIPVHosts to true in all Connectors. 2) When a connection is made Tomcat will look for a configured Host with that IP address as name or alias, and execute in that Host. 3) Otherwise it will make a call to the system resolver, passing the IP address to lookup and expecting a hostname in return. 4) Check returned hostname against server.xml Hosts and execute there if found. 5) If returned hostname is null or not found in server.xml, then execute in Engine's defaulthost. Or really, should we do what we'd do in Apache and set up the Host elements with name=ip address instead of a text-based name, and not really worry about the text-based name at all - eliminating the need for any
Why does errorPage work but WEB-INF/web.xml error-page does not?
Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 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:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:637) -- View this message in context: http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28681659.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
On 26.05.2010 14:49, Caldarale, Charles R wrote: From: Leon Kolchinsky [mailto:lkolc...@gmail.com] Subject: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): This is not a Tomcat error - it's a bug in the JVM. The C2 (server) compiler is requesting an extremely large expansion of the C (not Java) heap. You can try increasing the swap space to see if that's a viable workaround, but you really should do this: # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. If we stick to the theory, that it is actually the Hot Spot compiler, which demands the memory, one could also try to work around the issue. Option 1: Use the client Hot Sopt compiler (Add -client when starting the JVM). It could help, Option 2: Disable the Hot Spot compilation for the class and method that resulted in the crash: Current CompileTask: C2:4743 ! org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/parser/node/Node;)Z (514 bytes) To do this, you need to create a file named .hotspot_compiler in the working directory of your Tomcat. You would put a line like that into the file: exclude org/apache/velocity/runtime/directive/Foreach render Some more info about that is contained in http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html#gbyzd An alternative is adding -XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render to the command line. See also http://forums.sun.com/thread.jspa?threadID=417123 http://blogs.sun.com/javawithjiva/entry/hotspotrc_and_hotspot_compiler If you want to follow the Hot Spot compilation, you can also add -XX:-PrintCompilation. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
Dave: I believe you need a fully-qualified class name for the exception, eg: error-page exception-typejava.lang.Exception/exception-type location/error-pages/500.jsp/location /error-page Good luck, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. On 26/05/2010 10:34 AM, laredotornado wrote: Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 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:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:637) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
From: Rainer Jung [mailto:rainer.j...@kippdata.de] Subject: Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message Option 1: Use the client Hot Sopt compiler (Add -client when starting the JVM). Usually not available on 64-bit JVMs, unless you build the JVM yourself (not recommended :-). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
On 26.05.2010 16:38, Rainer Jung wrote: On 26.05.2010 14:49, Caldarale, Charles R wrote: From: Leon Kolchinsky [mailto:lkolc...@gmail.com] Subject: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message Yesterday I've got this error in catalina.out and Tomcat died (I'm attaching hs_err_pid5460.log file): This is not a Tomcat error - it's a bug in the JVM. The C2 (server) compiler is requesting an extremely large expansion of the C (not Java) heap. You can try increasing the swap space to see if that's a viable workaround, but you really should do this: # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. If we stick to the theory, that it is actually the Hot Spot compiler, which demands the memory, one could also try to work around the issue. Option 1: Use the client Hot Sopt compiler (Add -client when starting the JVM). It could help, Option 2: Disable the Hot Spot compilation for the class and method that resulted in the crash: Current CompileTask: C2:4743 ! org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/parser/node/Node;)Z (514 bytes) To do this, you need to create a file named .hotspot_compiler in the working directory of your Tomcat. You would put a line like that into the file: exclude org/apache/velocity/runtime/directive/Foreach render Some more info about that is contained in http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html#gbyzd An alternative is adding -XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render to the command line. See also http://forums.sun.com/thread.jspa?threadID=417123 http://blogs.sun.com/javawithjiva/entry/hotspotrc_and_hotspot_compiler If you want to follow the Hot Spot compilation, you can also add -XX:-PrintCompilation. I meant -XX:+PrintCompilation - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: question for singlesignon for vertical cluster
I am adding the following cluster element to engine for vertical cluster and to host for horizontal cluster for development. I started configuring mod_proxy_ajp and have some problem to configure, so I may post another question later. Anyway, for vertical cluster, we have setup DNS round robbing for load balancing. When we shutdown one node, a user is routed to anther node, but tomcat asks a user to re-login. For horizontal cluster, at least tomcat does not ask re-login to access a different node running on the same host, but I would like to setup load balancing. yasushi Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster channelSendOptions=4 Manager className=org.apache.catalina.ha.session.DeltaManager expireSessionsOnShutdown=false notifyListenersOnReplication=true/ Channel className=org.apache.catalina.tribes.group.GroupChannel Membership className=org.apache.catalina.tribes.membership.McastService address=228.0.0.4 port=45564 frequency=500 dropTime=3000/ Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver address=auto port=4000 autoBind=100 selectorTimeout=5000 maxThreads=12/ Sender className=org.apache.catalina.tribes.transport.ReplicationTransmitter Transport className=org.apache.catalina.tribes.transport.nio.PooledParallelSender / /Sender Interceptor className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetec tor/ Interceptor className=org.apache.catalina.tribes.group.interceptors.MessageDispatch 15Interceptor/ Interceptor className=org.apache.catalina.tribes.group.interceptors.ThroughputInter ceptor/ /Channel Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; .*\.xls;.*\.sdf;.*\.xml;/ !-- only with jk_mod failover-- Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve enabled=true sessionIdAttribute=takeoverSessionid / !-- currently very unstable for remote deployment Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ -- !-- only with jk_mod and jvmroutebindervalve-- ClusterListener className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListene r/ ClusterListener className=org.apache.catalina.ha.session.ClusterSessionListener/ /Cluster -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Wednesday, May 26, 2010 3:20 AM To: Tomcat Users List Subject: Re: question for singlesignon for vertical cluster On 24/05/2010 00:36, Okubo, Yasushi (TSD) wrote: Hi I would like to enable singlesignon on vertical cluster environment [multi-nodes on multiple hosts]. We are using clustersinglesignon under host element, and this works in horizontal cluster, but does not work in vertical cluster environment. How are you configuring the cluster in each case? What have you tried? p Is there any way to make this work as part of tomcat configuration? When the node goes down, and a user may be routed to the node located in a different host, it will ask a user to relogin again under the current setup. We would like to avoid a user for relogging to the application. Anyway, if tomcat does not provide singlesigeon solution for vertical cluster, is there any other open source solutions available? Thanks, yasushi OS: linux/redhat 5 - 64 bit Jvm : 1.6.x Tocmat : 6.0.24/26 Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.ha.authenticator.ClusterSingleSignOn / - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0 always uses default host in multi-host config
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config When you have a config like the OP, where each host is defined by name, not IP, in the server.xml, there is obviously some resolution of IP to name that has to take place. No, there isn't. The HTTP host header is already a name, so it's a simple string match. The only additional work is when useIPVHosts is true - the IP address has to be retrieved from the TCP/IP stack and converted to a string first. There is nothing that Tomcat has to rely on outside the server.xml to properly route the traffic. True regardless of the configuration. Anything that magically does something is a trick, even if it's a specifically coded trick. I still don't see why you think anything magic is going on; it all seems very straightforward to me. As you can see, there is nothing about how it determines the host-IP mapping. Because there isn't any. I'm not saying it isn't an advantage, but given the drawback of having traffic route inappropriately if your name resolution is not perfect, is it that great? Again, there's *no name resolution* going on - anywhere. HTTP requests come in with a host header, and that's what is normally used to determine which Host to give the message to. When you set useIPVHosts to true, you defeat this mechanism, as documented. 1) Set useIPVHosts to true in all Connectors. I have yet to see a valid reason to do that. The simplest, least overhead configuration is a single Connector for each port, and let the HTTP host header do the routing. You can set up the defaultHost to be one that simply returns an error if the client fails to send in a valid HTTP host header. You can also set aliases for expected synonyms of the Host name. 3) Otherwise it will make a call to the system resolver, passing the IP address to lookup and expecting a hostname in return. Nope, doesn't happen. Or really, should we do what we'd do in Apache and set up the Host elements with name=ip address instead of a text-based name, and not really worry about the text-based name at all - eliminating the need for any alias entries. No, because that eliminates the very common usage case of having multiple domains point to the same IP address; you want to be able to differentiate based on the URI of the request, not the IP address it happens to arrive on. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Question on workers.properties file
Trying again to see if I can respond to Andre's question regarding what my directory structure is in order to help me determine where I've gone wrong in my setup and why I'm not getting the auth and user values in the request that is being forwarded to my Tomcat server. I can connect via the Tomcat connector to my site successfully however, I cannot authenticate my userid and therefore I cannot get to my application which is dependent on that value so that the authenticated user can access the web app. Here is my setup: 1. Andre, before you ask, I am still waiting on a test Windows 2003 server to be setup where I can test this on a server rather than my XP box as you suggested to me previously, but I'm stuck testing on my Windows XP box until then. 2. Currently I am testing to see if using the Tomcat connector will work on my local Windows XP box. 3. I am testing my web app within Eclipse using Tomcat 6.0 (meaning my web app is a dynamic web project within Eclipse and has been added to the Tomcat server in Eclipse). 4. My URL is: http://localhost/SCMIS/index.jsp 5. The directory structure on my local box where my web app is located is: C:\Snaps\savoym_remote_scmis_phase5_dev\scmis_phase5_vob and the directories directly under this directory is: Build Common Libraries Lookup Lost+found Maintenance PurchaseOrder Requisition SCMIS (this is the where the JSP's are located and this is the directory that is defined in my SCMIS IIS virtual web site) Security 6. In IIS 5.1, on my Windows XP box, the setup is as follows: a. Default website has a directory security setting of (Anonymous access - checked) b. jakara virtual website has a directory security setting of (Anonymous access - checked) c. SCMIS virtual website, within the jakarta virtual website, has a directory security setting of (Windows Authentication - checked) Thanks for anyone taking the time to read this post and for any help/direction anyone can provide. From: André Warnier [...@ice-sa.com] Sent: Monday, May 24, 2010 15:49 To: Tomcat Users List Subject: Re: Question on workers.properties file Savoy, Melinda wrote: Andre, Thanks for the reply. I was finally able to get my the LOG file created. I had NOT setup my virtual website, SCMIS, in addition to the JAKARTA virtual website in IIS and consequently I kept using Tomcat to authenticate instead of using IIS to do so and it was never hitting my website I think it has something to do with the settings in my IIS setting. I still cannot get the value from getRemoteUser() because the user is blank as is indicated in the log below. ANY help/direction would be greatly appreciated. The URL that I am using to access my SCMIS virtual website is: http://localhost/SCMIS/index.jsp In IIS I have the following: Default Web Site - Anonymous access checked and Integrated Windows authentication unchecked Jakarta - virtual web site and Anonymous access checked and Integrated Windows authentication unchecked SCMIS - virtual web site and Anonymous access unchecked and Integrated Windows authentication checked I have attached the entries in the log file that just happened: I think the problem is right there, and in the worker mappings you mentioned earlier : /examples/*=scmisWorker /examples/*.jsp=scmisWorker /examples/servlet/*=scmisWorker Now in your logfile, you have : [Mon May 24 10:10:02.781 2010] [8124:7912] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/servlet/*=scmisWorker' source 'uriworkermap' [Mon May 24 10:10:02.781 2010] [8124:7912] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/*.jsp=scmisWorker' source 'uriworkermap' [Mon May 24 10:10:02.781 2010] [8124:7912] [debug] jk_uri_worker_map.c (863): Found a wildchar match '/*.jsp=scmisWorker' Assuming the mappings above, then why is it trying to match '/servlet/*=scmisWorker' and '/*.jsp=scmisWorker' ? That does not fit. Those mappings are not in your list above. Again, I am no expert on IIS or on the Jk redirector in conjunction with it, but my little finger tells me that there is something very wrong somewhere. I have the feeling that your problem is not really related to authentication (or the lack of it). It is that there is some confusion as to the proper setup of IIS and Tomcat together, and how IIS handles virtual websites. Maybe we should restart from the beginning, like here : When you look at the ...\Tomcat 6.0\webapps directory, what are the sub-directories located just below it ? And , just to gain time, out of these, which is the one that corresponds to the application which /should/ be authenticated ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for
Re: Question on workers.properties file
On 26.05.2010 18:30, Savoy, Melinda wrote: Trying again to see if I can respond to Andre's question regarding what my directory structure is in order to help me determine where I've gone wrong in my setup and why I'm not getting the auth and user values in the request that is being forwarded to my Tomcat server. I can connect via the Tomcat connector to my site successfully however, I cannot authenticate my userid and therefore I cannot get to my application which is dependent on that value so that the authenticated user can access the web app. Here is my setup: 1. Andre, before you ask, I am still waiting on a test Windows 2003 server to be setup where I can test this on a server rather than my XP box as you suggested to me previously, but I'm stuck testing on my Windows XP box until then. 2. Currently I am testing to see if using the Tomcat connector will work on my local Windows XP box. 3. I am testing my web app within Eclipse using Tomcat 6.0 (meaning my web app is a dynamic web project within Eclipse and has been added to the Tomcat server in Eclipse). 4. My URL is: http://localhost/SCMIS/index.jsp 5. The directory structure on my local box where my web app is located is: C:\Snaps\savoym_remote_scmis_phase5_dev\scmis_phase5_vob and the directories directly under this directory is: Build Common Libraries Lookup Lost+found Maintenance PurchaseOrder Requisition SCMIS (this is the where the JSP's are located and this is the directory that is defined in my SCMIS IIS virtual web site) Security 6. In IIS 5.1, on my Windows XP box, the setup is as follows: a. Default website has a directory security setting of (Anonymous access - checked) b. jakara virtual website has a directory security setting of (Anonymous access - checked) c. SCMIS virtual website, within the jakarta virtual website, has a directory security setting of (Windows Authentication - checked) Does it work, if you switch all of those three to Anonymous access unchecked and Windows Authentication checked? What is the SCMIS virtual website in IIS for? Are you trying to serve static content directly form IIS? If no, I don't see a reason why you would want to have that virtual website. Are you forwarding /SCMIS/* to Tomcat, or only JSPs? As I wrote in a previous post, it didn't work for me when i only switched the jakarta virtual website to Windows auth. It only started to work, when I changed the default website too. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave dcherk wrote: Dave: I believe you need a fully-qualified class name for the exception, eg: error-page exception-typejava.lang.Exception/exception-type location/error-pages/500.jsp/location /error-page Good luck, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. On 26/05/2010 10:34 AM, laredotornado wrote: Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 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:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:637) - To unsubscribe, e-mail:
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
Dave - looks like I just posted something for you to try in your JavaRanch forum thread... Basically, it looks like having a committed response (you've said that your original JSP was partially rendered) can interfere with the error page mechanism. For testing purposes, try increasing the page buffer to see what happens. You may want to consider changing your approach to incorporate filters/servlets for some of your processing... On Wed, May 26, 2010 at 1:26 PM, laredotornado laredotorn...@gmail.com wrote: I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave dcherk wrote: Dave: I believe you need a fully-qualified class name for the exception, eg: error-page exception-typejava.lang.Exception/exception-type location/error-pages/500.jsp/location /error-page Good luck, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. On 26/05/2010 10:34 AM, laredotornado wrote: Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 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:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
RE: Question on workers.properties file
Ranier - thanks for the reply. 1. I just tried this again, but I set all 3 (Default Website, jakarta virtual website and SCMIS virtual website) to Windows Authentication checked and Anonymous access unchecked and I was prompted with a login dialog box. I could not get authenticated and then I hit cancel and when I did my log showed the following: [Wed May 26 12:38:41.480 2010] [4684:228] [debug] jk_isapi_plugin.c (3108): Service protocol=HTTP/1.1 method=GET host=127.0.0.1 addr=127.0.0.1 name=localhost port=80 auth=Negotiate user=TEXAS\SavoyM uri=/SCMIS/index.jsp My objective here is to have IIS authenticate without a user logging in and then I acquire the user value via the getRemoteUser() method. 2. I understood that I had to have the website that I am running currently in Tomcat setup as a virtual website in IIS under the jakarta virtual website in IIS so that it would serve up the /SCMIS/*.jsp pages in Tomcat? Are you saying that is not the case and I can get rid of the SCMIS virtual website? Could this possibly the issue? 3. I remember your previous post but I thought you also said that you got a login prompt which is what I'm trying to avoid. Again the hope is that IIS can authenticate and forward the user value to Tomcat seamlessly. Thanks again for the reply and your help. -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Wednesday, May 26, 2010 11:52 AM To: Tomcat Users List Subject: Re: Question on workers.properties file On 26.05.2010 18:30, Savoy, Melinda wrote: Trying again to see if I can respond to Andre's question regarding what my directory structure is in order to help me determine where I've gone wrong in my setup and why I'm not getting the auth and user values in the request that is being forwarded to my Tomcat server. I can connect via the Tomcat connector to my site successfully however, I cannot authenticate my userid and therefore I cannot get to my application which is dependent on that value so that the authenticated user can access the web app. Here is my setup: 1. Andre, before you ask, I am still waiting on a test Windows 2003 server to be setup where I can test this on a server rather than my XP box as you suggested to me previously, but I'm stuck testing on my Windows XP box until then. 2. Currently I am testing to see if using the Tomcat connector will work on my local Windows XP box. 3. I am testing my web app within Eclipse using Tomcat 6.0 (meaning my web app is a dynamic web project within Eclipse and has been added to the Tomcat server in Eclipse). 4. My URL is: http://localhost/SCMIS/index.jsp 5. The directory structure on my local box where my web app is located is: C:\Snaps\savoym_remote_scmis_phase5_dev\scmis_phase5_vob and the directories directly under this directory is: Build Common Libraries Lookup Lost+found Maintenance PurchaseOrder Requisition SCMIS (this is the where the JSP's are located and this is the directory that is defined in my SCMIS IIS virtual web site) Security 6. In IIS 5.1, on my Windows XP box, the setup is as follows: a. Default website has a directory security setting of (Anonymous access - checked) b. jakara virtual website has a directory security setting of (Anonymous access - checked) c. SCMIS virtual website, within the jakarta virtual website, has a directory security setting of (Windows Authentication - checked) Does it work, if you switch all of those three to Anonymous access unchecked and Windows Authentication checked? What is the SCMIS virtual website in IIS for? Are you trying to serve static content directly form IIS? If no, I don't see a reason why you would want to have that virtual website. Are you forwarding /SCMIS/* to Tomcat, or only JSPs? As I wrote in a previous post, it didn't work for me when i only switched the jakarta virtual website to Windows auth. It only started to work, when I changed the default website too. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: set-cookie
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/24/2010 3:55 PM, Caldarale, Charles R wrote: From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like System.out.println(Thread.currentThread().getStackTrace()); What you got was a display of the array object - not very interesting. Either iterate through the array, displaying each entry, or just do this: Thread.currentThread().dumpStack(); Or the more traditional: new Throwable(Stack Dump).printStackTrace(); - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9YrcACgkQ9CaO5/Lv0PDXegCfeKZOUdIKnIgAnfSmrhO015D2 lVEAnRzbT4mKvoli8WDYshlA1uNGHHQS =jp7W -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: set-cookie
On Wed, May 26, 2010 at 2:04 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/24/2010 3:55 PM, Caldarale, Charles R wrote: From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like System.out.println(Thread.currentThread().getStackTrace()); What you got was a display of the array object - not very interesting. Either iterate through the array, displaying each entry, or just do this: Thread.currentThread().dumpStack(); Or the more traditional: new Throwable(Stack Dump).printStackTrace(); dumpStack is actually static, so: Thread.dumpStack(); which is implemented as: new Exception(Stack trace).printStackTrace(); - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9YrcACgkQ9CaO5/Lv0PDXegCfeKZOUdIKnIgAnfSmrhO015D2 lVEAnRzbT4mKvoli8WDYshlA1uNGHHQS =jp7W -END PGP SIGNATURE- -- Kris Schneider - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: set-cookie
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: set-cookie Thread.currentThread().dumpStack(); Or the more traditional: new Throwable(Stack Dump).printStackTrace(); And if we look inside java.lang.Thread, we find: public static void dumpStack() { new Exception(Stack trace).printStackTrace(); } - 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.
Re: Question on workers.properties file
On 26.05.2010 19:53, Savoy, Melinda wrote: Ranier - thanks for the reply. 1. I just tried this again, but I set all 3 (Default Website, jakarta virtual website and SCMIS virtual website) to Windows Authentication checked and Anonymous access unchecked and I was prompted with a login dialog box. I could not get authenticated and then I hit cancel and when I did my log showed the following: [Wed May 26 12:38:41.480 2010] [4684:228] [debug] jk_isapi_plugin.c (3108): Service protocol=HTTP/1.1 method=GET host=127.0.0.1 addr=127.0.0.1 name=localhost port=80 auth=Negotiate user=TEXAS\SavoyM uri=/SCMIS/index.jsp My objective here is to have IIS authenticate without a user logging in and then I acquire the user value via the getRemoteUser() method. 2. I understood that I had to have the website that I am running currently in Tomcat setup as a virtual website in IIS under the jakarta virtual website in IIS so that it would serve up the /SCMIS/*.jsp pages in Tomcat? Are you saying that is not the case and I can get rid of the SCMIS virtual website? Could this possibly the issue? I think you don't need it (and thus should get rid of it), but it is not related to your auth issue. Keep the jakarta entry, but not the SCMIS one below the jakarta one. 3. I remember your previous post but I thought you also said that you got a login prompt which is what I'm trying to avoid. Again the hope is that IIS can authenticate and forward the user value to Tomcat seamlessly. Did you notice, that are are other checkboxes you can choose your auth style from? I'd try all of those and try to read about their meaning. Did you use MSIE or some other browser? Some of the automatic auth methods used on Windows might only work with MSIE and maybe only if the web server is configured as being trusted in MSIE. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
Hi, Thanks for reading this. I am developing a webapp and do not understand the following: In my app, I create a Timer when the servlet starts. When tomcat stops, I try to stop the timer in order to avoid memory leaks. My question is: why do I get a NullPointerException while trying to access mytimer in contextDestroyed(). The simplified code: public class myclass extends HttpServlet implements ServletContextListener { java.util.Timer mytimer; int testint; public void init() throws ServletException { mytimer = new Timer(__test__); TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; } public void contextDestroyed(ServletContextEvent event) { System.out.println(Inside contextDestroyed, testint=+testint); try { mytimer.cancel(); } catch (Exception e) { System.out.println(An error occurred inside contextDestroyed(): +e); } } public void contextInitialized(ServletContextEvent event) { // Nothing here } public void destroy() { // Nothing here } } The Output: May 26, 2010 8:06:30 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Inside contextDestroyed(), testing=12 An error occurred inside contextDestroyed(): java.lang.NullPointerException May 26, 2010 8:06:30 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [__test__] but has failed to stop it. This is very likely to create a memory leak. What disturbs me, is that my other variable testint is accessible within contextDestroyed, but not mytimer. If I save my timer in init() like this: ServletContext sc = getServletContext(); sc.setAttribute(mytimer, mytimer) and if I modify contextDestroyed() so that it accesses my timer through ServletContext ServletContext context = event.getServletContext(); Timer mytimer2 = (Timer)context.getAttribute(mytimer); then I have no problem stopping it, making the tomcat warning disappear. I'd like to understand why it is so. Thank you very much in advance ___ NEU: WEB.DE DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit! http://produkte.web.de/go/02/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
On 26/05/2010 19:43, devn...@web.de wrote: Hi, Thanks for reading this. I am developing a webapp and do not understand the following: In my app, I create a Timer when the servlet starts. When tomcat stops, I try to stop the timer in order to avoid memory leaks. My question is: why do I get a NullPointerException while trying to access mytimer in contextDestroyed(). The simplified code: public class myclass extends HttpServlet implements ServletContextListener { java.util.Timer mytimer; int testint; public void init() throws ServletException { mytimer = new Timer(__test__); TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; } Why mix match the Servlet and ServletContextListener methods? p public void contextDestroyed(ServletContextEvent event) { System.out.println(Inside contextDestroyed, testint=+testint); try { mytimer.cancel(); } catch (Exception e) { System.out.println(An error occurred inside contextDestroyed(): +e); } } public void contextInitialized(ServletContextEvent event) { // Nothing here } public void destroy() { // Nothing here } } The Output: May 26, 2010 8:06:30 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Inside contextDestroyed(), testing=12 An error occurred inside contextDestroyed(): java.lang.NullPointerException May 26, 2010 8:06:30 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [__test__] but has failed to stop it. This is very likely to create a memory leak. What disturbs me, is that my other variable testint is accessible within contextDestroyed, but not mytimer. If I save my timer in init() like this: ServletContext sc = getServletContext(); sc.setAttribute(mytimer, mytimer) and if I modify contextDestroyed() so that it accesses my timer through ServletContext ServletContext context = event.getServletContext(); Timer mytimer2 = (Timer)context.getAttribute(mytimer); then I have no problem stopping it, making the tomcat warning disappear. I'd like to understand why it is so. Thank you very much in advance ___ NEU: WEB.DE DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit! http://produkte.web.de/go/02/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
Hi, thank you for your reply. First I'd like to say that I do implement ServletContextListener at all beacause destroy() fires after the tomcat warnings. That being said, on this website: http://stackoverflow.com/questions/2255884/jython-and-implementing-httpservlet-contextinitialized is written that You can optionally also let your servlet both extend HttpServlet and implement ServletContextListener It is also said that it is not always considered a good practice. Why is that so ? Would that be an explanation why in my case I can access some variables but others not ? Thank you for your help. -Ursprüngliche Nachricht- Von: Pid p...@pidster.com Gesendet: 26.05.2010 20:45:53 An: Tomcat Users List users@tomcat.apache.org Betreff: Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException On 26/05/2010 19:43, devn...@web.de wrote: Hi, Thanks for reading this. I am developing a webapp and do not understand the following: In my app, I create a Timer when the servlet starts. When tomcat stops, I try to stop the timer in order to avoid memory leaks. My question is: why do I get a NullPointerException while trying to access mytimer in contextDestroyed(). The simplified code: public class myclass extends HttpServlet implements ServletContextListener { java.util.Timer mytimer; int testint; public void init() throws ServletException { mytimer = new Timer(__test__); TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; } Why mix match the Servlet and ServletContextListener methods? p public void contextDestroyed(ServletContextEvent event) { System.out.println(Inside contextDestroyed, testint=+testint); try { mytimer.cancel(); } catch (Exception e) { System.out.println(An error occurred inside contextDestroyed(): +e); } } public void contextInitialized(ServletContextEvent event) { // Nothing here } public void destroy() { // Nothing here } } The Output: May 26, 2010 8:06:30 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Inside contextDestroyed(), testing=12 An error occurred inside contextDestroyed(): java.lang.NullPointerException May 26, 2010 8:06:30 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [__test__] but has failed to stop it. This is very likely to create a memory leak. What disturbs me, is that my other variable testint is accessible within contextDestroyed, but not mytimer. If I save my timer in init() like this: ServletContext sc = getServletContext(); sc.setAttribute(mytimer, mytimer) and if I modify contextDestroyed() so that it accesses my timer through ServletContext ServletContext context = event.getServletContext(); Timer mytimer2 = (Timer)context.getAttribute(mytimer); then I have no problem stopping it, making the tomcat warning disappear. I'd like to understand why it is so. Thank you very much in advance ___ GRATIS: Movie-Flat mit über 300 Top-Videos. Für WEB.DE Nutzer dauerhaft kostenlos! Jetzt freischalten unter http://movieflat.web.de signature.asc Description: OpenPGP digital signature
RE: Question on workers.properties file
I did as you suggested below. I removed SCMIS virtual website from within the jakarta virtual website and I got this in the log: [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_isapi_plugin.c (1835): Filter started [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (1036): Attempting to map URI '/localhost/SCMIS/index.jsp' from 3 maps [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/SCMIS/servlet/*=scmisWorker' source 'uriworkermap' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/SCMIS/*.jsp=scmisWorker' source 'uriworkermap' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/SCMIS/*=scmisWorker' source 'uriworkermap' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/SCMIS/servlet/*=scmisWorker' source 'uriworkermap' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (850): Attempting to map context URI '/SCMIS/*.jsp=scmisWorker' source 'uriworkermap' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_uri_worker_map.c (863): Found a wildchar match '/SCMIS/*.jsp=scmisWorker' [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_isapi_plugin.c (1916): check if [/SCMIS/index.jsp] points to the web-inf directory [Wed May 26 14:00:09.271 2010] [3036:4236] [debug] jk_isapi_plugin.c (1932): [/SCMIS/index.jsp] is a servlet url - should redirect to scmisWorker [Wed May 26 14:00:09.286 2010] [3036:4236] [debug] jk_isapi_plugin.c (1972): fowarding escaped URI [/SCMIS/index.jsp] In IIS I changed had the DEFAULT WEBSITE directory security back to ANONYMOUS access checked only and left the jakarta directory security to windows authentication only. And I got a dialog box to login for authentication purposes. I tried to login and the dialog box just kept coming back. I guess what I do not understand is HOW does IIS know about my SCMIS website if it is NOT included in IIS? I thought I needed the SCMIS virtual website included in IIS in order to retrieve the user id that I am suppose to be getting from IIS? What will my URL be now since I was using http://localhost/SCMIS/index.jsp Thanks again. -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Wednesday, May 26, 2010 1:18 PM To: Tomcat Users List Subject: Re: Question on workers.properties file On 26.05.2010 19:53, Savoy, Melinda wrote: Ranier - thanks for the reply. 1. I just tried this again, but I set all 3 (Default Website, jakarta virtual website and SCMIS virtual website) to Windows Authentication checked and Anonymous access unchecked and I was prompted with a login dialog box. I could not get authenticated and then I hit cancel and when I did my log showed the following: [Wed May 26 12:38:41.480 2010] [4684:228] [debug] jk_isapi_plugin.c (3108): Service protocol=HTTP/1.1 method=GET host=127.0.0.1 addr=127.0.0.1 name=localhost port=80 auth=Negotiate user=TEXAS\SavoyM uri=/SCMIS/index.jsp My objective here is to have IIS authenticate without a user logging in and then I acquire the user value via the getRemoteUser() method. 2. I understood that I had to have the website that I am running currently in Tomcat setup as a virtual website in IIS under the jakarta virtual website in IIS so that it would serve up the /SCMIS/*.jsp pages in Tomcat? Are you saying that is not the case and I can get rid of the SCMIS virtual website? Could this possibly the issue? I think you don't need it (and thus should get rid of it), but it is not related to your auth issue. Keep the jakarta entry, but not the SCMIS one below the jakarta one. 3. I remember your previous post but I thought you also said that you got a login prompt which is what I'm trying to avoid. Again the hope is that IIS can authenticate and forward the user value to Tomcat seamlessly. Did you notice, that are are other checkboxes you can choose your auth style from? I'd try all of those and try to read about their meaning. Did you use MSIE or some other browser? Some of the automatic auth methods used on Windows might only work with MSIE and maybe only if the web server is configured as being trusted in MSIE. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender
RE: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
From: roberto calosino [mailto:devn...@web.de] Subject: Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException You can optionally also let your servlet both extend HttpServlet and implement ServletContextListener It is also said that it is not always considered a good practice. Why is that so ? Because, as you have inadvertently discovered, separate instances of the class are created for each purpose. If you make the mytimer field static (along with any others you want to use in both instances) you won't have a problem. - 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.
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
Hi, You could also eliminate the mix match and add a finally, with the following servlet code for example: public void init() throws ServletException { boolean initOk = false; mytimer = new Timer(__test__); try { TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; initOk = true; // as last } finally { if (!initOk) { mytimer.cancel(); } } } public void destroy() { System.out.println(Inside destroy, testint=+testint); try { mytimer.cancel(); } catch (Exception e) { System.out.println(An error occurred inside contextDestroyed(): +e); } } I added a finally / cancel in the init method, because as Kostantin Kolinko said yesterday, if there is an exception in the init method after a timer creation, then the destroy method is not called and the timer is never canceled even if your webapp is unusable (and Tomcat 6.0.26 will warn about that timer). I supposed here that your init method is not so simplified. bye, Emeric Le 26/05/2010 21:26, Caldarale, Charles R a écrit : From: roberto calosino [mailto:devn...@web.de] Subject: Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException You can optionally also let your servlet both extend HttpServlet and implement ServletContextListener It is also said that it is not always considered a good practice. Why is that so ? Because, as you have inadvertently discovered, separate instances of the class are created for each purpose. If you make the mytimer field static (along with any others you want to use in both instances) you won't have a problem. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Emeric, On 5/26/2010 3:52 PM, Emeric Vernat wrote: You could also eliminate the mix match and add a finally, with the following servlet code for example: public void init() throws ServletException { boolean initOk = false; mytimer = new Timer(__test__); try { TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; initOk = true; // as last } finally { if (!initOk) { mytimer.cancel(); } } } Uh what? I'm sure that does something, but ... I'm not sure what it could be. Could the OP show us the stack trace relative to the warning coming from Tomcat? I'd bet that Tomcat's stop leaks procedure is clearing-out a static Timer reference and /then/ the ServletContextListener is trying to access it. That's not supposed to happen, I'm guessing: the stop leaks stuff should run after all ServletContextListeners been notified that the context is coming down. I'm sure there is more useful information in the log file that we're not seeing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9haYACgkQ9CaO5/Lv0PCM1QCgvc2Y/SD1UJntGSBMJzo7ThBx Ty8An3wul/JusKxqjB3fRZRdikJjdI8l =z2/W -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException I'd bet that Tomcat's stop leaks procedure is clearing-out a static Timer reference and /then/ the ServletContextListener is trying to access it. No, it's because the same class was used as both a servlet and a listener, and the field holding the timer reference was not static. Tomcat instantiates separate objects for the servlet and listener; the timer reference was set in the servlet instance, but still void in the listener instance. An example of why not to do asymmetrical programming. - 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.
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
Hi Chris, The initial submitter had a HttpServlet implementing ServletContextListener with a non static timer, and in fact there were 2 instances of the class: the contextDestroyed method of the servletContextListener instance can't cancel the timer of the httpServlet instance (NullPointerException as he said) then Tomcat 6.0.26 stopped the leak. As Pid said there is a mix and match. To fix it, the init and destroy methods of the HttpServlet can create and cancel the timer cleanly (no more NullPointerException and no more leak). Then I just wanted to suggest a finally and a cancel in the init method to be cleaner (because if there is an OutOfMemoryError or something like that in scheduleAtFixedRate, then the leak appears again except that Tomcat 6.0.26 stops it. Thanks Konstantin). bye, Emeric Le 26/05/2010 22:33, Christopher Schultz a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Emeric, On 5/26/2010 3:52 PM, Emeric Vernat wrote: You could also eliminate the mix match and add a finally, with the following servlet code for example: public void init() throws ServletException { boolean initOk = false; mytimer = new Timer(__test__); try { TimerTask taskPerformer = new TimerTask() { public void run() { whatever_function(); } }; mytimer.scheduleAtFixedRate(taskPerformer, 10, 10, 864000); testint = 12; initOk = true; // as last } finally { if (!initOk) { mytimer.cancel(); } } } Uh what? I'm sure that does something, but ... I'm not sure what it could be. Could the OP show us the stack trace relative to the warning coming from Tomcat? I'd bet that Tomcat's stop leaks procedure is clearing-out a static Timer reference and /then/ the ServletContextListener is trying to access it. That's not supposed to happen, I'm guessing: the stop leaks stuff should run after all ServletContextListeners been notified that the context is coming down. I'm sure there is more useful information in the log file that we're not seeing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9haYACgkQ9CaO5/Lv0PCM1QCgvc2Y/SD1UJntGSBMJzo7ThBx Ty8An3wul/JusKxqjB3fRZRdikJjdI8l =z2/W -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0 always uses default host in multi-host config
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, May 26, 2010 10:23 AM To: Tomcat Users List Subject: RE: Tomcat 6.0 always uses default host in multi-host config From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config When you have a config like the OP, where each host is defined by name, not IP, in the server.xml, there is obviously some resolution of IP to name that has to take place. No, there isn't. The HTTP host header is already a name, so it's a simple string match. The only additional work is when useIPVHosts is true - the IP address has to be retrieved from the TCP/IP stack and converted to a string first. That was what I was saying. Please read in context of the thread. The topic is about what happens when useIPVHosts=true. So it seems we are in agreement here. Of course, with the it set to true, isn't the host header string ignored? Isn't that the point? If the HHS is not ignored, why? There is nothing that Tomcat has to rely on outside the server.xml to properly route the traffic. True regardless of the configuration. Anything that magically does something is a trick, even if it's a specifically coded trick. I still don't see why you think anything magic is going on; it all seems very straightforward to me. As you can see, there is nothing about how it determines the host-IP mapping. Because there isn't any. I'm not saying it isn't an advantage, but given the drawback of having traffic route inappropriately if your name resolution is not perfect, is it that great? Again, there's *no name resolution* going on - anywhere. HTTP requests come in with a host header, and that's what is normally used to determine which Host to give the message to. When you set useIPVHosts to true, you defeat this mechanism, as documented. I'm not debating that! The entire discussion is about what happens with useIPVHosts set to true! Please comment on the topic or get off the thread! 1) Set useIPVHosts to true in all Connectors. I have yet to see a valid reason to do that. The simplest, least overhead configuration is a single Connector for each port, and let the HTTP host header do the routing. You can set up the defaultHost to be one that simply returns an error if the client fails to send in a valid HTTP host header. You can also set aliases for expected synonyms of the Host name. Please go back to the OP. He had a valid reason: needing multiple/different SSL certs based on IP, and wanting to route to a specific host based on that link. My config was an alternate for achieving his desired functionality without the use of the useIPVHosts parameter. But I can see how using it might mean less typing when setting up the server.xml. I'm just trying to get some clarification on the expected use of the parameter. (I like the comment about overhead. Now you're agreeing with me on something you dinged me for two posts before.) 3) Otherwise it will make a call to the system resolver, passing the IP address to lookup and expecting a hostname in return. Nope, doesn't happen. Or really, should we do what we'd do in Apache and set up the Host elements with name=ip address instead of a text-based name, and not really worry about the text-based name at all - eliminating the need for any alias entries. No, because that eliminates the very common usage case of having multiple domains point to the same IP address; you want to be able to differentiate based on the URI of the request, not the IP address it happens to arrive on. - Chuck OK, now I'm confused. ;-) It seems that on the one hand, you are saying that with useIPVHosts=true, the IP address determines how to process, but that the host header string also controls. Remember, this discussion all started with trying to figure out how useIPVHosts is supposed to work. Please provide a detailed description of how Tomcat function with useIPVHosts set to true, or provide a link which does. Jeff (not the OP) *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments.
Re: stuck confused an need help please
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yucca Nel, On 5/24/2010 2:37 PM, Yucca Nel wrote: java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) It looks like you have a leading space before your username. How are you configuring your JDBC connection? Go check to make sure you don't have an embedded space before the name, unless that's what you intended to do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9kZ0ACgkQ9CaO5/Lv0PA5YwCgrVHS60uDTp+Tg4KHDgcPMOVB AYoAnitqzyIv4rnPYvXYWysOTERSKgQv =ekxc -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yucca Nel, On 5/24/2010 3:28 PM, Yucca Nel wrote: aplogies there are 2 users and both credentials are configured correct one for hibernate and one for tomcat Doesn't Tomcat use Hibernate? Or the other way around? Why not configure Hibernate to use Tomcat's connection pool? what I maen is that my dailyraor username is eg. and everything in mysql gets prepended with xxx like xxx_mydatabase xxx_myusername That's perfectly reasonable, especially if you're on a shared system. xxx_mytable Now that /is/ stupid: your table names shouldn't have to have your username prepended to them. This would seem to be the kind of thing you should have control over. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9kqYACgkQ9CaO5/Lv0PCFxACaAvaeYXnQY+vrcfatH5rDnE/6 OkoAn1s79kcpT+hAmUcx0abcuPuffsKx =0sY0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
apache 2 + tomcat 6 virtualhost question
Hello I'm new to tomcat and i have some experience with apache, i have a debian server with apache 2.2 + mod_jk and tomcat 6 server. My doc root for my site is /home/mydomain/htdocs and i have a site which is using a WAR which i deployed it via the tomcat manager. So far if i go to http://mydomain:8080/myapp it shows fine, but now what i need is that if i type www.mydomain.com it has to show the app directly. I've managed to create an htaccess with a 301 redirect to the url http://mydomain:8080/myapp as a temporal fix, but what i need is that when i type www.mydomain.com it goes to my app and stays with the mydomain.com url. How can i do that? do you need any config file? any help is appreciated. Thanks in advance. -- Patricio Lpez Salgado Jefe de Operaciones 2-697 9216
RE: Tomcat 6.0 always uses default host in multi-host config
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config with the it set to true, isn't the host header string ignored? Yes, it is ignored. The entire discussion is about what happens with useIPVHosts set to true! Not entirely; it's also about the merits of setting it to true, and when it's advisable or necessary to do so. It seems that on the one hand, you are saying that with useIPVHosts=true, the IP address determines how to process, but that the host header string also controls. No, I'm saying that setting useIPVHosts to true precludes the use of multiple domains that resolve to the same IP address. Remember, this discussion all started with trying to figure out how useIPVHosts is supposed to work. No, it started with how to get IP-based virtual hosting to work. Please provide a detailed description of how Tomcat function with useIPVHosts set to true, or provide a link which does. I still think the existing wording is sufficient: Set this attribute to true to cause Tomcat to use the IP address that the request was received on to determine the Host to send the request to. However, I presume you'd like additional wording to the effect that the symbolic form of the IP address must be configured as the Host name or an Alias thereof. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: stuck confused an need help please
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: stuck confused an need help please On 5/24/2010 2:37 PM, Yucca Nel wrote: java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) It looks like you have a leading space before your username. As the OP has been told numerous times. Testing indicated leading spaces were trimmed in some circumstances, but likely not all. - 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.
RE: apache 2 + tomcat 6 virtualhost question
From: Bithost Ltda. [mailto:bithost.ch...@gmail.com] Subject: apache 2 + tomcat 6 virtualhost question what i need is that when i type www.mydomain.com it goes to my app and stays with the mydomain.com url. The Tomcat side of the configuration is covered in the FAQ: http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F Not sure what you have to do with httpd, if anything (other than remove your redirect). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/26/2010 5:36 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: stuck confused an need help please On 5/24/2010 2:37 PM, Yucca Nel wrote: java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) It looks like you have a leading space before your username. As the OP has been told numerous times. FWIW, he doesn't seem to be listening. Testing indicated leading spaces were trimmed in some circumstances, but likely not all. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9lfwACgkQ9CaO5/Lv0PCZIQCfVnk42vKvdIYHOuQDxzaA7rIx 5PIAmwabFkQEqlVgSmr31N6dpq8sYluX =p04z -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: stuck confused an need help please
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: stuck confused an need help please FWIW, he doesn't seem to be listening. You noticed... - 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.
RE: Tomcat 6.0 always uses default host in multi-host config
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, May 26, 2010 4:35 PM To: Tomcat Users List Subject: RE: Tomcat 6.0 always uses default host in multi-host config From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config with the it set to true, isn't the host header string ignored? Yes, it is ignored. The entire discussion is about what happens with useIPVHosts set to true! Not entirely; it's also about the merits of setting it to true, and when it's advisable or necessary to do so. It seems that on the one hand, you are saying that with useIPVHosts=true, the IP address determines how to process, but that the host header string also controls. No, I'm saying that setting useIPVHosts to true precludes the use of multiple domains that resolve to the same IP address. Remember, this discussion all started with trying to figure out how useIPVHosts is supposed to work. No, it started with how to get IP-based virtual hosting to work. True, although the OP's lack of knowledge of how lead to the need to ask the question of why. Thus my follow-up with a link for how. Please provide a detailed description of how Tomcat function with useIPVHosts set to true, or provide a link which does. I still think the existing wording is sufficient: Set this attribute to true to cause Tomcat to use the IP address that the request was received on to determine the Host to send the request to. However, I presume you'd like additional wording to the effect that the symbolic form of the IP address must be configured as the Host name or an Alias thereof. Yes, that would be nice, or even a reminder that names won't matter a bit. Some folks can be a bit fick on such things. All the posts I've seen inquiring about this feature seem to have missed that requirement as their starting point. Answers to some of those posts lead me to believe that there was some reverse resolution going on get the correct host (suggestions to add entries to the hosts file, etc.) Thus my original confusion and request for clarity. Allow me one more attempt at a clear doc? 1) If useIPVHosts=false (default), then the host header name determines Host for processing, or default host of the Engine. 2) If useIPVHosts=true, then IP address of request determines Host for processing, providing the IP is provided as the host name, or Alias. If not found, then default host of Engine applies. 3) Nothing external to server.xml matters to Tomcat in resolving Host for processing. Does that sound accurate? Jeff (not the OP) *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0 always uses default host in multi-host config
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config Allow me one more attempt at a clear doc? 1) If useIPVHosts=false (default), then the host header name determines Host for processing, or default host of the Engine. 2) If useIPVHosts=true, then IP address of request determines Host for processing, providing the IP is provided as the host name, or Alias. If not found, then default host of Engine applies. 3) Nothing external to server.xml matters to Tomcat in resolving Host for processing. Does that sound accurate? I think so, but will have to verify by looking at current code. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache 2 + tomcat 6 virtualhost question
El 26-05-10 17:39, Caldarale, Charles R escribi: From: Bithost Ltda. [mailto:bithost.ch...@gmail.com] Subject: apache 2 + tomcat 6 virtualhost question what i need is that when i type www.mydomain.com it goes to my app and stays with the mydomain.com url. The Tomcat side of the configuration is covered in the FAQ: http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F Not sure what you have to do with httpd, if anything (other than remove your redirect). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Well it seems that such is for only one domain, and i will be deploying more than one, thats why i cant use ROOT so i hope any1 can help me a bit further. Thanks. -- Patricio Lpez Salgado Jefe de Operaciones 2-697 9216
URL Exceeding maxHttpHeaderSize
I'm running tests against a web app running in Tomcat and I was asked to test extremely long URL query strings. I've read servers should throw HTTP status 414 if the header size is too long however whenever I make the call to Tomcat there is no response; ideally I would like it to return a 414 error. I have my http connector configured with maxHttpHeaderSize=8192 -- View this message in context: http://old.nabble.com/URL-Exceeding-maxHttpHeaderSize-tp28687322p28687322.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache 2 + tomcat 6 virtualhost question
Hi Patricio, try this: 1. Redeploy your app in tomcat so it shows at http://mydomain:8080/ instead of http://mydomain:8080/myapp How you do this depends on how you deployed the app in the first place - a) if you deployed a myapp.war and use autodeploy, then rename it to ROOT.war and redeploy it b) if you are using a Context element, set its path attribute to 2. Add an AJP connector to your tomcat's conf/server.xml eg: Connector port=8009 protocol=AJP/1.3 redirectPort=8443 URIEncoding=utf8/ and restart tomcat 3. Define an apache mod_jk worker eg: /usr/local/apache2/conf/workers.properties: worker.list=myapp worker.myapp.type=ajp13 worker.myapp.host=localhost worker.myapp.port=8109 4. Add a virtual host in apache configuration: NameVirtualHost *:80 VirtualHost *:80 ServerAdmin y...@gmail.com DocumentRoot /usr/local/apache2/htdocs --- this is irrelevant because of JkMount /* ServerName www.mydomain.com #ServerAlias www.somethingelse.com ErrorLog logs/www.mydomain.com-error_log CustomLog logs/www.mydomain.com-access_log common# JkMount /* myapp /VirtualHost 5. Make sure mod_jk config is in apache conf: IfModule jk_module JkWorkersFile /usr/local/apache2/conf/workers.properties JkShmFile /usr/local/apache2/logs/mod_jk.shm JkLogFile /usr/local/apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] /IfModule Restart apache. In that case files in /home/mydomain/htdocs are no longer relevant. On Wed, May 26, 2010 at 11:32 PM, Bithost Ltda. bithost.ch...@gmail.comwrote: Hello I'm new to tomcat and i have some experience with apache, i have a debian server with apache 2.2 + mod_jk and tomcat 6 server. My doc root for my site is /home/mydomain/htdocs and i have a site which is using a WAR which i deployed it via the tomcat manager. So far if i go to http://mydomain:8080/myapp it shows fine, but now what i need is that if i type www.mydomain.com it has to show the app directly. I've managed to create an htaccess with a 301 redirect to the url http://mydomain:8080/myapp as a temporal fix, but what i need is that when i type www.mydomain.com it goes to my app and stays with the mydomain.comurl. How can i do that? do you need any config file? any help is appreciated. Thanks in advance. -- Patricio López Salgado Jefe de Operaciones 2-697 9216 http://www.bithost.cl -- Why? Because YES!
Re: apache 2 + tomcat 6 virtualhost question
Small mistake - put worker.myapp.port=8009 instead of worker.myapp.port=8109 (port needs to be the same as the one in tomcat's conf/server.xml Connector port=8009 protocol=AJP/1.3 .. ) On Thu, May 27, 2010 at 12:31 AM, Borut Hadžialić borut.hadzia...@gmail.com wrote: Hi Patricio, try this: 1. Redeploy your app in tomcat so it shows at http://mydomain:8080/instead of http://mydomain:8080/myapp How you do this depends on how you deployed the app in the first place - a) if you deployed a myapp.war and use autodeploy, then rename it to ROOT.war and redeploy it b) if you are using a Context element, set its path attribute to 2. Add an AJP connector to your tomcat's conf/server.xml eg: Connector port=8009 protocol=AJP/1.3 redirectPort=8443 URIEncoding=utf8/ and restart tomcat 3. Define an apache mod_jk worker eg: /usr/local/apache2/conf/workers.properties: worker.list=myapp worker.myapp.type=ajp13 worker.myapp.host=localhost worker.myapp.port=8109 4. Add a virtual host in apache configuration: NameVirtualHost *:80 VirtualHost *:80 ServerAdmin y...@gmail.com DocumentRoot /usr/local/apache2/htdocs --- this is irrelevant because of JkMount /* ServerName www.mydomain.com #ServerAlias www.somethingelse.com ErrorLog logs/www.mydomain.com-error_log CustomLog logs/www.mydomain.com-access_log common# JkMount /* myapp /VirtualHost 5. Make sure mod_jk config is in apache conf: IfModule jk_module JkWorkersFile /usr/local/apache2/conf/workers.properties JkShmFile /usr/local/apache2/logs/mod_jk.shm JkLogFile /usr/local/apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] /IfModule Restart apache. In that case files in /home/mydomain/htdocs are no longer relevant. On Wed, May 26, 2010 at 11:32 PM, Bithost Ltda. bithost.ch...@gmail.comwrote: Hello I'm new to tomcat and i have some experience with apache, i have a debian server with apache 2.2 + mod_jk and tomcat 6 server. My doc root for my site is /home/mydomain/htdocs and i have a site which is using a WAR which i deployed it via the tomcat manager. So far if i go to http://mydomain:8080/myapp it shows fine, but now what i need is that if i type www.mydomain.com it has to show the app directly. I've managed to create an htaccess with a 301 redirect to the url http://mydomain:8080/myapp as a temporal fix, but what i need is that when i type www.mydomain.com it goes to my app and stays with the mydomain.com url. How can i do that? do you need any config file? any help is appreciated. Thanks in advance. -- Patricio López Salgado Jefe de Operaciones 2-697 9216 http://www.bithost.cl -- Why? Because YES! -- Why? Because YES!
RE: Tomcat 6.0 always uses default host in multi-host config
Thanks for working through this with me Chuck. Sorry for the frustration. Probably should have started MY inquiry off as a new thread. Now that I got how useIPVhosts works (probably), did you see any drawbacks to setting up multiple Services to achieve what the original poster was going for, i.e. multiple hosts with unique SSL certificates? (other than the obvious amount of typing involved) I'm thinking technical performance issues. I can see the usefulness of using useIPVHosts instead of multiple services if one is using SSL. Only one port 80 connector to handle the non-SSL traffic. For an everything SSL setup, that's a benefit for the initial non-SSL connection that gets redirected to SSL. In fact, I'd say the only real need for it is when you are doing SSL and can't use a wildcard-SSL cert, e.g. www.example1.com, www.example2.com, etc. Just have to remember that hostnames in the server.xml are primarily for documentation, and you really need an Alias for the IP address. Thanks again. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, May 26, 2010 5:05 PM To: Tomcat Users List Subject: RE: Tomcat 6.0 always uses default host in multi-host config From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Tomcat 6.0 always uses default host in multi-host config Allow me one more attempt at a clear doc? 1) If useIPVHosts=false (default), then the host header name determines Host for processing, or default host of the Engine. 2) If useIPVHosts=true, then IP address of request determines Host for processing, providing the IP is provided as the host name, or Alias. If not found, then default host of Engine applies. 3) Nothing external to server.xml matters to Tomcat in resolving Host for processing. Does that sound accurate? I think so, but will have to verify by looking at current code. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC security/impersonation question
Hi, Just a dumb question from a newbe but if I implement any type of security with TC then under what identity will the invoked WS stack object execute the request? Specifically, if I enable Kerberos authentication between the requesting application and TC does this guarantee the WS stack executes the requestor's request under the identity of the actual originating requestor? Much appreciated, Tim. The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy. _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: apache 2 + tomcat 6 virtualhost question
El 26-05-10 18:31, Borut Hadžialić escribió: Hi Patricio, try this: 1. Redeploy your app in tomcat so it shows at http://mydomain:8080/ instead of http://mydomain:8080/myapp How you do this depends on how you deployed the app in the first place - a) if you deployed a myapp.war and use autodeploy, then rename it to ROOT.war and redeploy it b) if you are using a Context element, set its path attribute to 2. Add an AJP connector to your tomcat's conf/server.xml eg: Connector port=8009 protocol=AJP/1.3 redirectPort=8443 URIEncoding=utf8/ and restart tomcat 3. Define an apache mod_jk worker eg: /usr/local/apache2/conf/workers.properties: worker.list=myapp worker.myapp.type=ajp13 worker.myapp.host=localhost worker.myapp.port=8109 4. Add a virtual host in apache configuration: NameVirtualHost *:80 VirtualHost *:80 ServerAdmin y...@gmail.com mailto:y...@gmail.com DocumentRoot /usr/local/apache2/htdocs --- this is irrelevant because of JkMount /* ServerName www.mydomain.com http://www.mydomain.com #ServerAlias www.somethingelse.com http://www.somethingelse.com ErrorLog logs/www.mydomain.com-error_log CustomLog logs/www.mydomain.com-access_log common# JkMount /* myapp /VirtualHost 5. Make sure mod_jk config is in apache conf: IfModule jk_module JkWorkersFile /usr/local/apache2/conf/workers.properties JkShmFile /usr/local/apache2/logs/mod_jk.shm JkLogFile /usr/local/apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] /IfModule Restart apache. In that case files in /home/mydomain/htdocs are no longer relevant. On Wed, May 26, 2010 at 11:32 PM, Bithost Ltda. bithost.ch...@gmail.com mailto:bithost.ch...@gmail.com wrote: Hello I'm new to tomcat and i have some experience with apache, i have a debian server with apache 2.2 + mod_jk and tomcat 6 server. My doc root for my site is /home/mydomain/htdocs and i have a site which is using a WAR which i deployed it via the tomcat manager. So far if i go to http://mydomain:8080/myapp it shows fine, but now what i need is that if i type www.mydomain.com http://www.mydomain.com it has to show the app directly. I've managed to create an htaccess with a 301 redirect to the url http://mydomain:8080/myapp as a temporal fix, but what i need is that when i type www.mydomain.com http://www.mydomain.com it goes to my app and stays with the mydomain.com http://mydomain.com url. How can i do that? do you need any config file? any help is appreciated. Thanks in advance. -- Patricio López Salgado Jefe de Operaciones 2-697 9216 http://www.bithost.cl -- Why? Because YES! Hello I appreciate this very helpful guide, i have some of these configs already in motion (got the ajp connector port, workers.properties and mod_jk included in apache), but what if i have more than 2 sites which need the same way of deploy (virtualhosting), in that case i can't deploy it under mydomain.com:8080, it has to be under mydomain.com:8080/myapp Thanks for your time.
Re: apache 2 + tomcat 6 virtualhost question
In that case you can have one tomcat instance per application. Each application can run inside its own tomcat process and have different ajp port, mod_jk worker and apache virtual host. On Thu, May 27, 2010 at 1:29 AM, Bithost Ltda. bithost.ch...@gmail.com wrote: El 26-05-10 18:31, Borut Hadžialić escribió: Hi Patricio, try this: 1. Redeploy your app in tomcat so it shows at http://mydomain:8080/ instead of http://mydomain:8080/myapp How you do this depends on how you deployed the app in the first place - a) if you deployed a myapp.war and use autodeploy, then rename it to ROOT.war and redeploy it b) if you are using a Context element, set its path attribute to 2. Add an AJP connector to your tomcat's conf/server.xml eg: Connector port=8009 protocol=AJP/1.3 redirectPort=8443 URIEncoding=utf8/ and restart tomcat 3. Define an apache mod_jk worker eg: /usr/local/apache2/conf/workers.properties: worker.list=myapp worker.myapp.type=ajp13 worker.myapp.host=localhost worker.myapp.port=8109 4. Add a virtual host in apache configuration: NameVirtualHost *:80 VirtualHost *:80 ServerAdmin y...@gmail.com mailto:y...@gmail.com DocumentRoot /usr/local/apache2/htdocs --- this is irrelevant because of JkMount /* ServerName www.mydomain.com http://www.mydomain.com # ServerAlias www.somethingelse.com http://www.somethingelse.com ErrorLog logs/www.mydomain.com-error_log CustomLog logs/www.mydomain.com-access_log common# JkMount /* myapp /VirtualHost 5. Make sure mod_jk config is in apache conf: IfModule jk_module JkWorkersFile /usr/local/apache2/conf/workers.properties JkShmFile /usr/local/apache2/logs/mod_jk.shm JkLogFile /usr/local/apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] /IfModule Restart apache. In that case files in /home/mydomain/htdocs are no longer relevant. On Wed, May 26, 2010 at 11:32 PM, Bithost Ltda. bithost.ch...@gmail.com mailto:bithost.ch...@gmail.com wrote: Hello I'm new to tomcat and i have some experience with apache, i have a debian server with apache 2.2 + mod_jk and tomcat 6 server. My doc root for my site is /home/mydomain/htdocs and i have a site which is using a WAR which i deployed it via the tomcat manager. So far if i go to http://mydomain:8080/myapp it shows fine, but now what i need is that if i type www.mydomain.com http://www.mydomain.com it has to show the app directly. I've managed to create an htaccess with a 301 redirect to the url http://mydomain:8080/myapp as a temporal fix, but what i need is that when i type www.mydomain.com http://www.mydomain.com it goes to my app and stays with the mydomain.com http://mydomain.com url. How can i do that? do you need any config file? any help is appreciated. Thanks in advance. -- Patricio López Salgado Jefe de Operaciones 2-697 9216 http://www.bithost.cl -- Why? Because YES! Hello I appreciate this very helpful guide, i have some of these configs already in motion (got the ajp connector port, workers.properties and mod_jk included in apache), but what if i have more than 2 sites which need the same way of deploy (virtualhosting), in that case i can't deploy it under mydomain.com:8080, it has to be under mydomain.com:8080/myapp Thanks for your time. -- Why? Because YES! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache 2 + tomcat 6 virtualhost question
On Wed, May 26, 2010 at 4:29 PM, Bithost Ltda. bithost.ch...@gmail.com wrote: I appreciate this very helpful guide, i have some of these configs already in motion (got the ajp connector port, workers.properties and mod_jk included in apache), but what if i have more than 2 sites which need the same way of deploy (virtualhosting), in that case i can't deploy it under mydomain.com:8080, it has to be under mydomain.com:8080/myapp Frankly, I wouldn't do any of the above. Set up your Tomcat for named virtual hosting and use mod_proxy on the httpd to forward requests for those hosts, i.e. anything that isn't being served direct from httpd. Much, much simpler. :-) -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Stopping a Timer in contextDestroyed() to avoid memory leaks results in a NullPointerException
On 26/05/2010 21:33, Christopher Schultz wrote: I'd bet that Tomcat's stop leaks procedure is clearing-out a static Timer reference and /then/ the ServletContextListener is trying to access it. I'll take that bet. How much ;) That's not supposed to happen, I'm guessing: the stop leaks stuff should run after all ServletContextListeners been notified that the context is coming down. No need for guess work. This is *open* source after all. http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_26/java/org/apache/catalina/core/StandardContext.java?view=annotate In particular, lines: - 4569 the stop() method - 4615 stopping the listeners - 4649 stopping the loader (which will stop the class loader, which triggers the clearReferences() method which will stop the timer threads) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0 always uses default host in multi-host config
Allow me one more attempt at a clear doc? 1) If useIPVHosts=false (default), then the host header name determines Host for processing, or default host of the Engine. 2) If useIPVHosts=true, then IP address of request determines Host for processing, providing the IP is provided as the host name, or Alias. If not found, then default host of Engine applies. The actual rule is that Tomcat uses the value of request.getLocalName() to determine the Host. So this is not completely true if you are using an AJP connector. In this case, Tomcat uses the ServerName for the VirtualHost that Apache picks. So if Apache is using named virtual hosts, they you get the one that it resolved to in Apache. If you are using a HTTP/1.1 connector, then this is the name that the IP address resolves to on the machine where Tomcat is running. The useIPVHosts=true is useful when running with an AJP connector if you have a lot of ServerAlias directives and/or change them often. It means that the admin only needs to make the change to Apache without having to make the corresponding change to Tomcat. 3) Nothing external to server.xml matters to Tomcat in resolving Host for processing. Well, not other than DNS resolution for a HTTP/1.1 connector when using true. If you change the DNS name of the machine, then you need to change server.xml as well. Does that sound accurate? Jeff (not the OP) *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: apache 2 + tomcat 6 virtualhost question
From: Bithost Ltda. [mailto:bithost.ch...@gmail.com] Subject: Re: apache 2 + tomcat 6 virtualhost question Well it seems that such is for only one domain, and i will be deploying more than one, thats why i cant use ROOT Then declare multiple Host elements in Tomcat, each with its own appBase setting, and using ROOT as the default webapp for each. The doc is here: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html And some getting started examples for the above: http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts Are you using httpd for something other than routing traffic to Tomcat (e.g., running PHP)? If not, why do you have 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache 2 + tomcat 6 virtualhost question
El 26-05-10 23:11, Caldarale, Charles R escribi: From: Bithost Ltda. [mailto:bithost.ch...@gmail.com] Subject: Re: apache 2 + tomcat 6 virtualhost question Well it seems that such is for only one domain, and i will be deploying more than one, thats why i cant use ROOT Then declare multiple Host elements in Tomcat, each with its own appBase setting, and using ROOT as the default webapp for each. The doc is here: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html And some getting started examples for the above: http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts Are you using httpd for something other than routing traffic to Tomcat (e.g., running PHP)? If not, why do you have 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Yes I do host other php sites which do not use/have any java app, thats why i still need apache. -- Patricio Lpez Salgado Jefe de Operaciones 2-697 9216
Re: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message
Thanks guys for you replys, Carl - Please update this thread with results of your check for 6u20. I've decided to install x86 version of JDK - jdk-6u7-linux-i586.bin (stability is my main concern now) So in my installation I just installed jdk-6u7-linux-i586.bin version. 1. Changed symlink: # rm jdk # ln -s jdk1.6.0_07 jdk 2. Updated paths with: # alternatives --remove jar /srv/jdk1.6.0_18/bin/jar # alternatives --remove java /srv/jdk1.6.0_18/bin/java # alternatives --remove javac /srv/jdk1.6.0_18/bin/javac 100 # alternatives --install /usr/bin/java java /srv/jdk1.6.0_07/bin/java 100 # alternatives --install /usr/bin/jar jar /srv/jdk1.6.0_07/bin/jar 100 # alternatives --install /usr/bin/javac javac /srv/jdk1.6.0_07/bin/javac 100 # /usr/sbin/alternatives --config java There are 2 programs which provide 'java'. SelectionCommand --- *+ 1 /srv/jdk1.6.0_18/bin/java 2 /srv/jdk1.6.0_07/bin/java Enter to keep the current selection[+], or type selection number: 2 # java -version java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) 3. Updated setenv.sh to some basic defaults: # cat /srv/tomcat/bin/setenv.sh export JAVA_HOME=/srv/jdk export PATH=${PATH}:${JAVA_HOME}/bin/ # CATALINA_OPTS=-server -XX:+UseParallelGC -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Djava.awt.headless=true CATALINA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true export CATALINA_OPTS export CATALINA_PID=$CATALINA_HOME/tomcat.pid I'm going to monitor this server and see how it goes. Best Regards, Leon Kolchinsky On Thu, May 27, 2010 at 00:20, Carl c...@etrak-plus.com wrote: I am the person who reported occasional but persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above. I did go back to 6u7 and the application has run without a burp for three months. I had tested 6u18/6u19, both of which produced the same result. I am getting ready to start testing 6u20 as I would like to keep current so I don't have any security issues hanging out. Thanks, Carl - Original Message - From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, May 26, 2010 8:00 AM Subject: RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message From: Caldarale, Charles R Subject: RE: Tomcat died on java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new. Out of swap space? message The current JVM version is 6u20, so you might want to try running with that before filing a bug report or expanding the swap file. Should also mention that another Tomcat admin reported occasional but persistent abrupt terminations of the 1.6 JVM on levels 6u10 and above, but went back to 6u7 and that appeared to rectify the problem. I think the highest level he had tested was 6u17, but I'm not positive. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org