Tomcat blocks many threads

2009-10-05 Thread trucbinh

Hi,
  I used Yourkit Profiler to check my web application, and I found that 
many http threads are blocked here.
org.apache.jasper.servlet.JspServletWrapper.service(HttpServletRequest, 
HttpServletResponse, boolean) (The method calls itself recursively)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterInvocation) 

org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)

java.util.Vector.size()
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(Object)
java.util.Vector.get(int)
org.apache.tomcat.util.net.AprEndpoint.recycleWorkerThread(AprEndpoint$Worker) 

org.apache.jsp.sessionexpired_jsp._jspService(HttpServletRequest, 
HttpServletResponse)
org.apache.jsp.WEB_002dINF.jsp.trade.orderslist_jsp._jspx_meth_fmt_005fformatNumber_005f0(JspTag, 
PageContext, int[])
org.apache.jsp.WEB_002dINF.jsp.layouts.common_005flayout_jsp._jspService(HttpServletRequest, 
HttpServletResponse)
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(long) 
(The method calls itself recursively)
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(Connection, 
Method, Object[])
sun.misc.Launcher$AppClassLoader.loadClass(String, boolean) (The method 
calls itself recursively




Does anyone have solution for this?
I use JDK 1.06_13, spring and run with server tomcat.

Thanks and Best regards,
Binh.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread subrahmanyam

Hi,
After tomcat running 3,4 days well with 75 users, suddenly we are facing
InvocationTargetException caused by OutOfMemoryError for 3,4 users some
times. The JAVA_OPTS options are well configured as observed no heap error
issue. Heap utilization is only 60% but Foud that CodeCache is reaching
maximum always. But codecache is non heap. Currently everyday out of
production time we are restarting server to avoid sudden exception in
production. The following is the exception we received as suggestion of
finding the root cause.

In exception logs there is no permgen space erorr or heap error. Observed by
probe after 2/3days codecache is becoming full only results in OutOfMemory
as below


java.lang.reflect.InvocationTargetException at
sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
at
org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100(AggregatorProcessor.java:38)
at
org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl(AggregatorProcessor.java:93)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)

...
at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:368)
at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:387)
at
com.expeditor.processors.SingleTaskData.generateData(SingleTaskData.java:85)
at sun.reflect.GeneratedMethodAccessor2048.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
..
at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
at
org.orbeon.oxf.portlet.OPSPortletDelegate.forward(OPSPortletDelegate.java:253)
at
org.orbeon.oxf.externalcontext.PortletToExternalContextRequestDispatcherWrapper.forward(PortletToExternalContextRequestDispatcherWrapper.java:35)
at
org.orbeon.oxf.xforms.XFormsSubmissionUtils.openOptimizedConnection(XFormsSubmissionUtils.java:108)
at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:768)
at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:1283)



at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.OutOfMemoryError
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at
org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2(ReflectionIClass.java)
at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
at o 
-- 
View this message in context: 
http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25745877.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: Cannot set remote address in valve (Tomcat 5.5)

2009-10-05 Thread Elli Albek

- Original Message -
From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, 2 Oct 2009 07:32:06 -0700 (PDT)
Subject: Re: Cannot set remote address in valve (Tomcat 5.5)


 2. There are other valves like request filters that cannot work without the
 correct IP, as well as custom login valve.

 Filters should be OK providing they are defined in the right order.

 Aren't all Valves always called before Filters?

To be more specific, i was referring to a request filter that is implemented 
as a valve, not as a servlet filter. One is shipped with tomcat already for 
filtering IPs. That valve does not work behind a load balancer or a reverse 
proxy.

E

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot set remote address in valve (Tomcat 5.5)

2009-10-05 Thread Elli Albek
To make it clear, valves are executed around the web apps, so they are executed 
before the request gets to any servlet filter. Servlet filter behavior is 
defined by the Servlet specification. Valves are tomcat specific classes that 
contain some core server functionality that is not defined by the spec as an 
interface.

E

- Original Message -
From: Tim Funk funk...@apache.org
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, 2 Oct 2009 07:46:14 -0700 (PDT)
Subject: Re: Cannot set remote address in valve (Tomcat 5.5)

Context filters are executed before webapp filters. I believe (but not 
confirmed) that valves execute before the filters.

-Tim

Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Mark,
 
 On 10/2/2009 5:55 AM, Mark Thomas wrote:
 Elli Albek wrote:
 A few reasons why not to do this as a servlet filter:

 1. There are many web apps on the server and I don't want to include the
 filter in each.
 You don't have to. Configure it in the global web.xml.
 
 Are the filters configured in conf/web.xml considered before those in
 WEB-INF/web.xml... that is, will they be called before the
 webapp-defined ones?
 
 2. There are other valves like request filters that cannot work without the
 correct IP, as well as custom login valve.
 Filters should be OK providing they are defined in the right order.
 
 Aren't all Valves always called before Filters?
 


-
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: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

2009-10-05 Thread Peter Crowther
2009/10/5 Linux sysadmin sysad...@pattersunx.com:
  The truth is that i make a link from the ${catalina.home}/conf in the
 ${catalina.base}/conf regarding the web.conf, thus it's the default from
 tomcat original distribution ...

This should work for conf, but be very careful about symbolic links
and Tomcat in general.  Symlinks in webapps will not work by default -
look up allowLinking to allow them, and be Very Careful if you do as
I seem to recall that undeploying a webapp with a symlink in it can
delete all the files in the area that you've linked to.

Many UNIX admins are used to being able to use symlinks and they Just
Work.  This is not always true for Java in general, and Tomcat in
particular.

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot set remote address in valve (Tomcat 5.5)

2009-10-05 Thread Cyrille Le Clerc
Hello Christopher,

Using a Remote IP Filtering Valve/Servlet Filter can be a bit tricky
with a proxy or a load balancer because, by default, you loose the
actual remote ip and just get the IP of the proxy or load balancer.

However, these proxies and load balancer (Apache mod_proxy, F5 Big IP,
Alteon, Squid, etc) add an HTTP Header commomly named X-Forwarded-For
(or X-Client-IP) to transmit the actual remote IP.

Apache Httpd will integrate the mod_remoteip
(http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html) module to
handle X-Forwarded-For header at the Apache Httpd layer.

Here are two java ports of mod_remoteip to handle X-Forwarded-For at
the Tomcat level with a valve and at the WAR level with a servlet
filter : RemoteIpValve
(http://code.google.com/p/xebia-france/wiki/RemoteIpValve) and
XForwardedFilter
(http://code.google.com/p/xebia-france/wiki/XForwardedFilter). In
addition to handle X-Forwarded-For, they also integrate
X-Forwarded-Proto (http or https).
Thanks to this, request.getRemoteAddr(), request.getRemoteHost(),
request.isSecure(), request.getScheme() and request.getServerPort()
will expose the values transmitted by X-Forwarded-For and
X-Forwarded-Proto rather than the values of the preceding proxy / load
balancer.

For your need, preceding  the RemoteAddrValve by the RemoteIpValve
would allow you to get the actual client IP,

The RemoteIpValve has been proposed to the Tomcat project as Bug 47330
- proposal : port of mod_remoteip in Tomcat as RemoteIpValve
(https://issues.apache.org/bugzilla/show_bug.cgi?id=47330) .

Hope this helps,

Cyrille

--
Cyrille Le Clerc
clecl...@xebia.fr cyri...@cyrilleleclerc.com
http://blog.xebia.fr

On Mon, Oct 5, 2009 at 12:43 PM, Elli Albek e...@sustainlane.com wrote:

 - Original Message -
 From: Christopher Schultz ch...@christopherschultz.net
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, 2 Oct 2009 07:32:06 -0700 (PDT)
 Subject: Re: Cannot set remote address in valve (Tomcat 5.5)


  2. There are other valves like request filters that cannot work without the
  correct IP, as well as custom login valve.
 
  Filters should be OK providing they are defined in the right order.

  Aren't all Valves always called before Filters?

 To be more specific, i was referring to a request filter that is 
 implemented as a valve, not as a servlet filter. One is shipped with tomcat 
 already for filtering IPs. That valve does not work behind a load balancer or 
 a reverse proxy.

 E

 -
 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 blocks many threads

2009-10-05 Thread Pid

On 05/10/2009 07:27, trucbinh wrote:

Hi,
I used Yourkit Profiler to check my web application, and I found that
many http threads are blocked here.
org.apache.jasper.servlet.JspServletWrapper.service(HttpServletRequest,
HttpServletResponse, boolean) (The method calls itself recursively)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest,
ServletResponse)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterInvocation)

org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(ServletRequest,
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse)
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ServletRequest,
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse)
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(ServletRequest,
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse)
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(ServletRequest,
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse)
java.util.Vector.size()
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(Object)
java.util.Vector.get(int)
org.apache.tomcat.util.net.AprEndpoint.recycleWorkerThread(AprEndpoint$Worker)

org.apache.jsp.sessionexpired_jsp._jspService(HttpServletRequest,
HttpServletResponse)
org.apache.jsp.WEB_002dINF.jsp.trade.orderslist_jsp._jspx_meth_fmt_005fformatNumber_005f0(JspTag,
PageContext, int[])
org.apache.jsp.WEB_002dINF.jsp.layouts.common_005flayout_jsp._jspService(HttpServletRequest,
HttpServletResponse)
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(long)
(The method calls itself recursively)
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(Connection,
Method, Object[])
sun.misc.Launcher$AppClassLoader.loadClass(String, boolean) (The method
calls itself recursively



Does anyone have solution for this?
I use JDK 1.06_13, spring and run with server tomcat.

Thanks and Best regards,
Binh.


Editing and sending a reply to an existing thread is called thread 
hijacking.  Please start a new thread for your question.



p



-
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



Tomcat blocks many threads

2009-10-05 Thread trucbinh

Hi,
  I used Yourkit Profiler to check my web application, and I found that 
many http threads are blocked here.


org.apache.jasper.servlet.JspServletWrapper.service(HttpServletRequest, 
HttpServletResponse, boolean) (The method calls itself recursively)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterInvocation) 

org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(ServletRequest, 
ServletResponse, FilterChain)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, 
ServletResponse)

java.util.Vector.size()
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(Object)
java.util.Vector.get(int)
org.apache.tomcat.util.net.AprEndpoint.recycleWorkerThread(AprEndpoint$Worker) 

org.apache.jsp.sessionexpired_jsp._jspService(HttpServletRequest, 
HttpServletResponse)
org.apache.jsp.WEB_002dINF.jsp.trade.orderslist_jsp._jspx_meth_fmt_005fformatNumber_005f0(JspTag, 
PageContext, int[])
org.apache.jsp.WEB_002dINF.jsp.layouts.common_005flayout_jsp._jspService(HttpServletRequest, 
HttpServletResponse)
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(long) 
(The method calls itself recursively)
com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(Connection, 
Method, Object[])
sun.misc.Launcher$AppClassLoader.loadClass(String, boolean) (The method 
calls itself recursively




Do you have solution for this?
I use JDK 1.06_13, spring and run with server tomcat.

Thanks and Best regards,
Binh.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Help management access

2009-10-05 Thread Mark Thomas
Jared Southern wrote:
 P.S. nice pic's of turkey.

Huh?

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat blocks many threads

2009-10-05 Thread Mark Thomas
trucbinh wrote:
 Hi,
   I used Yourkit Profiler to check my web application, and I found that
 many http threads are blocked here.
 
 org.apache.jasper.servlet.JspServletWrapper.service(HttpServletRequest,
 HttpServletResponse, boolean) (The method calls itself recursively)
No, it doesn't.

 Do you have solution for this?
For what? It isn't clear what the problem is. Try taking two thread
dumps ~15s apart and look to see which threads haven't moved in that 15s
perdiod.

 I use JDK 1.06_13, spring and run with server tomcat.
Which Tomcat version?

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Help management access

2009-10-05 Thread Jared Southern

Sorry Mark,
I was getting you mixed up with Tony, he's got pictures of turkey on his 
website. :-)
RegardsJared

 Date: Mon, 5 Oct 2009 09:44:19 +0100
 From: ma...@apache.org
 To: users@tomcat.apache.org
 Subject: Re: Help management access
 
 Jared Southern wrote:
  P.S. nice pic's of turkey.
 
 Huh?
 
 Mark
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
Save time by using Hotmail to access your other email accounts.
http://clk.atdmt.com/UKM/go/167688463/direct/01/

Re: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread Pid Ster
What are your JAVA_OPTS?
How much memory Is in the machine?
OS? JVM version? Tomcat version?

p

--
pidster.com
(mobile)


On 5 Oct 2009, at 07:48, subrahmanyam venkata.ad...@genpact.com wrote:


 Hi,
 After tomcat running 3,4 days well with 75 users, suddenly we are
 facing
 InvocationTargetException caused by OutOfMemoryError for 3,4 users
 some
 times. The JAVA_OPTS options are well configured as observed no heap
 error
 issue. Heap utilization is only 60% but Foud that CodeCache is
 reaching
 maximum always. But codecache is non heap. Currently everyday out of
 production time we are restarting server to avoid sudden exception in
 production. The following is the exception we received as suggestion
 of
 finding the root cause.

 In exception logs there is no permgen space erorr or heap error.
 Observed by
 probe after 2/3days codecache is becoming full only results in
 OutOfMemory
 as below


 java.lang.reflect.InvocationTargetException at
 sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.orbeon.oxf.processor.SimpleProcessor$1.readImpl
 (SimpleProcessor.java:70)
 at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:
 995)
 at
 org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read
 (ProcessorImpl.java:1178)
 at org.orbeon.oxf.processor.JavaProcessor$1.readImpl
 (JavaProcessor.java:66)
 at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:
 995)
 at
 org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read
 (ProcessorImpl.java:1178)
 at
 org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX
 (ProcessorImpl.java:350)
 at
 org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100
 (AggregatorProcessor.java:38)
 at
 org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl
 (AggregatorProcessor.java:93)
 at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:
 995)
 
 ...
 at
 org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J
 (ProcessorImpl.java:368)
 at
 org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J
 (ProcessorImpl.java:387)
 at
 com.expeditor.processors.SingleTaskData.generateData
 (SingleTaskData.java:85)
 at sun.reflect.GeneratedMethodAccessor2048.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.orbeon.oxf.processor.SimpleProcessor$1.readImpl
 (SimpleProcessor.java:70)
 at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:
 995)
 at
 org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read
 (ProcessorImpl.java:1178)
 at org.orbeon.oxf.processor.JavaProcessor$1.readImpl
 (JavaProcessor.java:66)
 ..
 at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
 at org.orbeon.oxf.webapp.ProcessorService.service
 (ProcessorService.java:96)
 at
 org.orbeon.oxf.portlet.OPSPortletDelegate.forward
 (OPSPortletDelegate.java:253)
 at
 org.orbeon.oxf.externalcontext.PortletToExternalContextRequestDispatcherWrapper.forward(
 PortletToExternalContextRequestDispatcherWrapper.java:35)
 at
 org.orbeon.oxf.xforms.XFormsSubmissionUtils.openOptimizedConnection
 (XFormsSubmissionUtils.java:108)
 at
 org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction
 (XFormsModelSubmission.java:768)
 at
 org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent
 (XFormsContainingDocument.java:1283)


 ---
 ---
 ---
 ---
 
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
 at
 org.apache.jk.common.ChannelSocket.processConnection
 (ChannelSocket.java:684)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt
 (ChannelSocket.java:876)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
 (ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.lang.OutOfMemoryError
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
 at java.lang.Class.getDeclaredMethods(Class.java:1791)
 at
 org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2
 (ReflectionIClass.java)
 at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
 at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
 at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
 at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
 at o
 --
 View this message in context: 
 http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25745877.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To 

Comet and mod_jk

2009-10-05 Thread Markus Innerebner

Hi all,

I see that when using Mod JK (ver. 1.2.26-2) together with Comet I
always get the message: 405 HTTP method POST is not supported by this
URL. (My servlet engine is tomcat 6.0.14)

I googled and found out that mod_jk has its own connector which does not
support the comet event.

Is there a way to solve this problem ?
E.g. specify in mod_jk to use the connector
org.apache.coyote.http11.Http11NioProtocol

If not, what else can you suggest me?

For me it is not important to use mod_jk. The important thing is that
the servlet invoked in my webpage (specified without port) is redirected
tomcat.

Many thanks

Markus

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Force access to one application in one tomcat in Clustered scenary

2009-10-05 Thread Carlos García Gómez
Hello,

I have this hardware solution

+ One HTTP/HTTPS balancer.
+ four serves 
 - Two Apaches (A1 and A2).
 - Mod_JK loadbalancer. (software)
 - Two Tomcats (T1 and T2). (CLUSTERED)

We want to use, for example, manager application.

Example: www.test.org/manager


But I would like to know in wich tomcat the session I am. Even I would like 
having something to force go to one of two Tomcat Servers.

I have tought two options:

OPTION 1: Use an HTTP port.
www.test.org:8081/manager for tomcat1
www.test.org:8082/manager for tomcat2

But I dislike it. I don´t want any application was servered in other por that 
not is 80 (HTTP).


OPTION 2: Use two xml archives.
CATALINA_HOME/conf/Catalina/www.test.org/manager1.xml
CATALINA_HOME/conf/Catalina/www.test.org/manager2.xml
And in apache 
JkMount /manager1 tomcat1
JkMount /manager2 tomcat2

but I dislike this option too because I don´t want to be creating two xmls 
archives in each Host that want to use with the application. Even must be too 
many application like manager (probe, host-manager, admin)


ANY SOLUTIONs?


Regards
-
 
Carlos García Gómez
Sistemas de Información y Comunicaciones
Fundación Integra. http://www.f-integra.org
 
Teléfono: +34 968 355161
Fax:  +34 968 355131
Correo:   carlos.gar...@f-integra.org
 
--
 
Este mensaje y los posibles documentos adjuntos al mismo son confidenciales y 
dirigidos exclusivamente a los destinatarios de los mismos. Si por un error de 
transmisión, o equivocación en la dirección de envío, usted ha recibido este 
mensaje y no es el destinatario de la información, por favor, notifíqueselo
al remitente y borre este mensaje, sin usar, informar, distribuir, imprimir, 
copiar o difundir el mensaje, total o parcialmente, por ningún medio. Gracias.

Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

2009-10-05 Thread André Warnier

Peter Crowther wrote:
...


and Tomcat in general.  Symlinks in webapps will not work by default -
look up allowLinking to allow them, and be Very Careful if you do as
I seem to recall that undeploying a webapp with a symlink in it can
delete all the files in the area that you've linked to.

As things happen, I just spent 2 hours this morning wondering why an old 
webapp that worked fine under Tomcat 4.1, didn't work anymore when moved 
to Tomcat 5.5.  Until I saw your message above, and added a context.xml 
in the webapp with allowLinking=true.
It seems that the old Tomcat 4.1 had such a Context element in 
server.xml, which disappeared in the move to 5.5.


(catalina_base)/webapps/myapp/META-INF/context.xml :
Context allowLinking=true /

did it.

Thanks.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

2009-10-05 Thread Linux sysadmin

thanks Peter for this recommendation ...
have a nice day

Peter Crowther wrote:

2009/10/5 Linux sysadmin sysad...@pattersunx.com:
  

 The truth is that i make a link from the ${catalina.home}/conf in the
${catalina.base}/conf regarding the web.conf, thus it's the default from
tomcat original distribution ...



This should work for conf, but be very careful about symbolic links
and Tomcat in general.  Symlinks in webapps will not work by default -
look up allowLinking to allow them, and be Very Careful if you do as
I seem to recall that undeploying a webapp with a symlink in it can
delete all the files in the area that you've linked to.

Many UNIX admins are used to being able to use symlinks and they Just
Work.  This is not always true for Java in general, and Tomcat in
particular.

- Peter

-
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



shutdown.sh and graceful shutdown

2009-10-05 Thread Marcoi

Hi,

from what I have read I expected tomcat to shutdown gracefully (which to me
means do not accept any other request and end the current ones before
shutdown) but my test doesen't confirm it.

I have a servlet with the following code:


for (int i = 0; i  50; i++) {
System.out.println(waiting  + i);
Thread.currentThread().sleep(500);
}
PrintWriter writer = aResponse.getWriter();
writer.write(duh);
writer.flush();


and this is the output when I issue a request and then run ./shutdown.sh


waiting 0
waiting 1
waiting 2
waiting 3
waiting 4
waiting 5
waiting 6
Oct 5, 2009 2:00:43 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8084
waiting 7
waiting 8
Oct 5, 2009 2:00:44 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 5, 2009 2:00:45 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
waiting 9
waiting 10
waiting 11
Oct 5, 2009 2:00:46 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
waiting 12
waiting 13
Oct 5, 2009 2:00:47 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Oct 5, 2009 2:00:47 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8084


As you can see it only waited for 3 seconds before taking down the server
instead to let the request end is there a way to configure how long to
wait? 

Thanks

Marco

-- 
View this message in context: 
http://www.nabble.com/shutdown.sh-and-graceful-shutdown-tp25749596p25749596.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: POST request with timeout acts weird

2009-10-05 Thread Ronald Klop

Op maandag, 5 oktober 2009 00:47 schreef André Warnier a...@ice-sa.com:


 
Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
  Ronald,
  On 10/2/2009 9:20 AM, Ronald Klop wrote:
 But I don't send any data. My servlet than waits in getParameterMap(),
 because that try's to read the inputstream and parse the parameters.
 After 20 seconds (Connector has connectionTimeout=2) the reading
 of the inputstream ends, but my application just gets an empty Map in
 stead of some TimeoutException.
  What leads you to believe that a TimeoutException would be thrown? The
 documentation for the HTTP connector's connectionTimeout attribute says:
  
 The number of milliseconds this Connector will wait, after accepting a
 connection, for the request URI line to be presented. The default value
 is 6 (i.e. 60 seconds).
 
  You provided the URI line within plenty of time. If you didn't enter
 anything, Tomcat would disconnect. Since you did, it doesn't.
 ...
Doesn't the fact that the read on the inputstream returns, imply that there is 
actually a timeout, even if it is not returned to the webapp ?

And, to Ronald : if the request is a POST, and it has a Content-length, and you 
get an empty parameter map after 20 seconds, can't you just reject the request 
as invalid ?

And, curiosity : if you set the Connector timeout to 30 seconds, does your 
inputstream then return after 30 seconds too ?







Yes it implies there is a timeout, but it is kind of guessing if it was a 
timeout or really an empty ParameterMap for the webapp. This can be 
workarounded by always including a dummyvar in the parameters as Christopher 
Shultz mentions or checking the Content-Length. But maybe Tomcat can do 
something better internally.

Yes if I set the connector timeout to 30 seconds it returns after 30 seconds.

My other workaround is doing a GET ajax in stead of POST. For this case the url 
wouldn't be too long for Internet Explorer and than more data is send at once 
over the network.

Ronald.



Re: POST request with timeout acts weird

2009-10-05 Thread Ronald Klop




Op zondag, 4 oktober 2009 22:23 schreef Christopher Schultz 
ch...@christopherschultz.net:


 


Ronald,

On 10/2/2009 9:20 AM, Ronald Klop wrote:
 But I don't send any data. My servlet than waits in getParameterMap(),
 because that try's to read the inputstream and parse the parameters.
 After 20 seconds (Connector has connectionTimeout=2) the reading
 of the inputstream ends, but my application just gets an empty Map in
 stead of some TimeoutException.

What leads you to believe that a TimeoutException would be thrown? The
documentation for the HTTP connector's connectionTimeout attribute says:


The number of milliseconds this Connector will wait, after accepting a
connection, for the request URI line to be presented. The default value
is 6 (i.e. 60 seconds).


You provided the URI line within plenty of time. If you didn't enter
anything, Tomcat would disconnect. Since you did, it doesn't.

 Why? And how should I handle this?

Honestly, I'm not sure if there's a way to check to see if all bytes
advertised in Content-Length were actually consumed by a request.

 (The real problem is that IE has some issue's and that some of my
 customers sometimes send synchronous ajax calls which don't send any
 data. I'm investigating that too. If somebody has a tip about that it is
 also appreciated.)

Technically speaking, the HTTP spec does not require the Content-Length
to be correct(!). I think this is something that your webapp is just
going to have to tolerate.

Perhaps you could add a parameter to all your requests like 'last=true'
and always make that the last parameter submitted. If the last parameter
has the value true then the POST was sane. Otherwise, reject the
request. Just a thought.

- -chris







There is even more fun about the documentation of connectionTimeout. It states 
that it waits for the URI after accepting the connection, but in my example 
Tomcat is not waiting for the URI, but for data from the request. So 
connectionTimeout does much more than what is mentioned in the documentation.

I know about the issue of interpreting the Content-Length in comination with 
charsets and Content-Encoding and Transfer-Encoding.

But I guess Tomcat does something like this.
Socket s = ...;
s.setSoTimeout(2);
InputStream in = s.getInputStream();
try {
  in.read();
} catch (SocketTimeoutException e) {
  // Ignore and give (part of the) data to the Servlet, because the specs of 
getParameter(...) gives us no room for bubbling up this exception.
}

I will verify if this is correct in the code, but I hope to illustrate what I 
puzzled by. I can't handle this situation without workarounds, while the 
problem is so simple.
I think the lazy evaluation of the POST parameters in Tomcat is making it very 
difficult to give good errors. But don't take this wrong. I'm not telling that 
the advantages of lazy evalution are bigger of smaller.

Ronald.




Re: POST request with timeout acts weird

2009-10-05 Thread André Warnier

Ronald Klop wrote:
...
There is even more fun about the documentation of connectionTimeout. It 
states that it waits for the URI after accepting the connection, but in 
my example Tomcat is not waiting for the URI, but for data from the 
request. So connectionTimeout does much more than what is mentioned in 
the documentation.


You can also look at it in another way, consistent with your 
observations so far :


- Tomcat does wait after the initial connection, for connectTimeout 
seconds, for the URI (and, I suppose, headers) to come in.

If these things do not come in in the time set, there is an error.
This is documented.
And it helps in fighting some specific types of DOS attacks.

- but, internally and undocumented, Tomcat also uses the same 
connectTimeout timeout value when it is subsequently asked to read the 
request body (for example with getParameters()).  But since the 
getParameters() method, (as per the Servlet Spec I guess) does not allow 
for a timeout exception to be returned, Tomcat merely returns an empty 
parameter map when this timeout occurs.


It appears that there is no way to explicitly set (individually) the 
timeout for reading the request body, nor to get a specific error when 
whatever timeout is being used, is exceeded.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Sharing webapps folder in tomcat cluster

2009-10-05 Thread Paolo Santarsiero
I have a load balancing cluster with two tomcat6 and one apache2.2. I use
replication sessions and all work fine. Now I'd like to use a common
webapps  folder on third machine where to put my applications and I'd like
tomcat's instances go all there to deploy and use application. I don't know
if this way is possible, because in all documentations I read that the
applications must be replicate in all tomcat webapps. Can someone help me?
Thanks


Sharing webapps folder in tomcat cluster

2009-10-05 Thread lucania

I have a load balancing cluster with two tomcat6 and one apache2.2. I use
replication sessions and all work fine. Now I'd like to use a common webapps 
folder on third machine where to put my applications and I'd like tomcat's
instances go all there to deploy and use application. I don't know if this
way is possible, because in all documentations I read that the applications
must be replicate in all tomcat webapps. Can someone help me? Thanks
-- 
View this message in context: 
http://www.nabble.com/Sharing-webapps-folder-in-tomcat-cluster-tp25750595p25750595.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: POST request with timeout acts weird

2009-10-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 10/5/2009 8:41 AM, André Warnier wrote:
 - but, internally and undocumented, Tomcat also uses the same
 connectTimeout timeout value when it is subsequently asked to read the
 request body (for example with getParameters()).  But since the
 getParameters() method, (as per the Servlet Spec I guess) does not allow
 for a timeout exception to be returned, Tomcat merely returns an empty
 parameter map when this timeout occurs.

I wonder if a partial parameter map would be returned if /some/ POST
parameters were sent, but the Content-Length was never satisfied (and
this timeout occurred).

 It appears that there is no way to explicitly set (individually) the
 timeout for reading the request body, nor to get a specific error when
 whatever timeout is being used, is exceeded.

The servlet API does not appear to support this.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrJ8w8ACgkQ9CaO5/Lv0PAmagCgqwpH4x9sam8CK4BoqG/hy+9A
R94An3ns68z6ZPg4L5xbKxgdwxTgOe/E
=k52B
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread subrahmanyam


Hi PidSter,

Out of 17 Users 5 users have reported that OutOfMemoryErrorException, Other
12 users working fine at that time also.
After clearing the cookies from IE6 browser, 4 users got resolved and 1 user
got the same issue again
.They have worked continuously for five hours before facing this issue. This
issue we are not getting frequently.
Every 2/3 days we are facing same issue with above exception, so we are
restarting servers daily.

We are using 
Tomcat 5.5 
Java Version 1.6
OS : Windows XP
System RAM size is 16 GB. We have 3 clustered nodes of each 2 GB as follows


set JAVA_OPTS=-server –Xms2048m –Xmx2048m -XX:PermSize=1024m
-XX:MaxPermSize=1024m -XX:NewSize=768m -XX:MaxNewSize=768m
-XX:SurvivorRatio=4 -Xss256K -XX:+UseParallelGC -XX:-UseGCOverheadLimit
-XX:HeapDumpPath=heaperror.log -Djava.net.preferIPv4Stack=true
-Dfile.encoding=UTF8 -Duser.timezone=EST
-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8210
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


Our application is combinations of Liferay portlet 4.2.1 + Orbeon 3.7 in
which java classes are dynamically called.

I am experienced with Heap error result in slowness and outofmemory
graduallyl earlier for all users. But this is some what memory is 60% only
using. But codechche is showing full in probe which is non-heap. (default is
48MB i think, actually it should released)

Thanks  Regards
Venkata

-- 
View this message in context: 
http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25750784.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: Sharing webapps folder in tomcat cluster

2009-10-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paolo,

No need to post twice: your messages are getting through.

On 10/5/2009 9:06 AM, Paolo Santarsiero wrote:
 Now I'd like to use a common
 webapps  folder on third machine where to put my applications and I'd like
 tomcat's instances go all there to deploy and use application. I don't know
 if this way is possible, because in all documentations I read that the
 applications must be replicate in all tomcat webapps. Can someone help me?

It should be possible to deploy the same application twice from the same
place, but you should /not/ use the same auto-deploy webapps directory
for two different Tomcat instances. If you do, they could interfere with
each other in ways that may surprise you.

Instead, put your webapp's deployment directory (or WAR file) somewhere
both machine can see it. Then, use a
conf/[servicename]/[hostname]/[contextname].xml file to define your
Context and point the docBase to your deployment directory (or WAR File).

Another question is whether this will degrade your performance since
you'll need some kind of network share available to host this webapp. Is
your webapp so big that it needs to be shared by two instances? Or, is
this sharing intended to ease upgrades, etc.?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrJ9GMACgkQ9CaO5/Lv0PD9SQCguKZE79RzOSAb8NyRMF+YRaWY
aYEAnjCLebgSZmp3j9tNXMsjgQ2ySQv1
=Uv39
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Comet and mod_jk

2009-10-05 Thread Filip Hanik - Dev Lists

There are only two connectors in Apache Tomcat that support Comet,
APR HTTP and NIO HTTP connectors.
This means, if you want Apache in front of it, you would use mod_proxy_http

Filip

On 10/05/2009 04:39 AM, Markus Innerebner wrote:

Hi all,

I see that when using Mod JK (ver. 1.2.26-2) together with Comet I
always get the message: 405 HTTP method POST is not supported by this
URL. (My servlet engine is tomcat 6.0.14)

I googled and found out that mod_jk has its own connector which does not
support the comet event.

Is there a way to solve this problem ?
E.g. specify in mod_jk to use the connector
org.apache.coyote.http11.Http11NioProtocol

If not, what else can you suggest me?

For me it is not important to use mod_jk. The important thing is that
the servlet invoked in my webpage (specified without port) is redirected
tomcat.

Many thanks

Markus

-
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: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 10/5/2009 6:26 AM, Pid Ster wrote:
 What are your JAVA_OPTS?
 How much memory Is in the machine?
 OS? JVM version? Tomcat version?

... and what makes the OP think it's a code cache problem?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrJ9akACgkQ9CaO5/Lv0PBVGACfaJQj+F7Bk6pOYMezzqgSQFNJ
TnYAoLQlR3qloGcbCR5uKsb++JdnYEyr
=xJZJ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Sharing webapps folder in tomcat cluster

2009-10-05 Thread Paolo Santarsiero
Christopher thanks for answer. I'm thinking to use this solution because the
application is very big and updates will be frequent. I had set context
descriptor and now all tomcat points to a folder on other machine. Load
balancing works fine, but when I shutdown a tomcat with a open session,
replication sessions doesn't works. What do you think?

2009/10/5 Christopher Schultz ch...@christopherschultz.net

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Paolo,

 No need to post twice: your messages are getting through.

 On 10/5/2009 9:06 AM, Paolo Santarsiero wrote:
  Now I'd like to use a common
  webapps  folder on third machine where to put my applications and I'd
 like
  tomcat's instances go all there to deploy and use application. I don't
 know
  if this way is possible, because in all documentations I read that the
  applications must be replicate in all tomcat webapps. Can someone help
 me?

 It should be possible to deploy the same application twice from the same
 place, but you should /not/ use the same auto-deploy webapps directory
 for two different Tomcat instances. If you do, they could interfere with
 each other in ways that may surprise you.

 Instead, put your webapp's deployment directory (or WAR file) somewhere
 both machine can see it. Then, use a
 conf/[servicename]/[hostname]/[contextname].xml file to define your
 Context and point the docBase to your deployment directory (or WAR File).

 Another question is whether this will degrade your performance since
 you'll need some kind of network share available to host this webapp. Is
 your webapp so big that it needs to be shared by two instances? Or, is
 this sharing intended to ease upgrades, etc.?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkrJ9GMACgkQ9CaO5/Lv0PD9SQCguKZE79RzOSAb8NyRMF+YRaWY
 aYEAnjCLebgSZmp3j9tNXMsjgQ2ySQv1
 =Uv39
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Comet and mod_jk

2009-10-05 Thread Markus Innerebner

Filip Hanik - Dev Lists wrote:

There are only two connectors in Apache Tomcat that support Comet,
APR HTTP and NIO HTTP connectors.
This means, if you want Apache in front of it, you would use mod_proxy_http

Many thanks for your suggestion.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat5.5.27 not processing UTF8 encoded cookies

2009-10-05 Thread realta

I've recently had to upgrade from Tomcat5.5.20 to Tomcat5.5.27. For the main
functionality of the web application to work it needs to process a UTF8
encoded cookies to retrieve user customizations. There was no issue with the
5.5.20 version, but the 5.5.27 version is not processing the UTF8 encoded
cookie. It looks like 5.5.27 version is ignoring the UTF8 cookies.

I did find a bug report saying the security around cookie handling has
become stricter from Tomcat5.5.26 onwards. Could anybody point me in the
right direction of a spec that outlines the correct encoding to use on
cookies that Tomcat5.5.26 and greater will accept?
-- 
View this message in context: 
http://www.nabble.com/Tomcat5.5.27-not-processing-UTF8-encoded-cookies-tp25752559p25752559.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



Alias URL

2009-10-05 Thread Johnson, Rob E

Hi,

I have apache tomcat 5.5 installed and I am trying to setup an alias
url.  

Our host directory is localhost and we have a site called webtop.  I
have create an alias on our DNS (IIS) server http://webtop.  I want a
user to enter this url and have it open http://localhost:8080/webtop.

I've tried a number of settings in the server.xml file but nothing has
worked yet.

Thanks,

Rob

Rob Johnson MBA/IT
IT Specialist
Minerals Management Service
303-231-3963
303-589-9278 (Cell)




Re: Tomcat5.5.27 not processing UTF8 encoded cookies

2009-10-05 Thread Mark Thomas
realta wrote:
 I've recently had to upgrade from Tomcat5.5.20 to Tomcat5.5.27. For the main
 functionality of the web application to work it needs to process a UTF8
 encoded cookies to retrieve user customizations. There was no issue with the
 5.5.20 version, but the 5.5.27 version is not processing the UTF8 encoded
 cookie. It looks like 5.5.27 version is ignoring the UTF8 cookies.
 
 I did find a bug report saying the security around cookie handling has
 become stricter from Tomcat5.5.26 onwards. Could anybody point me in the
 right direction of a spec that outlines the correct encoding to use on
 cookies that Tomcat5.5.26 and greater will accept?

https://issues.apache.org/bugzilla/show_bug.cgi?id=44679 covers most of
the discussion - just skip over the various rants.

You'll be better off with 5.5.28. I'm fairly sure more cookie handling
patches were ported across.

If the cookie is set and used from within your app, you *should* be
fine. If you have a case where that doesn't appear to be working let us
know.

If the cookie is set by a third party app, then that app may need to
change to be compliant with the cookie specs.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Max Thread/Memory problems with tomcat

2009-10-05 Thread prashant sharma
Hi,

We are using the following configuration:

Tomcat: 5.0. 
OS: Windows Server HPC edition.  
JVM: 5.0

There is one basic doubt that I have. When we load/stress our Tomcat server, we 
hit thresholds mentioned below once in a while. The root of the problem is that 
when I increase the clients, I start getting a connection refused error on the 
server side. This is because the server hits the maximum request processing 
thread limit. The other problems are connected to it:

-Max threads (tomcat): 

As mentioned above, this is the root of the problem. To solve this problem, I 
increase the max threads in server.xml. Then I get the Out of stack space 
exception. 

-Stack Memory:
 
Now for this I tried a couple of things
a) Reduce the stack size allotted per thread so that more threads can be 
spawned in the allotted stack space.I believe that the default is around 320K/ 
thread. I set it to 128K in the JVM options (Xss). 
b) Reduce the heap size. I did this because as per my understanding the memory 
alloted to a process is divided among heap and stack. So probably reducing the 
heap size makes more memory available for stack. Don't know if this is correct?

Now once in a while I get Out of memory exception for heap space.

-Heap Memory: 

Can somebody advise as to what are the solutions for these sort of problems 
other than reducing the memory/thread consumption, of our application logic. I 
mean are there techniques that can be applied on tomcat/JVM/OS level to make 
more threads/memory available to the tomcat process? 

Please advise.

Thanks!
Prashant


  

RE: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread Martin Gainty

from what i've read deprecated dom and sax parsing routines consume excessive 
memory and 
commiters now recommend installing minimum version of xerces 2.91 for dealing 
with OOM issues
https://issues.apache.org/jira/browse/XERCESJ-1267

LifeRay recommends installing Liferay 5 
http://www.scribd.com/doc/17687883/Liferay-Administration-Guide

also precompiling all your jsps before restarting your webapp helps (one less 
thing to worry about)
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Mon, 5 Oct 2009 06:24:16 -0700
 From: venkata.ad...@genpact.com
 To: users@tomcat.apache.org
 Subject: Re: InvocationTargetException results OutOfMemory issue as codecache 
  is full in tomcat 5.5
 
 
 
 Hi PidSter,
 
 Out of 17 Users 5 users have reported that OutOfMemoryErrorException, Other
 12 users working fine at that time also.
 After clearing the cookies from IE6 browser, 4 users got resolved and 1 user
 got the same issue again
 .They have worked continuously for five hours before facing this issue. This
 issue we are not getting frequently.
 Every 2/3 days we are facing same issue with above exception, so we are
 restarting servers daily.
 
 We are using 
 Tomcat 5.5 
 Java Version 1.6
 OS : Windows XP
 System RAM size is 16 GB. We have 3 clustered nodes of each 2 GB as follows
 
 
 set JAVA_OPTS=-server –Xms2048m –Xmx2048m -XX:PermSize=1024m
 -XX:MaxPermSize=1024m -XX:NewSize=768m -XX:MaxNewSize=768m
 -XX:SurvivorRatio=4 -Xss256K -XX:+UseParallelGC -XX:-UseGCOverheadLimit
 -XX:HeapDumpPath=heaperror.log -Djava.net.preferIPv4Stack=true
 -Dfile.encoding=UTF8 -Duser.timezone=EST
 -Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config
 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8210
 -Dcom.sun.management.jmxremote.authenticate=false
 -Dcom.sun.management.jmxremote.ssl=false
 
 
 Our application is combinations of Liferay portlet 4.2.1 + Orbeon 3.7 in
 which java classes are dynamically called.
 
 I am experienced with Heap error result in slowness and outofmemory
 graduallyl earlier for all users. But this is some what memory is 60% only
 using. But codechche is showing full in probe which is non-heap. (default is
 48MB i think, actually it should released)
 
 Thanks  Regards
 Venkata
 
 -- 
 View this message in context: 
 http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25750784.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
 
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/

RE: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: Alias URL
 
 I have apache tomcat 5.5 installed and I am trying to setup an 
 alias url.

Why?  By default, Tomcat will listen on all IP addresses assigned to the box 
it's running on.

 Our host directory is localhost and we have a site called webtop.

Your terminology is ambiguous.  What do you mean by our host directory is 
localhost?  What do you mean by site (webapp, perhaps)?

 I have create an alias on our DNS (IIS) server http://webtop.

The http:// must not be part of the DNS entry.  Another ambiguity: IIS is a web 
server, not a DNS server; what did you really do?  Be specific.

Is IIS front-ending Tomcat?

 I want a user to enter this url and have it open 
 http://localhost:8080/webtop.

Do you have IIS listening on port 80?  If you want IIS to forward specific 
requests to Tomcat, have you read the relevant doc?
http://tomcat.apache.org/connectors-doc/reference/iis.html

 I've tried a number of settings in the server.xml file but 
 nothing has worked yet.

Not surprising, because nothing should have to be changed in Tomcat, unless you 
need to enable the AJP connector.

 - 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: Alias URL

2009-10-05 Thread Johnson, Rob E

  I have apache tomcat 5.5 installed and I am trying to setup an alias 
 url.

Why?  By default, Tomcat will listen on all IP addresses assigned to the
box it's running on.

Because the current url has the server name in address.




 Our host directory is localhost and we have a site called webtop.

Your terminology is ambiguous.  What do you mean by our host directory
is localhost?  

If you look in the server.xml file the code has Host name=localhost.
This also means it is using the computer name in the url.



What do you mean by site (webapp, perhaps)?

Under tomcat manager we've created a site/folder called webtop
(http://localhost:8080/webtop)



 I have create an alias on our DNS (IIS) server http://webtop.

The http:// must not be part of the DNS entry.  Another ambiguity: IIS
is a web server, not a DNS server; what did you really do?  Be specific.

Is IIS front-ending Tomcat?

We are using a Windows 2003 box as the DNS server on our domain.  I've
set the alias in the DNS server:  (Alias) = webtop fully qualified
domain name = imsden.mms.  So now in IE, I can type in http://webtop and
get http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.

But I want to get http://imsden:8080/webtop.




 I want a user to enter this url and have it open 
 http://localhost:8080/webtop.

Do you have IIS listening on port 80?  I have appache listening to port
80 in server.xml so I don't need to include the :8080.




If you want IIS to forward specific requests to Tomcat, have you read
the relevant doc?
http://tomcat.apache.org/connectors-doc/reference/iis.html

No, If I had IIS on this server instead of tomcat I could simply set the
folder/website I want to be the default home page.



 I've tried a number of settings in the server.xml file but nothing has

 worked yet.

Not surprising, because nothing should have to be changed in Tomcat,
unless you need to enable the AJP connector.

 - Chuck

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, October 05, 2009 9:52 AM
To: Tomcat Users List
Subject: RE: Alias URL

 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: Alias URL
 
 I have apache tomcat 5.5 installed and I am trying to setup an alias 
 url.

Why?  By default, Tomcat will listen on all IP addresses assigned to the
box it's running on.

 Our host directory is localhost and we have a site called webtop.

Your terminology is ambiguous.  What do you mean by our host directory
is localhost?  What do you mean by site (webapp, perhaps)?

 I have create an alias on our DNS (IIS) server http://webtop.

The http:// must not be part of the DNS entry.  Another ambiguity: IIS
is a web server, not a DNS server; what did you really do?  Be specific.

Is IIS front-ending Tomcat?

 I want a user to enter this url and have it open 
 http://localhost:8080/webtop.

Do you have IIS listening on port 80?  If you want IIS to forward
specific requests to Tomcat, have you read the relevant doc?
http://tomcat.apache.org/connectors-doc/reference/iis.html

 I've tried a number of settings in the server.xml file but nothing has

 worked yet.

Not surprising, because nothing should have to be changed in Tomcat,
unless you need to enable the AJP connector.

 - 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: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL
 
 Because the current url has the server name in address.

Obviously true, but irrelevant.

 If you look in the server.xml file the code has Host name=localhost.
 This also means it is using the computer name in the url.

Not true at all.  The name attribute on the Host element links only to the 
defaultHost attribute of the Engine.  Unless you have multiple Host 
elements, the name has no relationship to any DNS name.

 Under tomcat manager we've created a site/folder called webtop
 (http://localhost:8080/webtop)

That is a webapp, not a site or a folder.

 I've set the alias in the DNS server:  (Alias) = webtop fully qualified
 domain name = imsden.mms.  So now in IE, I can type in http://webtop
 and
 get http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.

That makes no sense; are you saying that http://webtop takes you to 
tomcat.apache.org?

 I have appache listening to port 80 in server.xml so I 
 don't need to include the :8080.

What do you mean by appache?  Tomcat?  httpd?  Some other Apache product?

If you have Tomcat configured to listen on port 80, why do you want the URL to 
include port 8080?

You might want to post your server.xml so we can look at it, since your 
statements about it are self-contradictory.

Also, take a look at this FAQ entry if you want your webtop app to be the 
default webapp:
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F

 - 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: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread Joe Hansen
Thank you so much for your tips, Rainer!

The websites went down yet again. Increasing the java heap size took
care of the OutOfMemoryError, but the number of httpd processes keep
increasing until the websites crash. I haven't added any new code in
the past few months, hence I am surprised why the requests are getting
stuck. Here's a link to the tomcat thread dumps:
http://pastebin.com/m17eea139

Please let me know if you cannot view it and I will email the relevant
portion of the catalina.out file to you. Is there an easy way to find
out what code is causing the requests to get stuck?

Thank you!

Joe


On Sun, Oct 4, 2009 at 2:36 PM, Rainer Jung rainer.j...@kippdata.de wrote:
 Hi Joe,

 On 04.10.2009 21:45, Joe Hansen wrote:
 Rainer, Thank you so much for your kind reply!

 I have increased the java heap size to 512MB (-Xms512m -Xmx512m). I am
 hoping that would fix the issue. I had configured our webserver to use
 Jasig's Central Authentication System (CAS). Recently I increased the
 session timeout from 30 minutes to 4 hours. I am guessing that must
 have had an impact on the number of tickets that the CAS could store
 in the Java's memory space.

 I did run the kill -QUIT command against the tomcat process. It did
 generate a huge output in the catalina.out file. I am unable to
 decipher it. I do not want to post it to the mailing list because its
 very long. Would you be able to please tell me what should I be
 looking for within this long thread dump?

 Can you put it somewhere on the web, so we can look at it, or are you
 afraid there is something private in there? You could use pastebin or
 something similar in case you do not have a public web server yourself.

 If you don't want to post in public, you can also mail it to me, I will
 post the result, in case I find something relevant.

 Regards,

 Rainer

 On Sat, Oct 3, 2009 at 12:24 PM, Rainer Jung rainer.j...@kippdata.de wrote:
 On 03.10.2009 20:07, Joe Hansen wrote:
 Hey All,

 I get this error (java.lang.OutOfMemoryError: Java heap space) after
 my Apache 2.0/Tomcat 5.5/mod_jk installation has been up and running
 for a few hours. This problem started just since two days. Never had
 this issue before!

 I have also noticed that as soon as I startup the server, 9 httpd
 processes start. Number of httpd processes keep on increasing until I
 get the OutOfMemoryError.
 $ps -aef | grep httpd
 root     31984     1  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31987 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31988 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31989 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31990 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31991 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31992 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31993 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd
 apache   31994 31984  0 11:23 ?        00:00:00 /usr/sbin/httpd

 Sounds like requests get stuck or responses are only returned very slowly.

 I would take thread dumps during the time requests pile up (e.g. httpd
 process count increases). Thread dumps are generated by kil -QUIT
 against the Tomcat process. Result is written to catalina.out. Always
 take afew thread dumps shortly after each other, e.g. 3 dumps each 3
 seconds apart from the previous one, so that you can find out, if a
 status in a dump is pure coincidence or lasts for somewhat longer.

 $ps -aef | grep tomcat
 root     31949     1 43 11:23 pts/0    00:00:58 /usr/java/jdk/bin/java 
 -Djava.u
 il.logging.manager=org.apache.juli.ClassLoaderLogManager 
 -Djava.util.logging.co
 fig.file=/usr/lib/apache-tomcat/conf/logging.properties 
 -Djava.endorsed.dirs=/u
 r/lib/apache-tomcat/common/endorsed -classpath 
 :/usr/lib/apache-tomcat/bin/boot
 trap.jar:/usr/lib/apache-tomcat/bin/commons-logging-api.jar 
 -Dcatalina.base=/us
 /lib/apache-tomcat -Dcatalina.home=/usr/lib/apache-tomcat 
 -Djava.io.tmpdir=/usr
 lib/apache-tomcat/temp org.apache.catalina.startup.Bootstrap start

 There is no Java memory configuration included above (i.e. al defaults).
 It might well be, that you have to explicitely set heap size, perm size
 and if you like also eden and semi spaces.

 Can someone on this list please help me resolve this issue.

 Thanks you,
 Joe

 Regards,

 Rainer


 -
 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: Alias URL

2009-10-05 Thread Johnson, Rob E
Chuck Caldarale you've offerec absolutely no help.  You contradict your
own questions and rude.  I do not want to hear from you again.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, October 05, 2009 10:54 AM
To: Tomcat Users List
Subject: RE: Alias URL

 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL
 
 Because the current url has the server name in address.

Obviously true, but irrelevant.

 If you look in the server.xml file the code has Host name=localhost.
 This also means it is using the computer name in the url.

Not true at all.  The name attribute on the Host element links only to
the defaultHost attribute of the Engine.  Unless you have multiple
Host elements, the name has no relationship to any DNS name.

 Under tomcat manager we've created a site/folder called webtop
 (http://localhost:8080/webtop)

That is a webapp, not a site or a folder.

 I've set the alias in the DNS server:  (Alias) = webtop fully 
 qualified domain name = imsden.mms.  So now in IE, I can type in 
 http://webtop and get 
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.

That makes no sense; are you saying that http://webtop takes you to
tomcat.apache.org?

 I have appache listening to port 80 in server.xml so I don't need to 
 include the :8080.

What do you mean by appache?  Tomcat?  httpd?  Some other Apache
product?

If you have Tomcat configured to listen on port 80, why do you want the
URL to include port 8080?

You might want to post your server.xml so we can look at it, since your
statements about it are self-contradictory.

Also, take a look at this FAQ entry if you want your webtop app to be
the default webapp:
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_
the_Tomcat_default_application_.3F

 - 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: Alias URL

2009-10-05 Thread Mark Thomas
Johnson, Rob E wrote:
 Chuck Caldarale you've offerec absolutely no help.  You contradict your
 own questions and rude.  I do not want to hear from you again.

Rob, if you want folks here to give up their free time to help you with
your problem, I suggest you read
http://catb.org/~esr/faqs/smart-questions.html

Mark

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
 Sent: Monday, October 05, 2009 10:54 AM
 To: Tomcat Users List
 Subject: RE: Alias URL
 
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL

 Because the current url has the server name in address.
 
 Obviously true, but irrelevant.
 
 If you look in the server.xml file the code has Host name=localhost.
 This also means it is using the computer name in the url.
 
 Not true at all.  The name attribute on the Host element links only to
 the defaultHost attribute of the Engine.  Unless you have multiple
 Host elements, the name has no relationship to any DNS name.
 
 Under tomcat manager we've created a site/folder called webtop
 (http://localhost:8080/webtop)
 
 That is a webapp, not a site or a folder.
 
 I've set the alias in the DNS server:  (Alias) = webtop fully 
 qualified domain name = imsden.mms.  So now in IE, I can type in 
 http://webtop and get 
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.
 
 That makes no sense; are you saying that http://webtop takes you to
 tomcat.apache.org?
 
 I have appache listening to port 80 in server.xml so I don't need to 
 include the :8080.
 
 What do you mean by appache?  Tomcat?  httpd?  Some other Apache
 product?
 
 If you have Tomcat configured to listen on port 80, why do you want the
 URL to include port 8080?
 
 You might want to post your server.xml so we can look at it, since your
 statements about it are self-contradictory.
 
 Also, take a look at this FAQ entry if you want your webtop app to be
 the default webapp:
 http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_
 the_Tomcat_default_application_.3F
 
  - 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
 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Alias URL

2009-10-05 Thread Johnson, Rob E
thanks 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, October 05, 2009 11:07 AM
To: Tomcat Users List
Subject: Re: Alias URL

Johnson, Rob E wrote:
 Chuck Caldarale you've offerec absolutely no help.  You contradict 
 your own questions and rude.  I do not want to hear from you again.

Rob, if you want folks here to give up their free time to help you with
your problem, I suggest you read
http://catb.org/~esr/faqs/smart-questions.html

Mark

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Monday, October 05, 2009 10:54 AM
 To: Tomcat Users List
 Subject: RE: Alias URL
 
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL

 Because the current url has the server name in address.
 
 Obviously true, but irrelevant.
 
 If you look in the server.xml file the code has Host name=localhost.
 This also means it is using the computer name in the url.
 
 Not true at all.  The name attribute on the Host element links only 
 to the defaultHost attribute of the Engine.  Unless you have 
 multiple Host elements, the name has no relationship to any DNS
name.
 
 Under tomcat manager we've created a site/folder called webtop
 (http://localhost:8080/webtop)
 
 That is a webapp, not a site or a folder.
 
 I've set the alias in the DNS server:  (Alias) = webtop fully 
 qualified domain name = imsden.mms.  So now in IE, I can type in 
 http://webtop and get 
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html.
 
 That makes no sense; are you saying that http://webtop takes you to 
 tomcat.apache.org?
 
 I have appache listening to port 80 in server.xml so I don't need to 
 include the :8080.
 
 What do you mean by appache?  Tomcat?  httpd?  Some other Apache 
 product?
 
 If you have Tomcat configured to listen on port 80, why do you want 
 the URL to include port 8080?
 
 You might want to post your server.xml so we can look at it, since 
 your statements about it are self-contradictory.
 
 Also, take a look at this FAQ entry if you want your webtop app to be 
 the default webapp:
 http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_b
 e_
 the_Tomcat_default_application_.3F
 
  - 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
 




-
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: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL

 You contradict your own questions and rude.

Sorry that I've offended you - I certainly had no intent to do so.

Please point out any contradictions in what I've said, and where it has been 
rude.

 - 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: Alias URL

2009-10-05 Thread Johnson, Rob E
Sorry, I thought you were trying to be offensive.  When I wrote what I
am trying to do, create an alias you asked

Why?  By default, Tomcat will listen on all IP addresses assigned to
the box it's running on.

I responded by saying, Because the current url has the server name in
address.

You resounded,

Obviously true, but irrelevant.

So my goal is to use an alias in the url and not the server name.  When
I've done an alias in the past I set the alia in the DNS server.  I then
modified my application server (running iis and not apache) with a
virtual directory and then a webapp as the default homepage.  So the
alias http://webtop would open http://servername/webtop.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, October 05, 2009 11:12 AM
To: Tomcat Users List
Subject: RE: Alias URL

 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL

 You contradict your own questions and rude.

Sorry that I've offended you - I certainly had no intent to do so.

Please point out any contradictions in what I've said, and where it has
been rude.

 - 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: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL
 
 So my goal is to use an alias in the url and not the server name.

This still isn't clear to me.  I'm confused over your port usage: who is 
listening on port 80?  Why is port 8080 of interest in the original or 
translated URL?

 So the alias http://webtop would open http://servername/webtop.

Do you have other webapps deployed in Tomcat, or is webtop the only one?  If 
there are others, do you want webtop to be the default webapp for Tomcat, or do 
you want to be able to do this aliasing for additional webapps?  (The former is 
fairly easy, the latter a bit more trouble, but still doable.)

 - 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: Alias URL

2009-10-05 Thread Johnson, Rob E
Currently tomcat is set to listen on port 8080.  I can easily open port
80 so that is not an issue.

We do have other webapps deployed, and yes I do want webtop to be the
default webapp for Tomcat. 


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, October 05, 2009 11:34 AM
To: Tomcat Users List
Subject: RE: Alias URL

 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL
 
 So my goal is to use an alias in the url and not the server name.

This still isn't clear to me.  I'm confused over your port usage: who is
listening on port 80?  Why is port 8080 of interest in the original or
translated URL?

 So the alias http://webtop would open http://servername/webtop.

Do you have other webapps deployed in Tomcat, or is webtop the only one?
If there are others, do you want webtop to be the default webapp for
Tomcat, or do you want to be able to do this aliasing for additional
webapps?  (The former is fairly easy, the latter a bit more trouble, but
still doable.)

 - 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: Max Thread/Memory problems with tomcat

2009-10-05 Thread Peter Crowther
2009/10/5 prashant sharma psharma_...@yahoo.com:
 Tomcat: 5.0.

That's old, and no longer supported.  Why are you using this version?
(And exactly which version of 5.0 are you using, by the way?)

 OS: Windows Server HPC edition.

32- or 64-bit?  I ask because the maximum contiguous memory you'll get
in 32-bit is somewhere around 1400 Mbytes - the numbers vary depending
on exactly which Microsoft OS.

 JVM: 5.0

That's also old.  Why are you using this version?

 There is one basic doubt that I have. When we load/stress our Tomcat server, 
 we hit thresholds mentioned below once in a while. The root of the problem is 
 that when I increase the clients, I start getting a connection refused error 
 on the server side. This is because the server hits the maximum request 
 processing thread limit. The other problems are connected to it:

 -Max threads (tomcat):

 As mentioned above, this is the root of the problem. To solve this problem, I 
 increase the max threads in server.xml. Then I get the Out of stack space 
 exception.

 -Stack Memory:

 Now for this I tried a couple of things
 a) Reduce the stack size allotted per thread so that more threads can be 
 spawned in the allotted stack space.I believe that the default is around 
 320K/ thread. I set it to 128K in the JVM options (Xss).
 b) Reduce the heap size. I did this because as per my understanding the 
 memory alloted to a process is divided among heap and stack. So probably 
 reducing the heap size makes more memory available for stack. Don't know if 
 this is correct?

It certainly makes more memory available for the OS stack.

 Now once in a while I get Out of memory exception for heap space.

 -Heap Memory:

 Can somebody advise as to what are the solutions for these sort of problems 
 other than reducing the memory/thread consumption, of our application logic. 
 I mean are there techniques that can be applied on tomcat/JVM/OS level to 
 make more threads/memory available to the tomcat process?

OS: Use a 64-bit OS.  Add RAM to the server.  Use anything other than
32-bit Windows in order to get a larger contiguous heap space.  If you
absolutely have to use Windows, and it absolutely has to be the 32-bit
version, use the /3GB switch *with extreme care* - read up on
*exactly* what it does and what will break before enabling it.

JVM: You've done the main thing, which is to reduce the stack depth per thread.

Tomcat: Memory and CPU usage is generally better in newer versions.
Other tunings are very much application-specific, I suspect.

However, I think we all know what the underlying problem is: your
application will not reliably fit in the available space with the load
you're putting on it during the test.  Add more space, load-balance
onto multiple machines of the size you have, tune the app, or reduce
the scale of your load test if it's deliberately a long way above your
target load.

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread Joe Hansen
Rainer,

Here are the KeepAlive values in httpd.conf:

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimout 15

Thanks,
Joe

 What are your KeepAlive* settings ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
 Subject: RE: Alias URL
 
 Currently tomcat is set to listen on port 8080.  I can easily open port
 80 so that is not an issue.

Sounds like an appropriate thing to do, so you don't have to play with URL 
rewriting anywhere.

 We do have other webapps deployed, and yes I do want webtop to be the
 default webapp for Tomcat.

Then the easiest way to handle this is change the name of the webtop webapp to 
ROOT (case sensitive), and make sure that the DNS entry for webtop points to 
the IP address of the box Tomcat is running on.  No changes to the Tomcat 
configuration are necessary, other than switching to port 80 if that's 
desirable.

If you want to utilize the DNS name to webapp mapping trick for additional 
webapps, you will need multiple Host elements in server.xml - at which point 
the name attribute for each Host becomes important.  Look here for details:
http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Alias URL

2009-10-05 Thread André Warnier

Caldarale, Charles R wrote:

From: Johnson, Rob E [mailto:rob.john...@mms.gov]

...

Hi guys, can I jump in here ?
I believe that you are being a bit tough on Rob here.
Obviously, he is not a Tomcat expert, and more used to IIS and the MS 
way of things, than to Apache httpd and Tomcat.  And in IIS, these 
things are administered through a graphical interface which talks of 
sites and so, so I think he is getting a bit confused.
I don't know if I can redeem all of that in 5 minutes, but I'm willing 
to try.


Rob,
you are being blasted here because this is a forum for Apache Tomcat, 
which is an Open Source product, and as such it, and the people here, 
are striving to follow the official Internet RFCs and the vocabulary 
used in those documents.  Microsoft on the other hand propose their own 
proprietary products, with their own interfaces and vocabulary.  That is 
their fundamental right, but it can lead to some confusion when one is 
trying to marry the two worlds.
For example, what MS and IIS call a site, is usually in Apache httpd 
and Tomcat designated by virtual Host.


In a purely MS-world, using the MS proprietary vocabulary is fine, 
because within the confines of that world that vocabulary is readily 
understood.
In the world of the Internet and Open Source software, where products 
come from many sources and have to interact with one another, using the 
official Internet RFC vocabulary is necessary, because it is the only 
way by which these products and the people using them can understand 
eachother and communicate (as you just discovered).


Usually also, MS products are designed to be configured primarily 
through a graphical interface, while many open-source products are 
mainly configured by means of text files (for Tomcat, in XML format), 
and a graphical interface is often an afterthought.
(And in the Open Source world, particularly with older guys like Chuck 
and me, graphical configuration interfaces are considered like things 
for kiddies; the real pros use text files, and a vi editor).


Tomcat is primarily a java servlet server (special web applications 
written in java).  But it can act as a generic webserver, and serve 
normal static pages too.
The standard port on which a webserver listens for requests from 
browsers, is port 80.  But it can listen for browser requests on any 
port, as long as it is configured to do so, and as long as that same 
port is not in use by something else on the same host.


Therefore, your initial question is a bit confusing, because you mention 
both a URL of http://webtop; (thus implying a standard HTTP port 80, 
thus the equivalent URL to http://webtop:80/;), and 
http://localhost:8080/webtop; (thus using a non-standard port 8080), 
and you call them both sites.
Plus, in these URLs, only the webtop or localhost parts really have 
something to do with DNS, and DNS itself (the Domain Name System) has 
nothing to do with IIS (a webserver), and it seemed in your first post 
that you were also confusing these things.
Plus, you mention in your post that you would like the users to enter in 
their browser the URL http://webtop; and that they be automatically 
redirected to the site http://localhost:8080/webtop; which really 
does not make any sense and is rather impossible.


So, for all of that, you got treated a bit roughly, but without malice, 
and I am sure that it was merely an attempt by the other posters here, 
to get you to straighten up your vocabulary, in an Internet RFC sense.


Before we get back to your question, there is another explanation I want 
to provide, lest we talk again different languages later.


When, in the browser URL bar, a user enters a URL like : http://webtop, 
the browser really does the following :
- it asks the underlying Operating System, to resolve the hostname 
included in this URL (here webtop) into an IP address (like 1.2.3.4).
- then it establishes a TCP connection with the host at that IP address, 
at the port indicated (here port 80, implicitly for HTTP)
- then it sends to that host a HTTP request consisting, as a minimum, of 
2 text lines :

1) GET / HTTP/1.1
2) Host: webtop

Similarly, when the user enters http://localhost:8080/webtop;, the 
browser :
- asks the underlying Operating System, to resolve the hostname included 
in this URL (here localhost) into an IP address (and this will always 
come back as 127.0.0.1, because on any machine localhost is that address).
- then it establishes a TCP connection with the host at that IP address, 
at the port indicated (here thus, to IP 127.0.0.1 and port 8080, as 
explicitly mentioned)
- then it sends to that host a HTTP request consisting, as a minimum, of 
2 text lines, in this case :

1) GET /webtop HTTP/1.1
2) Host: localhost

So here you can already see why your initial explanation sounded strange 
: because in the first case, the IP address returned by the OS (and the 
DNS system to which it talks) would be whatever public IP address 
corresponds to the Alias 

Re: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread André Warnier

Joe Hansen wrote:

Rainer,

Here are the KeepAlive values in httpd.conf:

KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimout 15


Well, since you have KeepAlive Off, the other 2 do not matter.
But as such, it means that each request of each browser is going to 
create a new connection to the webserver, just for that one request.
So if there is a page with 10 img links inside, you will end up 
establishing (and tearing down) a total of 11 TCP connections (one for 
the main page, one each for each img).

That may or may not have a bearing on the situation you are seeing.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread Joe Hansen
Thank you for the reply, Andre.

I now understand how setting KeepAlive to On would improve the
performance of a website (The Apache manual says that a 50% increase
in throughput could be expected). So I changed the KeepAlive to On and
restarted the server.

I however wonder if this will fix the issue. The reason being, I
haven't changed the website code at all the past few months and there
hasn't been any increase in the website traffic too. Hence I am unable
to understand why we are suddenly seeing an increase in the number of
httpd processes. The only thing I changed is the session-timeout value
from 30 minutes to 240 minutes.

Thanks,
Joe




On Mon, Oct 5, 2009 at 1:04 PM, André Warnier a...@ice-sa.com wrote:
 Joe Hansen wrote:

 Rainer,

 Here are the KeepAlive values in httpd.conf:

 KeepAlive Off
 MaxKeepAliveRequests 100
 KeepAliveTimout 15

 Well, since you have KeepAlive Off, the other 2 do not matter.
 But as such, it means that each request of each browser is going to create a
 new connection to the webserver, just for that one request.
 So if there is a page with 10 img links inside, you will end up
 establishing (and tearing down) a total of 11 TCP connections (one for the
 main page, one each for each img).
 That may or may not have a bearing on the situation you are seeing.



 -
 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: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread André Warnier

Joe Hansen wrote:

Thank you for the reply, Andre.

I now understand how setting KeepAlive to On would improve the
performance of a website (The Apache manual says that a 50% increase
in throughput could be expected). So I changed the KeepAlive to On and
restarted the server.


Now wait.
You should probably then lower your setting for KeepAliveTimeout (to 3 
e.g.), otherwise you may make the problem much worse.

Read conscienciously the relevant Apache doc page :
http://httpd.apache.org/docs/2.2/mod/core.html#keepalive

The point with KeepAlive is :
- the browser makes a connection and issues a first request
- the webserver dedicates a child (or thread) to this connection, and 
passes it the first request

- the child/thread responds to the first request, and then waits for more
- the browser, in the response page, finds more links. Over the same TCP 
connection, it sends the next request
- the same child/thread - which was waiting on that connection - 
receives the new request, and responds to it. Then it waits again for 
the next one.

- etc..
- until at some point, the browser does not issue any additional 
requests on the connection. Then, *after the KeepAliveTimeout has 
expired*, the child/thread gives up, closesthe connection, and returns 
to the pool available for other requests from other browsers


So the point is, if the KeepAliveTimeout is long (like 15 seconds), it 
means that a child/thread may be kept waiting, for nothing, up to that 
many seconds, although there is nothing coming anymore.




I however wonder if this will fix the issue. The reason being, I
haven't changed the website code at all the past few months and there
hasn't been any increase in the website traffic too. Hence I am unable
to understand why we are suddenly seeing an increase in the number of
httpd processes. The only thing I changed is the session-timeout value
from 30 minutes to 240 minutes.

I guess that this is the Tomcat session timeout.  That should have 
nothing to do with the above.  I don't think that for Tomcat, a 
session is linked to a connection. It is more of a set of data saved 
somewhere, linked to the Tomcat session-id (the JSESSIONID cookie for 
instance).  Tomcar retrieves it whenever a request comes in with the 
same session-id number.  But it should not matter whether it is on the 
same TCP connection or not.


What may be linked together however, is that one request to httpd 
results in one child/thread busy with it at the Apache httpd level. If 
that request is being forwarded to Tomcat by mod_jk, then it also holds 
onto one mod_jk/Tomcat connection. This connection then holds on to one 
thread in Tomcat, until the Tomcat thread (+webapp) has supplied the 
full response. All the while, this whole chain is unavailable for other 
requests.  Thus, if there are many such requests under way, many Apache 
children/threads are busy, and Apache httpd will start additional ones 
(up to its limit) to service new requests that come in.
So if for some reason, your Tomcat requests now take longer to be 
serviced, that should also, by retro-effect, increase the number of 
httpd children/threads being started.

The bottleneck would be in Tomcat, but it would show up at the httpd level.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Alias URL

2009-10-05 Thread Johnson, Rob E
Hi,

What you would like is that :
- when a user enters the URL http://imsden.mms; (or 
http://imsden.mms:8080;), he continues to get the standard Tomcat homepage
- when a user enters the URL http://webtop; (or http://webtop:8080;), he 
gets immediately the first page of the webtop application

Is that correct ?

This is correct

Sorry to be slow to respond I have to jump into a few meetings today. 

Thanks,

Rob

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, October 05, 2009 12:55 PM
To: Tomcat Users List
Subject: Re: Alias URL

Caldarale, Charles R wrote:
 From: Johnson, Rob E [mailto:rob.john...@mms.gov]
...

Hi guys, can I jump in here ?
I believe that you are being a bit tough on Rob here.
Obviously, he is not a Tomcat expert, and more used to IIS and the MS way of 
things, than to Apache httpd and Tomcat.  And in IIS, these things are 
administered through a graphical interface which talks of sites and so, so I 
think he is getting a bit confused.
I don't know if I can redeem all of that in 5 minutes, but I'm willing to try.

Rob,
you are being blasted here because this is a forum for Apache Tomcat, which is 
an Open Source product, and as such it, and the people here, are striving to 
follow the official Internet RFCs and the vocabulary used in those documents.  
Microsoft on the other hand propose their own proprietary products, with their 
own interfaces and vocabulary.  That is their fundamental right, but it can 
lead to some confusion when one is trying to marry the two worlds.
For example, what MS and IIS call a site, is usually in Apache httpd and 
Tomcat designated by virtual Host.

In a purely MS-world, using the MS proprietary vocabulary is fine, because 
within the confines of that world that vocabulary is readily understood.
In the world of the Internet and Open Source software, where products come from 
many sources and have to interact with one another, using the official Internet 
RFC vocabulary is necessary, because it is the only way by which these products 
and the people using them can understand eachother and communicate (as you just 
discovered).

Usually also, MS products are designed to be configured primarily through a 
graphical interface, while many open-source products are mainly configured by 
means of text files (for Tomcat, in XML format), and a graphical interface is 
often an afterthought.
(And in the Open Source world, particularly with older guys like Chuck and me, 
graphical configuration interfaces are considered like things for kiddies; the 
real pros use text files, and a vi editor).

Tomcat is primarily a java servlet server (special web applications written in 
java).  But it can act as a generic webserver, and serve normal static pages 
too.
The standard port on which a webserver listens for requests from browsers, is 
port 80.  But it can listen for browser requests on any port, as long as it is 
configured to do so, and as long as that same port is not in use by something 
else on the same host.

Therefore, your initial question is a bit confusing, because you mention both a 
URL of http://webtop; (thus implying a standard HTTP port 80, thus the 
equivalent URL to http://webtop:80/;), and http://localhost:8080/webtop; 
(thus using a non-standard port 8080), and you call them both sites.
Plus, in these URLs, only the webtop or localhost parts really have 
something to do with DNS, and DNS itself (the Domain Name System) has nothing 
to do with IIS (a webserver), and it seemed in your first post that you were 
also confusing these things.
Plus, you mention in your post that you would like the users to enter in their 
browser the URL http://webtop; and that they be automatically redirected to 
the site http://localhost:8080/webtop; which really does not make any sense 
and is rather impossible.

So, for all of that, you got treated a bit roughly, but without malice, and I 
am sure that it was merely an attempt by the other posters here, to get you to 
straighten up your vocabulary, in an Internet RFC sense.

Before we get back to your question, there is another explanation I want to 
provide, lest we talk again different languages later.

When, in the browser URL bar, a user enters a URL like : http://webtop, the 
browser really does the following :
- it asks the underlying Operating System, to resolve the hostname included in 
this URL (here webtop) into an IP address (like 1.2.3.4).
- then it establishes a TCP connection with the host at that IP address, at the 
port indicated (here port 80, implicitly for HTTP)
- then it sends to that host a HTTP request consisting, as a minimum, of
2 text lines :
1) GET / HTTP/1.1
2) Host: webtop

Similarly, when the user enters http://localhost:8080/webtop;, the browser :
- asks the underlying Operating System, to resolve the hostname included in 
this URL (here localhost) into an IP address (and this will always come back 
as 127.0.0.1, because on any machine localhost is that 

Re: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread André Warnier

André Warnier wrote:
...
and still wants to add something :

- a new KeepAlive connection is made from the browser to Apache (httpd).
- then a request comes in on that connection, and it happens to be one 
that gets forwarded to Tomcat.  So a mod_jk connection is made to 
Tomcat, Tomcat allocates a thread for it.
- I would imagine that mod_jk must pass on to Tomcat the fact that this 
is a KeepAlive connection, so that Tomcat would know that its thread for 
that connection, should also wait for subsequent requests.
- so now the webapp/thread generates the response to the first request, 
and waits on the connection for more requests.
- however, the browser does send more requests to Apache, but these are 
not ones that get forwarded to Tomcat (for example, they are for items 
that Apache serves locally) ...


So now I wonder about how Apache + mod_jk + Tomcat react in such a 
situation.  Do the mod_jk connection +Tomcat thread keep waiting anyway, 
and how long ?


Rainer ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: java.lang.OutOfMemoryError: Java heap space
 
 The bottleneck would be in Tomcat, but it would show up at the
 httpd level.

The bottleneck might also be in something external to Tomcat, such as a 
database or some external web service used by the webapps.  The result may 
still only be visible at the front end.

 - 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: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread Pid Ster
On 5 Oct 2009, at 14:34, Christopher Schultz ch...@christopherschultz.net
  wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Pid,

 On 10/5/2009 6:26 AM, Pid Ster wrote:
 What are your JAVA_OPTS?
 How much memory Is in the machine?
 OS? JVM version? Tomcat version?

 ... and what makes the OP think it's a code cache problem?

Indeed. I thought I'd try and spot a 32bit JVM first, and then hunt
for an actual OOM stack trace...

p

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkrJ9akACgkQ9CaO5/Lv0PBVGACfaJQj+F7Bk6pOYMezzqgSQFNJ
 TnYAoLQlR3qloGcbCR5uKsb++JdnYEyr
 =xJZJ
 -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: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5

2009-10-05 Thread Pid Ster
On 5 Oct 2009, at 14:24, subrahmanyam venkata.ad...@genpact.com wrote:



 Hi PidSter,

 Out of 17 Users 5 users have reported that
 OutOfMemoryErrorException, Other
 12 users working fine at that time also.
 After clearing the cookies from IE6 browser, 4 users got resolved
 and 1 user
 got the same issue again
 .They have worked continuously for five hours before facing this
 issue. This
 issue we are not getting frequently.
 Every 2/3 days we are facing same issue with above exception, so we
 are
 restarting servers daily.

 We are using
 Tomcat 5.5
 Java Version 1.6
 OS : Windows XP
 System RAM size is 16 GB. We have 3 clustered nodes of each 2 GB as
 follows


 set JAVA_OPTS=-server –Xms2048m –Xmx2048m -XX:PermSize=1024m
 -XX:MaxPermSize=1024m -XX:NewSize=768m -XX:MaxNewSize=768m
 -XX:SurvivorRatio=4 -Xss256K -XX:+UseParallelGC -XX:-
 UseGCOverheadLimit
 -XX:HeapDumpPath=heaperror.log -Djava.net.preferIPv4Stack=true
 -Dfile.encoding=UTF8 -Duser.timezone=EST
 -Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config
 -Dcom.sun.management.jmxremote -
 Dcom.sun.management.jmxremote.port=8210
 -Dcom.sun.management.jmxremote.authenticate=false
 -Dcom.sun.management.jmxremote.ssl=false


 Our application is combinations of Liferay portlet 4.2.1 + Orbeon
 3.7 in
 which java classes are dynamically called.

 I am experienced with Heap error result in slowness and outofmemory
 graduallyl earlier for all users. But this is some what memory is
 60% only
 using. But codechche is showing full in probe which is non-heap.
 (default is
 48MB i think, actually it should released)

XP what - one presumes not home?
Are you using a 64bit OS and 64bit JVM?

p

 Thanks  Regards
 Venkata

 --
 View this message in context: 
 http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25750784.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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[OT] Re: Alias URL

2009-10-05 Thread Pid Ster
  ... the real pros use text files, and a vi editor).

The last time someone said that, the Argument ended with a
discussion about electron microscopes...

p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Cannot set remote address in valve (Tomcat 5.5)

2009-10-05 Thread Elli Albek
Hi,

We can add the header to the custom valves, but then in addition we have to
change a few log file configurations, create a servlet filter and maybe
something else I cant think of now. Basically doing the same thing a few
times and keeping track of all the places that depend on the header. Ideally
this would all be corrected once in the beginning of the request processing
pipeline, so log file configuration, other valves and the war files will
remain unchanged.

 

Attached a Valve that does that. This is the minimum code necessary, so it
should not have any significant performance impact. 

Feel free to use as is, not guaranteed to work, no expressed on implied
warranties, not FDIC insured and may loose value.

 

To configure Tomcat add to server.xml:

 

Service name=Catalina

  Connector port=8080 .../ 

  Engine defaultHost=localhost name=Catalina

!-- This should precede all other configuration in the engine
--

Valve className=org.apache.catalina.connector.RemoteIPValve/

 

Java class/jar should be placed in /server/lib or /server/classes

 

E

 

 

 

package org.apache.catalina.connector;

 

import java.io.IOException;

import java.util.regex.Matcher;

import java.util.regex.Pattern;

 

import javax.servlet.ServletException;

 

import org.apache.catalina.connector.Request;

import org.apache.catalina.connector.Response;

import org.apache.catalina.valves.ValveBase;

 

/**

 * A valve that extracts the remote IP of the client from an HTTP header
field

 * passed by the proxy, and set it in the request as the original client IP.

 * This valve should be the first valve in the engine, so log valves (and

 * others) will see the real client IP without requiring the same code
again.

 * 

 * @author Elli Albek, www.sustainlane.com

 */

public class RemoteIPValve extends ValveBase {

 

  private static final Pattern ipExpr =
Pattern.compile(^[\\da-fA-F]+(\\.[\\da-fA-F]+)+);

 

  private String forwardedForHeader = X-Forwarded-For;

 

  public void invoke(Request request, Response response) throws
IOException, ServletException {

 

String header = request.getHeader(forwardedForHeader);

String forwardedIP = getFirstIP(header);

if (forwardedIP != null)

  request.remoteAddr = forwardedIP;

 

next.invoke(request, response);

  }

 

  /**

   * Return the first IP address in a string that may contain an IP list

   */

  static final String getFirstIP(String header) {

if (header == null)

  return null;

Matcher m = ipExpr.matcher(header);

if (m.find()) {

  return m.group();

}

return null;

  }

 

  public void setForwardedForHeader(String forwardedForHeader) {

this.forwardedForHeader = forwardedForHeader;

  }

 

  public String getInfo() {

return RemoteIPValve;

  }

}



Re: [OT] Re: Alias URL

2009-10-05 Thread Peter Crowther
2009/10/5 Pid Ster p...@pidster.com:
  ... the real pros use text files, and a vi editor).

 The last time someone said that, the Argument ended with a
 discussion about electron microscopes...

Well I edited the inodes by hand.  With a magnet.

(Bonus points if you know the origin of the quote)

- Peter, one of the Four Yorkshiremen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: java.lang.OutOfMemoryError: Java heap space

2009-10-05 Thread Joe Hansen
Andre, Thanks for pointing out the high KeepAliveTimeout value in the
config file. I have read the docs and have changed it to 5 seconds
(which is the default).

I am hoping that Rainer could find out from the thread dump where the
requests are getting stuck, so that I can put this issue to bed.

Thanks,
Joe


On Mon, Oct 5, 2009 at 1:53 PM, André Warnier a...@ice-sa.com wrote:
 Joe Hansen wrote:

 Thank you for the reply, Andre.

 I now understand how setting KeepAlive to On would improve the
 performance of a website (The Apache manual says that a 50% increase
 in throughput could be expected). So I changed the KeepAlive to On and
 restarted the server.

 Now wait.
 You should probably then lower your setting for KeepAliveTimeout (to 3
 e.g.), otherwise you may make the problem much worse.
 Read conscienciously the relevant Apache doc page :
 http://httpd.apache.org/docs/2.2/mod/core.html#keepalive

 The point with KeepAlive is :
 - the browser makes a connection and issues a first request
 - the webserver dedicates a child (or thread) to this connection, and passes
 it the first request
 - the child/thread responds to the first request, and then waits for more
 - the browser, in the response page, finds more links. Over the same TCP
 connection, it sends the next request
 - the same child/thread - which was waiting on that connection - receives
 the new request, and responds to it. Then it waits again for the next one.
 - etc..
 - until at some point, the browser does not issue any additional requests on
 the connection. Then, *after the KeepAliveTimeout has expired*, the
 child/thread gives up, closesthe connection, and returns to the pool
 available for other requests from other browsers

 So the point is, if the KeepAliveTimeout is long (like 15 seconds), it means
 that a child/thread may be kept waiting, for nothing, up to that many
 seconds, although there is nothing coming anymore.


 I however wonder if this will fix the issue. The reason being, I
 haven't changed the website code at all the past few months and there
 hasn't been any increase in the website traffic too. Hence I am unable
 to understand why we are suddenly seeing an increase in the number of
 httpd processes. The only thing I changed is the session-timeout value
 from 30 minutes to 240 minutes.

 I guess that this is the Tomcat session timeout.  That should have nothing
 to do with the above.  I don't think that for Tomcat, a session is linked
 to a connection. It is more of a set of data saved somewhere, linked to the
 Tomcat session-id (the JSESSIONID cookie for instance).  Tomcar retrieves it
 whenever a request comes in with the same session-id number.  But it should
 not matter whether it is on the same TCP connection or not.

 What may be linked together however, is that one request to httpd results in
 one child/thread busy with it at the Apache httpd level. If that request is
 being forwarded to Tomcat by mod_jk, then it also holds onto one
 mod_jk/Tomcat connection. This connection then holds on to one thread in
 Tomcat, until the Tomcat thread (+webapp) has supplied the full response.
 All the while, this whole chain is unavailable for other requests.  Thus, if
 there are many such requests under way, many Apache children/threads are
 busy, and Apache httpd will start additional ones (up to its limit) to
 service new requests that come in.
 So if for some reason, your Tomcat requests now take longer to be serviced,
 that should also, by retro-effect, increase the number of httpd
 children/threads being started.
 The bottleneck would be in Tomcat, but it would show up at the httpd level.

 -
 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: Alias URL

2009-10-05 Thread André Warnier

Johnson, Rob E wrote:

Hi,


What you would like is that :
- when a user enters the URL http://imsden.mms; (or http://imsden.mms:8080;), 
he continues to get the standard Tomcat homepage
- when a user enters the URL http://webtop; (or http://webtop:8080;), he gets 
immediately the first page of the webtop application



Is that correct ?


This is correct

Sorry to be slow to respond I have to jump into a few meetings today. 

And sorry if I leave in the middle somewhere, despite my didactic 
instincts.  I have to take a plane at 5:00.

So let's see if I can write this quickly and not forget anything.
(If so, peruse the responses you already got, from me and others, 
because the data is already there).


Anyway then,

(stop Tomcat first)

Step 1 : you will need 2 Host .. sections in Tomcat's configuration 
file server.xml.  Currently, there is only one.


The first and only one you already have, is for the hostname 
localhost, which is also the default Host.  Meaning in short that 
Tomcat will use the settings in that first Host section, for any request
- either specifically addressed to localhost (of which there should be 
few, since they would have to originate on the same system)
- or for any request that comes in with a Host: xx header, which 
x Tomcat cannot readily associate with a Host name=xx .. tag


So look for the server.xml file, edit it, duplicate the entire
Host name=localhost ..  /Host section that you find there, and 
change the name= attribute value to be webtop instead of localhost.


That's basically all it takes to create a new virtual host (or site 
in MS parlance) into Tomcat.


Also :
- you currently have a ../webapps/ directory under Tomcat.  At the same 
level, create a directory .../webapps2/ .
Then move your complete webtop/* webapp under that new directory 
(instead of under /webapps/).
- then, in the new Host name=webtop .. tag that you created 
previously, change the appBase attribute

as follows :
old : appBase=webapps
new : appBase=webapps2


Then restart Tomcat.
Now the Host named localhost should no longer find an application 
called webtop. In other words, a browser accessing via 
http://imsden.mms/webtop; should get an error.
(Because the hostname imsden.mms not being found in a Host tag, Tomcat 
will default to the first Host, and its /webapps dir does not have the 
webtop application in it any longer).


But the host named webtop should find this application.
In other words, a browser accessing via http://webtop/webtop; should 
now get the application.


That's getting closer, but..

Step 2 : consists of making this webtop application into the default 
application of the host webtop.

For this, there is a wiki, but in your case it's easier :
Stop Tomcat. Rename /webapps2/webtop/ to /webapps2/ROOT/,
and restart Tomcat.
Then try accessing http://webtop/

Tada !

Or not, but then you need to find another helping hand, cause I'm going 
to catch some sleep.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [OT] Re: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: peter.crowth...@googlemail.com
 [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther
 Subject: Re: [OT] Re: Alias URL
 
 Well I edited the inodes by hand.  With a magnet.
 (Bonus points if you know the origin of the quote)

This may not be the origin, but I think it's one of the first times it was 
written down:
http://ars.userfriendly.org/cartoons/?id=19990508mode=classic

 - Peter, one of the Four Yorkshiremen

My brain 'urts!

Still working at the mill?

 - 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: [OT] Re: Alias URL

2009-10-05 Thread André Warnier

Caldarale, Charles R wrote:

From: peter.crowth...@googlemail.com
[mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther
Subject: Re: [OT] Re: Alias URL

Well I edited the inodes by hand.  With a magnet.
(Bonus points if you know the origin of the quote)


This may not be the origin, but I think it's one of the first times it was 
written down:
http://ars.userfriendly.org/cartoons/?id=19990508mode=classic



I was going to say Evil Geniuses (O'Reilly).
But I don't know who was first.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Alias URL
 
 (stop Tomcat first)
 
 Step 1 : you will need 2 Host .. sections in Tomcat's configuration
 file server.xml.  Currently, there is only one.

Actually, the one will suffice, if the OP is willing to eliminate Tomcat's 
existing ROOT webapp (no big loss).

 That's basically all it takes to create a new virtual host (or site
 in MS parlance) into Tomcat.

However, a second Host is not needed - unless one has multiple domain names 
and wants a different default webapp for each.

 - you currently have a ../webapps/ directory under Tomcat.  At the same
 level, create a directory .../webapps2/ .

Again, not needed if it's o.k. to eliminate the original ROOT webapp and 
there's only one default webapp.

 Stop Tomcat. Rename /webapps2/webtop/ to /webapps2/ROOT/,
 and restart Tomcat.

This is the critical step: the easiest way to specify a default webapp is to 
name it ROOT.  Again, if only one Host element is needed, the above line 
would use webapps (or whatever the Host appBase specifies), not webapps2.

 - 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: [OT] Re: Alias URL

2009-10-05 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: [OT] Re: Alias URL
 
 I was going to say Evil Geniuses (O'Reilly).
 But I don't know who was first.

The book is just a collection of the User Friendly strips; excellent reference 
manual.

 - 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: Alias URL

2009-10-05 Thread Johnson, Rob E
Andre thanks for all your help that worked.  I can use the alias, and I can 
still hit the other webapps.

Also thanks to Martin Gainty and his help.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, October 05, 2009 3:54 PM
To: Tomcat Users List
Subject: Re: Alias URL

Johnson, Rob E wrote:
 Hi,
 
 What you would like is that :
 - when a user enters the URL http://imsden.mms; (or 
 http://imsden.mms:8080;), he continues to get the standard Tomcat 
 homepage
 - when a user enters the URL http://webtop; (or 
 http://webtop:8080;), he gets immediately the first page of the 
 webtop application
 
 Is that correct ?
 
 This is correct
 
 Sorry to be slow to respond I have to jump into a few meetings today. 
 
And sorry if I leave in the middle somewhere, despite my didactic instincts.  I 
have to take a plane at 5:00.
So let's see if I can write this quickly and not forget anything.
(If so, peruse the responses you already got, from me and others, because the 
data is already there).

Anyway then,

(stop Tomcat first)

Step 1 : you will need 2 Host .. sections in Tomcat's configuration file 
server.xml.  Currently, there is only one.

The first and only one you already have, is for the hostname localhost, which 
is also the default Host.  Meaning in short that Tomcat will use the settings 
in that first Host section, for any request
- either specifically addressed to localhost (of which there should be few, 
since they would have to originate on the same system)
- or for any request that comes in with a Host: xx header, which x 
Tomcat cannot readily associate with a Host name=xx .. tag

So look for the server.xml file, edit it, duplicate the entire Host 
name=localhost ..  /Host section that you find there, and change the 
name= attribute value to be webtop instead of localhost.

That's basically all it takes to create a new virtual host (or site 
in MS parlance) into Tomcat.

Also :
- you currently have a ../webapps/ directory under Tomcat.  At the same level, 
create a directory .../webapps2/ .
Then move your complete webtop/* webapp under that new directory (instead of 
under /webapps/).
- then, in the new Host name=webtop .. tag that you created previously, 
change the appBase attribute as follows :
old : appBase=webapps
new : appBase=webapps2


Then restart Tomcat.
Now the Host named localhost should no longer find an application called 
webtop. In other words, a browser accessing via http://imsden.mms/webtop; 
should get an error.
(Because the hostname imsden.mms not being found in a Host tag, Tomcat will 
default to the first Host, and its /webapps dir does not have the webtop 
application in it any longer).

But the host named webtop should find this application.
In other words, a browser accessing via http://webtop/webtop; should now get 
the application.

That's getting closer, but..

Step 2 : consists of making this webtop application into the default 
application of the host webtop.
For this, there is a wiki, but in your case it's easier :
Stop Tomcat. Rename /webapps2/webtop/ to /webapps2/ROOT/, and restart Tomcat.
Then try accessing http://webtop/

Tada !

Or not, but then you need to find another helping hand, cause I'm going to 
catch some sleep.


-
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: Alias URL

2009-10-05 Thread Pid Ster
On 5 Oct 2009, at 23:47, Johnson, Rob E rob.john...@mms.gov wrote:

 Andre thanks for all your help that worked.  I can use the alias,
 and I can still hit the other webapps.

 Also thanks to Martin Gainty and his help.

YDHTVO

p

 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Monday, October 05, 2009 3:54 PM
 To: Tomcat Users List
 Subject: Re: Alias URL

 Johnson, Rob E wrote:
 Hi,

 What you would like is that :
 - when a user enters the URL http://imsden.mms; (or
 http://imsden.mms:8080;), he continues to get the standard Tomcat
 homepage
 - when a user enters the URL http://webtop; (or
 http://webtop:8080;), he gets immediately the first page of the
 webtop application

 Is that correct ?

 This is correct

 Sorry to be slow to respond I have to jump into a few meetings today.

 And sorry if I leave in the middle somewhere, despite my didactic
 instincts.  I have to take a plane at 5:00.
 So let's see if I can write this quickly and not forget anything.
 (If so, peruse the responses you already got, from me and others,
 because the data is already there).

 Anyway then,

 (stop Tomcat first)

 Step 1 : you will need 2 Host .. sections in Tomcat's
 configuration file server.xml.  Currently, there is only one.

 The first and only one you already have, is for the hostname
 localhost, which is also the default Host.  Meaning in short
 that Tomcat will use the settings in that first Host section, for
 any request
 - either specifically addressed to localhost (of which there
 should be few, since they would have to originate on the same system)
 - or for any request that comes in with a Host: xx header,
 which x Tomcat cannot readily associate with a Host
 name=xx .. tag

 So look for the server.xml file, edit it, duplicate the entire Host
 name=localhost ..  /Host section that you find there, and
 change the name= attribute value to be webtop instead of
 localhost.

 That's basically all it takes to create a new virtual host (or
 site
 in MS parlance) into Tomcat.

 Also :
 - you currently have a ../webapps/ directory under Tomcat.  At the
 same level, create a directory .../webapps2/ .
 Then move your complete webtop/* webapp under that new directory
 (instead of under /webapps/).
 - then, in the new Host name=webtop .. tag that you created
 previously, change the appBase attribute as follows :
 old : appBase=webapps
 new : appBase=webapps2


 Then restart Tomcat.
 Now the Host named localhost should no longer find an application
 called webtop. In other words, a browser accessing via 
 http://imsden.mms/webtop
  should get an error.
 (Because the hostname imsden.mms not being found in a Host tag,
 Tomcat will default to the first Host, and its /webapps dir does not
 have the webtop application in it any longer).

 But the host named webtop should find this application.
 In other words, a browser accessing via http://webtop/webtop;
 should now get the application.

 That's getting closer, but..

 Step 2 : consists of making this webtop application into the
 default application of the host webtop.
 For this, there is a wiki, but in your case it's easier :
 Stop Tomcat. Rename /webapps2/webtop/ to /webapps2/ROOT/, and
 restart Tomcat.
 Then try accessing http://webtop/

 Tada !

 Or not, but then you need to find another helping hand, cause I'm
 going to catch some sleep.


 -
 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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Alias URL

2009-10-05 Thread David Kerber

André Warnier wrote:

Caldarale, Charles R wrote:

From: Johnson, Rob E [mailto:rob.john...@mms.gov]

...


Usually also, MS products are designed to be configured primarily 
through a graphical interface, while many open-source products are 
mainly configured by means of text files (for Tomcat, in XML format), 
and a graphical interface is often an afterthought.
(And in the Open Source world, particularly with older guys like Chuck 
and me, graphical configuration interfaces are considered like things 
for kiddies; the real pros use text files, and a vi editor).

UltraEdit!

...

D



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Alias URL

2009-10-05 Thread David Kerber

Pid Ster wrote:

On 5 Oct 2009, at 23:47, Johnson, Rob E rob.john...@mms.gov wrote:

  

Andre thanks for all your help that worked.  I can use the alias,
and I can still hit the other webapps.

Also thanks to Martin Gainty and his help.



YDHTVO
  
???  Haven't seen that one before. 


D



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



How to Map domain to a context using Mod_jk

2009-10-05 Thread gpike

I have Virtual Hosts defined in Apache for each domain. I want to map the
domain to a context in Tomcat. For instance I would like mysite.com to map
to /mysite_com in Tomcat. Would it be something like: 

VirtualHost *:80
ServerName mysite.com
RewriteRule ^/(.*)$ /mysite_com/$1 [PT]
JkMount /mysite_com/* worker1
/VirtualHost

Is there a better way?

Thanks Gordon
-- 
View this message in context: 
http://www.nabble.com/How-to-Map-domain-to-a-context-using-Mod_jk-tp25762921p25762921.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