Re: Is it possible to send a 'keep-alive' packet back to client session every x seconds?

2014-03-27 Thread Matthew Turany
Thanks everyone, development tells me that their going to build the
function into the application.
trying to build custom kernels and then using a tcp_keepalive would be a
logistic nightmare.

Cheers,
Matt


On Fri, Mar 28, 2014 at 12:53 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mark,
>
> On 3/27/14, 5:38 AM, Mark Thomas wrote:
> > On 27/03/2014 03:08, Matthew Turany wrote:
> >> Is it possible to configure either apache or tomcat to send a
> >> packet every x number of seconds so that at the client end the
> >> gateway thinks the session is still active and will keep the
> >> connection open, or is this something best put into the actual
> >> web app?
> >
> > http://tomcat.apache.org/connectors-doc/reference/workers.html
> > socket_keepalive
> >
> > You'll need to configure the OS to send the packets frequently
> > enough.
> >
> > Alternatively, change the application design: - One request to
> > trigger generation of the report - N requests to retrieve report
> > which returns either "still processing" (maybe with an ETA) or
> > "here it is".
>
> +1
>
> I believe this is a better design in the long-run. It also allows you
> to do things like off-line processing of batches without changing your UI.
>
> Another thing you could do is simulate the above by using a
> report-builder thread launched from your servlet, and then have your
> request-processing thread to a flush() on the response (causing
> chunked encoding to be used), then sleep for some amount of time
> (maybe 1-5 seconds), then check the status of the report, then flush()
> again (not sure if it will keep emitting 0-length chunks if you flush
> over and over again), then sleep again.
>
> This seems like a perfect use case for async processing.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTNFd6AAoJEBzwKT+lPKRYANwP/Rx3W5KQQnLzMx/xEY41cix0
> JuAEGxZVQyX5LDwLlB5iivIAGdVqLZxXGP/4on/sIgl+XjC59hkU4N77oLokb3Cl
> heAgUmR9VA4KsUTMeSJmN0Km5lMOzCv3c+Ru5fAjSpsNKgp2SjsitpdGgRfebd1y
> djQfemWIkC6bBHjtW4PbwGkva9Kny8FVx2Ius8f6V+jKcHGLGztWIfy99rR0Oya3
> 2dP/JboBPH0PYW19Jhor7qM7IMJXJjdRSswnBc63e7runvw8hA1DD3KDW0mHceVo
> Q4Q0WW1zRaT1DOzkmQhOs4H68ev20EjV9DZu8Md17kJVrwkeFMN+GGNppLeivzdK
> UZHkEWbZjDZRcIGR0iEQQZGLVCRMImNsm+fBoO6piXrr8UFpzMUqXLMiSuD3Woab
> GFtvydUBuO4gyxAHXh2yW+XJ1iZBSfigUBvTZUKOyS1sEURBKmgTopySuJaKPhYN
> OMYCQ8e5MKbcxl09qp7JRg+H/jfIr9NBgakWrQRe4R1Pox1doMaNZsJufwpkbxH2
> 0CKNuLClIrvQC/iw5D7McB0o5PY5brOMGzWfdb6Psgnrq/4FB3QDdSCbIaQ8JF+E
> GfRZ5D2VE73ueb8dYiElA0t3fEV0DSdqOtxR40IwROlpR6My7HBUVgy/7dxkxEg7
> xXj/B0T5nbShYxZrlw3S
> =RtBD
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat under load && frontend reverse proxy timeouts

2014-03-27 Thread Igor Cicimov
On 27/03/2014 12:39 PM, "Frederik Nosi"  wrote:
>
> Hi all,
>
> Having to deal with slow applications deployed under tomcat, with a
reverse proxy in front, frequently i've noticed that even when the frontend
timeouts and closes it's part of the TCP connection, the Tomcat thread
processing the request goes on and on till it finishes. Is there a way to
make the proccessing thread stop when the frontend connection get's closed?
>
>
> Thanks in advance,
>
> Frederik
>
What kind of application is this? What is the reason that the thread takes
longer than expected? Is it just the load on the app server or its waiting
on the backend database maybe? If load then for sure you can limit the
tomcat connector threads and the accept queue to reduce it and add some
more app servers. If backend connection then you can sync the client
timeout and the db connection timeout.


RE: Tomcat 8 Production read?

2014-03-27 Thread Dennis Ross
I'll help with whatever I can.

Thanks!

From: Christopher Schultz 
Sent: Thursday, March 27, 2014 12:27 PM
To: Tomcat Users List
Subject: Re: Tomcat 8 Production read?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dennis,

On 3/27/14, 12:14 PM, Dennis Ross wrote:
> Is Tomcat 8 enterprise production ready?
>
> Meaning can I use this reliably for clients or should I wait a
> bit?

There has not been a Tomcat 8 release voted as "stable" yet. The
current release under a vote (8.0.5) is likely to pass as "beta".

IIRC, Apache JIRA is running on top of Tomcat 8, so it *is* getting
some in-the-wild play-time.

IMO it's really close, except maybe for the NIO.2 connector which is
completely new and experimental anyway. Looks like there might be a
bug with sendfile in the 8.0.5 build, so you might want to disable
that as well.

It's certainly worth getting into your testing environment. Let us
know if you find anything wrong with it ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNFF+AAoJEBzwKT+lPKRYRnsP/3en7hhvWMD0yYwzVWB1r5QV
IE41VRcEIwHsT2Dr90Wv13Hin78fVH3ndt8QZi1CEoUqOEu8Zd7Mijbkfg1aMYD5
mHDDQNA+kGtl9t7kvcPyGte0WiQYJViyx8clebb38nzitnv9lCaB0n8SgWUGxgdo
a+7ACk+3IwXmuDRXHG9ntvTo3amOai1O5KMgEf4IvU3hoyBAHzffg8I2NU8KwizL
HHJcG6GL9v9YGRNZwaIi5wgkKSXavY0+gtR3BHrccudO2T9T1A9I1i5WZ5uQg6ij
lDCABXPMIWXttktdbyVv+nMyuY3IdJUF5EMbmx4CQ4JGiYqVE4m42qCE36/xxSev
M37ZHCA1glZ7SCr3PB8dDctHKBudHwMZbJYwfB1gVdDeBdep1KTHOc95SYhiILd6
MkuLbmE3HKVQmKhGc2ipdcukRwmqncsBm1cOM4sb2MnJW5E9mT3BpmclsxYmmoh0
oX0QEH9I2slRqoVl+dKRH+cYS/X49Q5AdIywFka16M/0yo6S8ttv6k/inbTZjagN
oqoXDwoZDrI5hxjwmHh7u0d42f91SNx6VySCJPzUjHdfwq/I4eAa6MJ/ZGFt5zeA
0R3wz267/kuq/MIEIYWWnJH2bPQIsZr3EF+FDNUOQCL4ObBCbYnSeDuAdGm9UOze
jbHipXYwm4rCK6WGgiBp
=A2iA
-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: Why Tomcat crashes

2014-03-27 Thread Daniel Mikusa
On Mar 27, 2014, at 3:01 PM, Daniel Mikusa  wrote:

> On Mar 27, 2014, at 2:10 PM, wangke  wrote:
> 
>> 
>> 
>>> Subject: Re: Why Tomcat crashes
>>> From: dmik...@gopivotal.com
>>> Date: Thu, 27 Mar 2014 07:24:38 -0400
>>> To: users@tomcat.apache.org
>>> 
>>> On Mar 27, 2014, at 2:18 AM, wangke  wrote:
>>> 
 
 
 
 Hi All:
 Recently I've encountered a very strange problem, I managed to crash 
 tomcat entirely
>>> 
>>> We need more specifics here. What exactly happens when it crashes? Has the 
>>> process exited? Do you see a JVM crash dump file? Is the process still 
>>> running, but your app is not responding (or responding with 404’s)? or 
>>> something else?
>> 
>> First of all, I can no longer connect to the root directory for tomcat home 
>> page and secondly, I do have a JVM crash dump file.
> 
> Since the JVM is crashing, it’s unlikely to be a Tomcat issue.  Probably 
> something with the native code.  If you can include the dump file output 
> here, perhaps someone can give you some clues as to why it’s crashing.
> 
> Dan
> 
> PS.  the list doesn’t do well with attachments, it often strips them off.  If 
> you just copy and paste stuff inline you should be safe.

Disregard that.  I see the attachment on your last email.  Surprisingly it made 
it through.

Dan


> 
>> 
>> 
>> 
>>> 
 with my application for a few times. Personally, I am quite suspicious 
 about the the settings of a shared library libswipl. What I did according 
 to 
 https://code.google.com/p/javanaproche/wiki/HowToJPL
>>> 
>>> If you’re seeing the process exit, it could be due to a crash in this 
>>> native code. Generally when this happens you’ll get a JVM crash dump file 
>>> in the working directory (or the location of -XX:ErrorFile). You’ll want to 
>>> locate this file as it will contain information about what happened.
>> 
>> Please see the file attached.
>> 
>> 
>> 
>>> 
 is I have Java.library.path point to libswipl for a jar file called JPL (a 
 bidirectional interface between Java and Prolog since I need to run some 
 simple Prolog rules) and then when I start calling JPL provided interface 
 in my application code, the following exceptions are thrown:
 Can anybody help me to figure out what happened exactly, BTW, Tomcat is 
 not crashing all the time but fairly frequent though.
 Thanks very much.
 
 
 
 
 
 
 
 
 WARNING: Error while removing context [/XX]
 java.lang.NoClassDefFoundError: 
 org/apache/struts2/util/ObjectFactoryDestroyable
 at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
 at 
 org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
 at 
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
 at 
 org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
 at 
 org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
 at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
 at 
 org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
 at 
 org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1212)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
 at 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
 at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
 at 
 org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
 at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
 at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
 at 
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
 at java.lang.Thread.run(Thread.java:662)
 Caused by: java.lang.ClassNotFoundException: 
 org.apache.struts2.util.ObjectFactoryDestroyable
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 ... 16 more
>>> 
>>> This looks like you’re missing a JAR file, in particular the one that 
>>> contains “org.apache.struts2.util.ObjectFactoryDestroyable”. Although I’m 
>>> not sure this is critical as it appears to be happening as Tomcat is 
>>> shutting down.
>>> 
>>> Dan
>>> 
 Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
 INFO: Container 
 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[jsp]
  has not been started
 Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
 I

Re: Why Tomcat crashes

2014-03-27 Thread Daniel Mikusa
On Mar 27, 2014, at 2:10 PM, wangke  wrote:

> 
> 
> > Subject: Re: Why Tomcat crashes
> > From: dmik...@gopivotal.com
> > Date: Thu, 27 Mar 2014 07:24:38 -0400
> > To: users@tomcat.apache.org
> > 
> > On Mar 27, 2014, at 2:18 AM, wangke  wrote:
> > 
> > > 
> > > 
> > > 
> > > Hi All:
> > > Recently I've encountered a very strange problem, I managed to crash 
> > > tomcat entirely
> > 
> > We need more specifics here. What exactly happens when it crashes? Has the 
> > process exited? Do you see a JVM crash dump file? Is the process still 
> > running, but your app is not responding (or responding with 404’s)? or 
> > something else?
> 
> First of all, I can no longer connect to the root directory for tomcat home 
> page and secondly, I do have a JVM crash dump file.

Since the JVM is crashing, it’s unlikely to be a Tomcat issue.  Probably 
something with the native code.  If you can include the dump file output here, 
perhaps someone can give you some clues as to why it’s crashing.

Dan

PS.  the list doesn’t do well with attachments, it often strips them off.  If 
you just copy and paste stuff inline you should be safe.

> 
> 
> 
> > 
> > > with my application for a few times. Personally, I am quite suspicious 
> > > about the the settings of a shared library libswipl. What I did according 
> > > to 
> > > https://code.google.com/p/javanaproche/wiki/HowToJPL
> > 
> > If you’re seeing the process exit, it could be due to a crash in this 
> > native code. Generally when this happens you’ll get a JVM crash dump file 
> > in the working directory (or the location of -XX:ErrorFile). You’ll want to 
> > locate this file as it will contain information about what happened.
> 
> Please see the file attached.
> 
> 
> 
> > 
> > > is I have Java.library.path point to libswipl for a jar file called JPL 
> > > (a bidirectional interface between Java and Prolog since I need to run 
> > > some simple Prolog rules) and then when I start calling JPL provided 
> > > interface in my application code, the following exceptions are thrown:
> > > Can anybody help me to figure out what happened exactly, BTW, Tomcat is 
> > > not crashing all the time but fairly frequent though.
> > > Thanks very much.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > WARNING: Error while removing context [/XX]
> > > java.lang.NoClassDefFoundError: 
> > > org/apache/struts2/util/ObjectFactoryDestroyable
> > > at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
> > > at 
> > > org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
> > > at 
> > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
> > > at 
> > > org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
> > > at 
> > > org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
> > > at 
> > > org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
> > > at 
> > > org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
> > > at 
> > > org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1212)
> > > at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
> > > at 
> > > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
> > > at 
> > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
> > > at 
> > > org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
> > > at 
> > > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
> > > at 
> > > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
> > > at 
> > > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
> > > at java.lang.Thread.run(Thread.java:662)
> > > Caused by: java.lang.ClassNotFoundException: 
> > > org.apache.struts2.util.ObjectFactoryDestroyable
> > > at 
> > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
> > > ... 16 more
> > 
> > This looks like you’re missing a JAR file, in particular the one that 
> > contains “org.apache.struts2.util.ObjectFactoryDestroyable”. Although I’m 
> > not sure this is critical as it appears to be happening as Tomcat is 
> > shutting down.
> > 
> > Dan
> > 
> > > Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
> > > INFO: Container 
> > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[jsp]
> > >  has not been started
> > > Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
> > > INFO: Container 
> > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[default]
> > >  has

RE: Why Tomcat crashes

2014-03-27 Thread wangke


> Date: Thu, 27 Mar 2014 12:20:28 -0400
> From: ch...@christopherschultz.net
> To: users@tomcat.apache.org
> Subject: Re: Why Tomcat crashes
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Wangke,
> 
> On 3/27/14, 2:18 AM, wangke wrote:
> > Hi All: Recently I've encountered a very strange problem, I managed
> > to crash tomcat entirely with my application for a few times.
> > Personally,  I am quite suspicious about the the settings of a
> > shared library libswipl. What I did according to 
> > https://code.google.com/p/javanaproche/wiki/HowToJPL is I have
> > Java.library.path point to libswipl for a jar file called JPL (a
> > bidirectional interface between Java and Prolog since I need to run
> > some simple Prolog rules) and then when I start calling JPL
> > provided interface in my application code, the following exceptions
> > are thrown:
> 
> That sounds like a lot of fun!
> 
> > Can anybody help me to figure out what happened exactly, BTW,
> > Tomcat is not crashing all the time but fairly frequent though. 
> > Thanks very much.
> > 
> > WARNING: Error while removing context [/XX] 
> > java.lang.NoClassDefFoundError:
> > org/apache/struts2/util/ObjectFactoryDestroyable at
> > org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
> >
> > 
> at
> org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
> > at
> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
> >
> > 
> at
> org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
> > at
> > org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
> >
> > 
> at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
> > at
> > org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
> >
> > 
> at
> org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1212)
> > at
> > org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382) 
> > at
> > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
> >
> > 
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
> > at
> > org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
> >
> > 
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
> > at
> > org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
> >
> > 
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
> > at java.lang.Thread.run(Thread.java:662) Caused by:
> > java.lang.ClassNotFoundException:
> > org.apache.struts2.util.ObjectFactoryDestroyable at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
> >
> > 
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
> > ... 16 more Mar 26, 2014 6:18:51 PM
> > org.apache.catalina.core.ContainerBase stop INFO: Container
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[jsp]
> > has not been started Mar 26, 2014 6:18:51 PM
> > org.apache.catalina.core.ContainerBase stop INFO: Container
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[default]
> > has not been started Mar 26, 2014 6:18:51 PM
> > org.apache.catalina.startup.HostConfig checkResources WARNING:
> > Error during context [/XX] destroy 
> > java.lang.NoClassDefFoundError:
> > org/apache/struts2/util/ObjectFactoryDestroyable at
> > org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
> >
> > 
> at
> org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
> > at
> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
> >
> > 
> at
> org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
> > at
> > org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
> >
> > 
> at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
> > at
> > org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1176)
> >
> > 
> at
> org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4976)
> > at
> > org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1219)
> >
> > 
> at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
> > at
> > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
> >
> > 
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
> > at
> > org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
> >
> > 
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.

Re: Realm ldaps

2014-03-27 Thread Leo Donahue
On Thu, Mar 27, 2014 at 10:20 AM,  wrote:

> > -Ursprüngliche Nachricht-
> > Von: Leo Donahue [mailto:donahu...@gmail.com]
> > Gesendet: Donnerstag, 27. März 2014 17:54
> > An: Tomcat Users List
> > Betreff: Re: Realm ldaps
> >
> > On Thu, Mar 27, 2014 at 8:45 AM,  wrote:
> >
> > > Hello,
> > >
> > > I like to change my ldap jndirealm to ldaps.
> > >
> > >   
> > >  > > className="org.apache.catalina.realm.UserDatabaseRealm"
> > > resourceName="UserDatabase"/>
> > >  > className="org.apache.catalina.realm.JNDIRealm"
> > >
> > > connectionName="CN=SVC_TomcatLdapQuery,OU=Service
> > > Accounts,OU=Hamburg,OU=SITES,OU=\#KONFIGURATION,DC=,DC=de"
> > >
> > > How do you get away with an empty domainComponent?  DC= ?
>
> Sorry for confusing, this seems to be a mistake. In my orginal config I of
> course got DC=DOM,DC=de.
>
> Does fixing that solve the issue?  Does Tomcat start with this
configuration?  Anything in the logs?


AW: Realm ldaps

2014-03-27 Thread Bjoern.Becker
> -Ursprüngliche Nachricht-
> Von: Leo Donahue [mailto:donahu...@gmail.com]
> Gesendet: Donnerstag, 27. März 2014 17:54
> An: Tomcat Users List
> Betreff: Re: Realm ldaps
> 
> On Thu, Mar 27, 2014 at 8:45 AM,  wrote:
> 
> > Hello,
> >
> > I like to change my ldap jndirealm to ldaps.
> >
> >   
> >  > className="org.apache.catalina.realm.UserDatabaseRealm"
> > resourceName="UserDatabase"/>
> >  className="org.apache.catalina.realm.JNDIRealm"
> >
> > connectionName="CN=SVC_TomcatLdapQuery,OU=Service
> > Accounts,OU=Hamburg,OU=SITES,OU=\#KONFIGURATION,DC=,DC=de"
> >
> > How do you get away with an empty domainComponent?  DC= ?

Sorry for confusing, this seems to be a mistake. In my orginal config I of 
course got DC=DOM,DC=de. 

> 
> This doesn't say you can't have an empty name, but why would you.  Just
> curious.
> http://msdn.microsoft.com/en-us/library/aa366101%28v=vs.85%29.aspx

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



Re: Realm ldaps

2014-03-27 Thread Leo Donahue
On Thu, Mar 27, 2014 at 8:45 AM,  wrote:

> Hello,
>
> I like to change my ldap jndirealm to ldaps.
>
>   
>  className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
>  connectionName="CN=SVC_TomcatLdapQuery,OU=Service
> Accounts,OU=Hamburg,OU=SITES,OU=\#KONFIGURATION,DC=,DC=de"
>
> How do you get away with an empty domainComponent?  DC= ?

This doesn't say you can't have an empty name, but why would you.  Just
curious.
http://msdn.microsoft.com/en-us/library/aa366101%28v=vs.85%29.aspx


Re: Is it possible to send a 'keep-alive' packet back to client session every x seconds?

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 3/27/14, 5:38 AM, Mark Thomas wrote:
> On 27/03/2014 03:08, Matthew Turany wrote:
>> Is it possible to configure either apache or tomcat to send a
>> packet every x number of seconds so that at the client end the
>> gateway thinks the session is still active and will keep the
>> connection open, or is this something best put into the actual
>> web app?
> 
> http://tomcat.apache.org/connectors-doc/reference/workers.html 
> socket_keepalive
> 
> You'll need to configure the OS to send the packets frequently
> enough.
> 
> Alternatively, change the application design: - One request to
> trigger generation of the report - N requests to retrieve report
> which returns either "still processing" (maybe with an ETA) or
> "here it is".

+1

I believe this is a better design in the long-run. It also allows you
to do things like off-line processing of batches without changing your UI.

Another thing you could do is simulate the above by using a
report-builder thread launched from your servlet, and then have your
request-processing thread to a flush() on the response (causing
chunked encoding to be used), then sleep for some amount of time
(maybe 1-5 seconds), then check the status of the report, then flush()
again (not sure if it will keep emitting 0-length chunks if you flush
over and over again), then sleep again.

This seems like a perfect use case for async processing.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNFd6AAoJEBzwKT+lPKRYANwP/Rx3W5KQQnLzMx/xEY41cix0
JuAEGxZVQyX5LDwLlB5iivIAGdVqLZxXGP/4on/sIgl+XjC59hkU4N77oLokb3Cl
heAgUmR9VA4KsUTMeSJmN0Km5lMOzCv3c+Ru5fAjSpsNKgp2SjsitpdGgRfebd1y
djQfemWIkC6bBHjtW4PbwGkva9Kny8FVx2Ius8f6V+jKcHGLGztWIfy99rR0Oya3
2dP/JboBPH0PYW19Jhor7qM7IMJXJjdRSswnBc63e7runvw8hA1DD3KDW0mHceVo
Q4Q0WW1zRaT1DOzkmQhOs4H68ev20EjV9DZu8Md17kJVrwkeFMN+GGNppLeivzdK
UZHkEWbZjDZRcIGR0iEQQZGLVCRMImNsm+fBoO6piXrr8UFpzMUqXLMiSuD3Woab
GFtvydUBuO4gyxAHXh2yW+XJ1iZBSfigUBvTZUKOyS1sEURBKmgTopySuJaKPhYN
OMYCQ8e5MKbcxl09qp7JRg+H/jfIr9NBgakWrQRe4R1Pox1doMaNZsJufwpkbxH2
0CKNuLClIrvQC/iw5D7McB0o5PY5brOMGzWfdb6Psgnrq/4FB3QDdSCbIaQ8JF+E
GfRZ5D2VE73ueb8dYiElA0t3fEV0DSdqOtxR40IwROlpR6My7HBUVgy/7dxkxEg7
xXj/B0T5nbShYxZrlw3S
=RtBD
-END PGP SIGNATURE-

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



Re: Scripting Tomcat installation versus multiple instances

2014-03-27 Thread David kerber

On 3/27/2014 12:11 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

David,



...



Yes, it is.  When I am setting up a new install, I do the windows
install and then unzip the .zip package on top of it, so I have all
the .bat files as well.  I don't fully automate my installations,
but I do some scripting to make it easier to be consistent with my
naming and configuration.


https://issues.apache.org/bugzilla/show_bug.cgi?id=56323

Vote for it.


done


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



Re: Tomcat 8 Production read?

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dennis,

On 3/27/14, 12:14 PM, Dennis Ross wrote:
> Is Tomcat 8 enterprise production ready?
> 
> Meaning can I use this reliably for clients or should I wait a
> bit?

There has not been a Tomcat 8 release voted as "stable" yet. The
current release under a vote (8.0.5) is likely to pass as "beta".

IIRC, Apache JIRA is running on top of Tomcat 8, so it *is* getting
some in-the-wild play-time.

IMO it's really close, except maybe for the NIO.2 connector which is
completely new and experimental anyway. Looks like there might be a
bug with sendfile in the 8.0.5 build, so you might want to disable
that as well.

It's certainly worth getting into your testing environment. Let us
know if you find anything wrong with it ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNFF+AAoJEBzwKT+lPKRYRnsP/3en7hhvWMD0yYwzVWB1r5QV
IE41VRcEIwHsT2Dr90Wv13Hin78fVH3ndt8QZi1CEoUqOEu8Zd7Mijbkfg1aMYD5
mHDDQNA+kGtl9t7kvcPyGte0WiQYJViyx8clebb38nzitnv9lCaB0n8SgWUGxgdo
a+7ACk+3IwXmuDRXHG9ntvTo3amOai1O5KMgEf4IvU3hoyBAHzffg8I2NU8KwizL
HHJcG6GL9v9YGRNZwaIi5wgkKSXavY0+gtR3BHrccudO2T9T1A9I1i5WZ5uQg6ij
lDCABXPMIWXttktdbyVv+nMyuY3IdJUF5EMbmx4CQ4JGiYqVE4m42qCE36/xxSev
M37ZHCA1glZ7SCr3PB8dDctHKBudHwMZbJYwfB1gVdDeBdep1KTHOc95SYhiILd6
MkuLbmE3HKVQmKhGc2ipdcukRwmqncsBm1cOM4sb2MnJW5E9mT3BpmclsxYmmoh0
oX0QEH9I2slRqoVl+dKRH+cYS/X49Q5AdIywFka16M/0yo6S8ttv6k/inbTZjagN
oqoXDwoZDrI5hxjwmHh7u0d42f91SNx6VySCJPzUjHdfwq/I4eAa6MJ/ZGFt5zeA
0R3wz267/kuq/MIEIYWWnJH2bPQIsZr3EF+FDNUOQCL4ObBCbYnSeDuAdGm9UOze
jbHipXYwm4rCK6WGgiBp
=A2iA
-END PGP SIGNATURE-

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



Re: {OT] Scripting Tomcat installation versus multiple instances

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 3/27/14, 12:13 PM, André Warnier wrote:
> Christopher Schultz wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
>> 
>> André,
>> 
>> On 3/26/14, 3:35 PM, André Warnier wrote:
>>> Despite your name, you are too quick (and not lazy enough).
>>> You could have waited an hour, to get that solution right here.
>>> ;-)
>> 
>> Please don't top-post.
>> 
>> - -chris
>> 
>> (Sorry... just had to do that)
> 
> Well, you top-post all the time ! (see above)

Do I?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNE/7AAoJEBzwKT+lPKRYy2oP/0+krojpRSJWrukMOU1wb3ET
D0ssGvojcv2vrr7zoSeGTvEV0Y+OxxalDNSOKMZsDaLwj9AkBnfGRYrMBDahnyNq
cifzB3kK2G826sCg6owGv6gsd+YFJ03tqB9nuPpNtt/jTmafjDRSEEnBdj2VK3xr
ZTnUSMz+jZ1EAy/OQAd4oIa5jOh5CxBsZa9Dux7MbGLV2UudqoKxTCjLx7I7FpWp
p2zUuh3vNiF1XWNvxXnkLYB9xNHyPwPbfv6eRBXj9v5G993K6EalKMFPMoQcgw1k
vzpboDVidjNHetWdIXbYDSIhFdgqhcZX7Gz0YrZ/yUDv77Mxr+Uu7xUAV3E+J2Z/
9Sxx87C+dHGhatj8Q4SZScoDOHq+uInJLULq5KS18tprcDf6wOD4EBx2oTGw0npa
pzZQaL5JXK/36K0ZpbkGQZWoxdh5ztPU25P6+HIOyo5EEeLvFNFWP2pClvaZcy4S
98S8G1OZvQpJrzc1RvBzd4a5Uxt+Jr0+KJCXqZAB976Wg8QwtaqGOAox0nvZpXqz
/S6yRl/FOGskiXbNMrTeB9lztWECwZLA+WOhdyqERyElvbKNAr2aI9rZIs829QjF
Xtb9VVkoa55otSmnNmIKE1DNClm44uOJhcLeMAZu8gEPCNqfs3wG7R0Sis67BlRL
6oTQlJto6mAzgscr8rg6
=9d0b
-END PGP SIGNATURE-

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



Re: Tomcat 8 Production read?

2014-03-27 Thread Daniel Mikusa
On Mar 27, 2014, at 12:14 PM, Dennis Ross  wrote:

> Is Tomcat 8 enterprise production ready?

It’s a judgement call, but you should probably wait till there is a stable 
release first.  See here for definition of Alpha / Beta / Stable.

  http://tomcat.apache.org/whichversion.html

> Meaning can I use this reliably for clients or should I wait a bit?

It’s a good time to start using it in development and testing environments.  
That way you can find and help squash bugs.

Dan

> 
> Thanks?


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



Re: Why Tomcat crashes

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Wangke,

On 3/27/14, 2:18 AM, wangke wrote:
> Hi All: Recently I've encountered a very strange problem, I managed
> to crash tomcat entirely with my application for a few times.
> Personally,  I am quite suspicious about the the settings of a
> shared library libswipl. What I did according to 
> https://code.google.com/p/javanaproche/wiki/HowToJPL is I have
> Java.library.path point to libswipl for a jar file called JPL (a
> bidirectional interface between Java and Prolog since I need to run
> some simple Prolog rules) and then when I start calling JPL
> provided interface in my application code, the following exceptions
> are thrown:

That sounds like a lot of fun!

> Can anybody help me to figure out what happened exactly, BTW,
> Tomcat is not crashing all the time but fairly frequent though. 
> Thanks very much.
> 
> WARNING: Error while removing context [/XX] 
> java.lang.NoClassDefFoundError:
> org/apache/struts2/util/ObjectFactoryDestroyable at
> org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
>
> 
at
org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
> at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
>
> 
at
org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
> at
> org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
>
> 
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
> at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
>
> 
at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1212)
> at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382) 
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
>
> 
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
> at
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
>
> 
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
>
> 
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
> at java.lang.Thread.run(Thread.java:662) Caused by:
> java.lang.ClassNotFoundException:
> org.apache.struts2.util.ObjectFactoryDestroyable at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
>
> 
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
> ... 16 more Mar 26, 2014 6:18:51 PM
> org.apache.catalina.core.ContainerBase stop INFO: Container
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[jsp]
> has not been started Mar 26, 2014 6:18:51 PM
> org.apache.catalina.core.ContainerBase stop INFO: Container
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[default]
> has not been started Mar 26, 2014 6:18:51 PM
> org.apache.catalina.startup.HostConfig checkResources WARNING:
> Error during context [/XX] destroy 
> java.lang.NoClassDefFoundError:
> org/apache/struts2/util/ObjectFactoryDestroyable at
> org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
>
> 
at
org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
> at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
>
> 
at
org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
> at
> org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
>
> 
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
> at
> org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1176)
>
> 
at
org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4976)
> at
> org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1219)
>
> 
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
>
> 
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
> at
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
>
> 
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
>
> 
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
> at java.lang.Thread.run(Thread.java:662) Mar 26, 2014 6:19:05 PM
> org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote

Tomcat 8 Production read?

2014-03-27 Thread Dennis Ross
Is Tomcat 8 enterprise production ready?

Meaning can I use this reliably for clients or should I wait a bit?

Thanks?


Re: {OT] Scripting Tomcat installation versus multiple instances

2014-03-27 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 3/26/14, 3:35 PM, André Warnier wrote:

Despite your name, you are too quick (and not lazy enough). You
could have waited an hour, to get that solution right here. ;-)


Please don't top-post.

- -chris

(Sorry... just had to do that)


Well, you top-post all the time !
(see above)


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



Re: Scripting Tomcat installation versus multiple instances

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

David,

On 3/26/14, 3:35 PM, David kerber wrote:
> On 3/26/2014 3:25 PM, André Warnier wrote:
>> Leo Donahue wrote:
>>> On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif < 
>>> sebastien.tardif.contrac...@gmo.com> wrote:
>>> 
 I'm confused by the commands given by Tomcat documentation
 about creating different instances, it says: "service install
 instance1" but "service" is not a command provided by Tomcat
 or Windows, see 
 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances




 
Almost everything I'm trying to automate using that page is not
 working, maybe it's rare people automate installation on
 Windows?
 
>>> 
>>> The service command is located here:
>>> \apache-tomcat-7.0.52\bin
>>> 
>>> change directories to this location and run that command.
>>> 
>> 
>> Maybe also the OP did not download the correct package to have
>> that command. For some reason which is still mysterious to me,
>> the "Service Installer" package does not contain all the files
>> which the ZIP package contains. And "bin/service.bat" is probably
>> among the ones missing.
> 
> Yes, it is.  When I am setting up a new install, I do the windows 
> install and then unzip the .zip package on top of it, so I have all
> the .bat files as well.  I don't fully automate my installations,
> but I do some scripting to make it easier to be consistent with my
> naming and configuration.

https://issues.apache.org/bugzilla/show_bug.cgi?id=56323

Vote for it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNE2VAAoJEBzwKT+lPKRYicoP/0wJYICuyIYTdbWeNEaxAVbA
SPyrBpoiXRPZAMFm/tW0Epk2ruiVh/9SCqT3M1nbCM+ThBzMEYjaWf38v1zaGVgb
HQUSww/2Vz7D3ZuuQz9GHA4OD9+5l+FFkTE6qAMZf6q9oEyzu6/ySGGyzWYVSRdw
T+Buy6ZQHCVgbgB9wzZbGyHgwULEKnf/GUbCIlpx+kAiHhqnTPl/6QiXJpBaUPoE
ZO7HPUNZFG/P2yjORalP/xsU0l2R/74pmySFUd8lP5oLevMNt3hoqjWHV1rVROuV
pFpnaNPnbo2aeCHh1RNXNPP57ieiTmSdHgm+LghfPG7aVXPW1vsw5T10VqlxuEWN
mf+GAmlpVzQl0NkqoIW4T0A0yjrVJHXqMmPnzQEE5xc7wwL86h/B2A+Gs47tXVrQ
lvuicmQkqKJOyanriJ+dvP5ddDPKDlPPf4/oeLqZoPqpajpWI4/uAL4AhV24I7Lt
sls4pR/rMc23ytujodKu3A+alANL6cz/279aHOUqkkpNOe5NuPqr9T1Vn/c4fPKr
PXwzEmtVOLX4VRkB+bohqya5xwsb7lkDmzrS7LPAQj9/pd0lnVDd+2P0O02yvDM5
kaZIeRK4qa6RGJIcGv81hpiskbT3dcv23ALfYuQu87/MMeiNkDspY0OoZIRJS/qO
jB6BBGKGgYLQYsIHUDVu
=Amxm
-END PGP SIGNATURE-

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



Re: Scripting Tomcat installation versus multiple instances

2014-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 3/26/14, 3:35 PM, André Warnier wrote:
> Despite your name, you are too quick (and not lazy enough). You
> could have waited an hour, to get that solution right here. ;-)

Please don't top-post.

- -chris

(Sorry... just had to do that)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTNE0BAAoJEBzwKT+lPKRYZRYQAKaYJRoB4M4Fm4NnIW3Q2Ng/
Fs1dk96Ad1HdIPWgYUjnzRS3oOXXW+2ocOnn1LXUctjQRsdkruY0PmwrYThUZ8zB
lZmJgSFBoi3w1c+HJ3KTchnx8+VQUDOeR0r++hmpvl0j92yNQz0a4mr7muyvoMs2
e7TAM3dRMAkcCX/W8In0SsOweHaSpUTOAnEkzGG4tGZKaPvAJ4fIEQ2Jra7bcHqQ
U/u2VRlcXBemIoeOFYGANek1v/hvu7NelhDLwMLHgJYFoktxjSyWKpZ187OOkuU9
g/WOM2WIa/TzCMEPtA8QhD45biJmE+l4vvR4ScVgeC3eIxT0F6jNwvvcflEDEo0/
+SWonwmrKGvKbgvgBLM0VRXfbNXbFmaw1Vo8liT077BsmYNFrSP7eN51iiePH025
0O7dGAJQyi5fe3w6JP4WHh1rbYKOzmJMyyMQjKItSzy6Y07fK6qpbekb4VxnLrev
Rvq0Xh/xpqgj1mtKip7JFBbJl1m/wu6suJCGuUOukm4sCqjcTYNUCBL67Md/ilR+
6baBdUvNriznVxJsY7AOqAa5rCnU6iyBTOdBvduuw25+gED45aLpJUuL+OuHl5Ij
2U8s2rKWdrvIKWLpdRl8BYZksbQr7yMV5JJrh5ce679GHrduJv1xLkggdQRr5HMu
kpvX512awxPkrnJ0xGkX
=UxeD
-END PGP SIGNATURE-

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



Realm ldaps

2014-03-27 Thread Bjoern.Becker
Hello,

I like to change my ldap jndirealm to ldaps.

  


  

Unfortunately, it's not working yet. I guess I need to disabled client cert 
verification, but I can't find any option for Realms.

Do you know such an option? 


Best Regards,
Bjoern



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



Re: Tomcat under load && frontend reverse proxy timeouts

2014-03-27 Thread Frederik Nosi

Hi Andre',

On 03/27/2014 02:37 PM, André Warnier wrote:

Frederik Nosi wrote:

First thanks for your reply,

On 03/27/2014 10:32 AM, Mark Thomas wrote:

On 27/03/2014 01:39, Frederik Nosi wrote:

Hi all,

Having to deal with slow applications deployed under tomcat, with a
reverse proxy in front, frequently i've noticed that even when the
frontend timeouts and closes it's part of the TCP connection, the 
Tomcat
thread processing the request goes on and on till it finishes. Is 
there

a way to make the proccessing thread stop when the frontend connection
get's closed?

No.



Any hints on how to deal with situations like this?



This is basically an issue similar to the one that is the subject of 
the other message thread "Re: Is it possible to send a 'keep-alive' 
packet back to client session every x seconds?".


Not exactly, it's the opposite scenario, the load balancer and the 
firewall / NAT part is fine. Probably my english is a bit poor. What i 
wanted to acchieve is, without having the possibility to modify the 
webapp, when the uplink request (this can be mod_jk/apache or user's 
browser, whatever calls the application) timeouts to find a way to stop 
the tomcat / webapp proccessing thread. Though from Mark's reply i 
understand that this is not possible with tomcat. So, at this point, 
having to deal with such webapps, is there some common solution?


My problem is that the failover mecchanism (mod_jk in my case) during 
peak usage amplifies the load on the application servers, it's a spiral 
of death :-)


How do you guys deal with this situations?




AFAIK, the only portable way to detect this situation, is by forcing 
the web application to regularly send some output to the client.  If 
the connection has been closed, it will then (*) get an exception, 
which it can handle.


in mod_jk cping/cpong, or the TCP stack (keepalive tcp). But is not my 
scenario unfortunately.


Anyway, thanks for your reply!



It implies that the webapp itself is not blocked waiting on some 
separate resource, and can regularly break out of its own main 
processing to send such output, resuming its main work if the result 
is ok.


(*) with possibly some delay before everything gets flushed all the 
way to the client connection, and the disconnected state makes its way 
back up the chain.


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



Frederik

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



Re: Tomcat under load && frontend reverse proxy timeouts

2014-03-27 Thread André Warnier

Frederik Nosi wrote:

First thanks for your reply,

On 03/27/2014 10:32 AM, Mark Thomas wrote:

On 27/03/2014 01:39, Frederik Nosi wrote:

Hi all,

Having to deal with slow applications deployed under tomcat, with a
reverse proxy in front, frequently i've noticed that even when the
frontend timeouts and closes it's part of the TCP connection, the Tomcat
thread processing the request goes on and on till it finishes. Is there
a way to make the proccessing thread stop when the frontend connection
get's closed?

No.



Any hints on how to deal with situations like this?



This is basically an issue similar to the one that is the subject of the other message 
thread "Re: Is it possible to send a 'keep-alive' packet back to client session every x 
seconds?".


AFAIK, the only portable way to detect this situation, is by forcing the web application 
to regularly send some output to the client.  If the connection has been closed, it will 
then (*) get an exception, which it can handle.
It implies that the webapp itself is not blocked waiting on some separate resource, and 
can regularly break out of its own main processing to send such output, resuming its main 
work if the result is ok.


(*) with possibly some delay before everything gets flushed all the way to the client 
connection, and the disconnected state makes its way back up the chain.


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



Re: AW: tomcat 5.5.26 misses a jar contaning org.apache.tomcat.core.BaseInterceptor . . .

2014-03-27 Thread Mark Thomas
On 27/03/2014 11:58, Stadelmann Josef wrote:
> Hi Mark 
> 
> My comment below  ++>
> 
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Mark Thomas [mailto:ma...@apache.org] 
> Gesendet: Mittwoch, 26. März 2014 20:53
> An: Tomcat Users List
> Betreff: Re: tomcat 5.5.26 misses a jar contaning 
> org.apache.tomcat.core.BaseInterceptor . . .
> 
> On 26/03/2014 19:10, Stadelmann Josef wrote:
>> For trouble shooting I am about to build an old version 5.5.26 of 
>> Apache Jakarta Tomcat
> 
> Why not just download a binary distribution from the ASF archives?
> ++> as I said, I have to trouble shoot and look at the code

You still do not need to build from source. If you want to debug a
particular version of Tomcat, download the binary and the source
bundles. Run the binary in JPDA mode, connect with your IDE and when
your IDE asks for source code, point it at the downloaded source.


> i.e. debugging it to find what triggers a background process at random 
> destroying all our contexts?
> 
> ++> Also, why binary? hmmm, our Tomcat runs on OpenVMS 8.4

So? This is Java. You can still use binary distributions from the ASF.

>> And I am missing a jar containing at least the following 4 members
>>
>> import org.apache.tomcat.core.BaseInterceptor;
>> import org.apache.tomcat.core.Context; import 
>> org.apache.tomcat.core.ContextManager;
>> import org.apache.tomcat.core.TomcatException;
> 
> None of those classes exist in the 5.5.x branch. Neither will you find them 
> in 4.0.x, 4.1.x, 5.0.x, 6.0.x, 7.0.x or 8.0.x.
> ++> how can you assume that 5.526 will build without this classes either as 
> source in a sub project or in a jar?
> (which one?)

It is not an assumption. It is knowledge. That knowledge is based on 10+
years as a Tomcat committer including several years where I was building
5.5.x from source multiple times on a daily basis.

> Those classes are from Tomcat 3.3.x (and possibly earlier).
> ++> I hope I will get it?
> 
>> using SVN Tourtoise I to download the project; It does not build and
> 
> Sure it does, if you follow the build instructions correctly. 
> Granted for 5.5.x that is more complicated than it is for 6.0.x onwards but 
> it is doable.
> ++> OK that is motivation to startr over again,

Again, you don't need to build Tomcat.

> ++> BUT tell me how can it build without the mentioned classes not found by 
> import?
> ++> when do they come down (downloaded somehow external to the sources of 
> 5.5.26

Again, those classes are not part of Tomcat 5.5.26. I have no interest
in helping you understand how you screwed up your build environment so
badly that you think you need classes from Tomcat 3.x for a Tomcat 5.5.x
build.

>> I cannot find the files above with this tags version
> 
> You won't. See explanation above.
> 
>> I have started to maven-ise this project, and are fare almost,
> 
> Why? Why? Why?
> 
> You have downloaded a project that uses Ant and was never structured to work 
> with Maven. 
> The chances of you getting a valid 5.5.x build using Maven are close to zero.
> ++> OK,would not have done so if the ant build would build;

So rather than fix the Ant build you decided to try and get it to build
with Maven? Bad decision.

> ++> BTW which java jdk was used for 5.5.26 builds?

Tomcat is always built with the minimum Java version required by the
specifications that it implements so for Java 5.5.x that would be Java 1.4.

>> but struggle so far to find this members above, better I like to find 
>> the jar file with the package org.apache.tomcat.core
> 
> I think you need to decide what version it is you actually want first.
> ++> I just want to build tomcat 5.5.26 

No you don't. And that is a major part of the problem here. What you
want to be able to do is find out why contexts are getting undeployed.

You have made a number of poor decisions up to this point. You need to
stop and re-focus on the problem you are trying to solve.

I strongly encourage you to (re-)start by looking at what triggers the
undeployment process. If nothing comes of that then debugging is a
possible future step but not one that would require you to build Tomcat
from source.

Better yet, I'll try and save you some time. Undeployment is triggered
when Tomcat thinks that a WAR and/or directory has been deleted. Are all
the components of your installation - including the web applications -
installed on local disks? Is any form of network storage involved?

Mark

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



AW: tomcat 5.5.26 misses a jar contaning org.apache.tomcat.core.BaseInterceptor . . .

2014-03-27 Thread Stadelmann Josef
Hi Mark 

My comment below  ++>




-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:ma...@apache.org] 
Gesendet: Mittwoch, 26. März 2014 20:53
An: Tomcat Users List
Betreff: Re: tomcat 5.5.26 misses a jar contaning 
org.apache.tomcat.core.BaseInterceptor . . .

On 26/03/2014 19:10, Stadelmann Josef wrote:
> For trouble shooting I am about to build an old version 5.5.26 of 
> Apache Jakarta Tomcat

Why not just download a binary distribution from the ASF archives?
++> as I said, I have to trouble shoot and look at the code 
i.e. debugging it to find what triggers a background process at random 
destroying all our contexts?

++> Also, why binary? hmmm, our Tomcat runs on OpenVMS 8.4

> And I am missing a jar containing at least the following 4 members
> 
> import org.apache.tomcat.core.BaseInterceptor;
> import org.apache.tomcat.core.Context; import 
> org.apache.tomcat.core.ContextManager;
> import org.apache.tomcat.core.TomcatException;

None of those classes exist in the 5.5.x branch. Neither will you find them in 
4.0.x, 4.1.x, 5.0.x, 6.0.x, 7.0.x or 8.0.x.
++> how can you assume that 5.526 will build without this classes either as 
source in a sub project or in a jar?
(which one?)

Those classes are from Tomcat 3.3.x (and possibly earlier).
++> I hope I will get it?

> using SVN Tourtoise I to download the project; It does not build and

Sure it does, if you follow the build instructions correctly. 
Granted for 5.5.x that is more complicated than it is for 6.0.x onwards but it 
is doable.
++> OK that is motivation to startr over again, 
++> BUT tell me how can it build without the mentioned classes not found by 
import?
++> when do they come down (downloaded somehow external to the sources of 5.5.26


> I cannot find the files above with this tags version

You won't. See explanation above.

> I have started to maven-ise this project, and are fare almost,

Why? Why? Why?

You have downloaded a project that uses Ant and was never structured to work 
with Maven. 
The chances of you getting a valid 5.5.x build using Maven are close to zero.
++> OK,would not have done so if the ant build would build; 
++> BTW which java jdk was used for 5.5.26 builds?

> but struggle so far to find this members above, better I like to find 
> the jar file with the package org.apache.tomcat.core

I think you need to decide what version it is you actually want first.
++> I just want to build tomcat 5.5.26 

> maybe somebody can give me groupId and artifactId and the maven repository 
> link.
> 
> Looking at maven central is a no go either unless I did a mistake.

Going back that far, only a few versions were uploaded to Maven. 
It depends exactly which version you want. 
You'd be better off (once you have decided which version that is) getting it 
from the ASF archives.
++> I toke it down using svn from apache asf archive
++> Josef

Mark


-
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 under load && frontend reverse proxy timeouts

2014-03-27 Thread Frederik Nosi

First thanks for your reply,

On 03/27/2014 10:32 AM, Mark Thomas wrote:

On 27/03/2014 01:39, Frederik Nosi wrote:

Hi all,

Having to deal with slow applications deployed under tomcat, with a
reverse proxy in front, frequently i've noticed that even when the
frontend timeouts and closes it's part of the TCP connection, the Tomcat
thread processing the request goes on and on till it finishes. Is there
a way to make the proccessing thread stop when the frontend connection
get's closed?

No.



Any hints on how to deal with situations like this?


Mark



Frederik.


-
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: Why Tomcat crashes

2014-03-27 Thread Daniel Mikusa
On Mar 27, 2014, at 2:18 AM, wangke  wrote:

> 
> 
> 
> Hi All:
> Recently I've encountered a very strange problem, I managed to crash tomcat 
> entirely

We need more specifics here.  What exactly happens when it crashes?  Has the 
process exited?  Do you see a JVM crash dump file?  Is the process still 
running, but your app is not responding (or responding with 404’s)?  or 
something else?

> with my application for a few times. Personally,  I am quite suspicious about 
> the the settings of a shared library libswipl. What I did according to 
> https://code.google.com/p/javanaproche/wiki/HowToJPL

If you’re seeing the process exit, it could be due to a crash in this native 
code.  Generally when this happens you’ll get a JVM crash dump file in the 
working directory (or the location of -XX:ErrorFile).  You’ll want to locate 
this file as it will contain information about what happened.

> is I have Java.library.path point to libswipl for a jar file called JPL (a 
> bidirectional interface between Java and Prolog since I need to run some 
> simple Prolog rules) and then when I start calling JPL provided interface in 
> my application code, the following exceptions are thrown:
> Can anybody help me to figure out what happened exactly, BTW, Tomcat is not 
> crashing all the time but fairly frequent though.
> Thanks very much.
> 
> 
> 
> 
> 
> 
> 
> 
> WARNING: Error while removing context [/XX]
> java.lang.NoClassDefFoundError: 
> org/apache/struts2/util/ObjectFactoryDestroyable
>   at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
>   at 
> org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
>   at 
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
>   at 
> org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
>   at 
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
>   at 
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
>   at 
> org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1212)
>   at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
>   at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>   at 
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
>   at 
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
>   at 
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
>   at 
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
>   at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.struts2.util.ObjectFactoryDestroyable
>   at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
>   at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
>   ... 16 more

This looks like you’re missing a JAR file, in particular the one that contains 
“org.apache.struts2.util.ObjectFactoryDestroyable”.  Although I’m not sure this 
is critical as it appears to be happening as Tomcat is shutting down.

Dan

> Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
> INFO: Container 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[jsp] 
> has not been started
> Mar 26, 2014 6:18:51 PM org.apache.catalina.core.ContainerBase stop
> INFO: Container 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/XX].[default]
>  has not been started
> Mar 26, 2014 6:18:51 PM org.apache.catalina.startup.HostConfig checkResources
> WARNING: Error during context [/XX] destroy
> java.lang.NoClassDefFoundError: 
> org/apache/struts2/util/ObjectFactoryDestroyable
>   at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
>   at 
> org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:188)
>   at 
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:358)
>   at 
> org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
>   at 
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
>   at 
> org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1176)
>   at 
> org.apache.catalina.core.StandardContext.destroy(StandardContext

Re: Is it possible to send a 'keep-alive' packet back to client session every x seconds?

2014-03-27 Thread André Warnier

Mark Thomas wrote:

On 27/03/2014 03:08, Matthew Turany wrote:

Is it possible to configure either apache or tomcat to send a packet every
x number of seconds so that at the client end the gateway thinks the
session is still active and will keep the connection open, or is this
something best put into the actual web app?


http://tomcat.apache.org/connectors-doc/reference/workers.html
socket_keepalive

You'll need to configure the OS to send the packets frequently enough.


That's a bit the hammer, isn't it ? Under Linux at least, this seems to be a global kernel 
setting, so it applies to all connections.




Alternatively, change the application design:
- One request to trigger generation of the report
- N requests to retrieve report which returns either "still processing"
(maybe with an ETA) or "here it is".



Apart from any gateways/proxies/firewalls, there is also a browser timeout : if the 
browser sends a request, and then does not get a response for 4-5 minutes, eventually it 
will time-out, close the connection, and display "the server is not responding.. try again 
later".


Another possibility is to have the application periodically send some kind of "partial 
response" to the browser (e.g., a line of ".."), to be replaced by the real response when 
it's ready.  It's a 20-year old trick, and it is a bit tricky to get right, but it still 
works.  Of course it means that the application has to be able to do that, and is not 
itself waiting on a call to a slow external resource.




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



AUTO: Uri Shani/Haifa/IBM is out of office, w/limited business email. (returning 06/04/2014)

2014-03-27 Thread Uri Shani

I am out of the office until 06/04/2014.

Urgent? call +372-57630084, at GMT-4 EDT timezone.


Note: This is an automated response to your message  "Re: Could I ask
something about tomcat's catalina categorize?" sent on 25/03/2014 13:58:50.


This is the only notification you will receive while this person is away.


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



Re: Is it possible to send a 'keep-alive' packet back to client session every x seconds?

2014-03-27 Thread Mark Thomas
On 27/03/2014 03:08, Matthew Turany wrote:
> Is it possible to configure either apache or tomcat to send a packet every
> x number of seconds so that at the client end the gateway thinks the
> session is still active and will keep the connection open, or is this
> something best put into the actual web app?

http://tomcat.apache.org/connectors-doc/reference/workers.html
socket_keepalive

You'll need to configure the OS to send the packets frequently enough.

Alternatively, change the application design:
- One request to trigger generation of the report
- N requests to retrieve report which returns either "still processing"
(maybe with an ETA) or "here it is".

Mark


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



Re: Tomcat under load && frontend reverse proxy timeouts

2014-03-27 Thread Mark Thomas
On 27/03/2014 01:39, Frederik Nosi wrote:
> Hi all,
> 
> Having to deal with slow applications deployed under tomcat, with a
> reverse proxy in front, frequently i've noticed that even when the
> frontend timeouts and closes it's part of the TCP connection, the Tomcat
> thread processing the request goes on and on till it finishes. Is there
> a way to make the proccessing thread stop when the frontend connection
> get's closed?

No.

Mark


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