where find documentation

2014-05-16 Thread Francesco Viscomi
Hi all,
i'm try to find a documentation that describe every tag inside the web.xml
file, but i wasn't able to find anything about that on
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


someone can help me?
thanks in advance;
Francesco
Italy


Re: Application monitoring

2014-05-16 Thread Leon Rosenberg
Hello David,

I will not ask you why you are reinventing the wheel (ok, I lied, why are
you reinventing the wheel?).
You have multiple options available:
1) You could use jmx and publish your information as jmx beans.
2) You could use rmi between you 'collector' and the target apps.
3) You could use simple http (preferably json), but in that case I would
advice to setup a separate collector for it.

For any of the above options there are numbers of classes and utilities you
can use. For example jersey as jax-rs implementation is perfect for
exchange of json data, for rmi you could use DistributeMe (
http://www.distributeme.org) or spring-remote, and so on.

But yet again, why reinventing the wheel?

regards
Leon



On Wed, May 14, 2014 at 6:28 PM, David kerber dcker...@verizon.net wrote:

 I am working on a small Tomcat servlet to monitor other tomcat-based
 applications running on the same physical machine, and am trying to figure
 out the best way to communicate between the monitoring app, and the
 monitored apps.

 My setup has several tomcat instances of a single application, each
 running from its own directory, and listening on its own TCP port.  So
 there is no direct communication between the instances.

 I'm trying to monitor various data about the application, not about tomcat
 itself or the JVM. So I want to collect such things as the number of
 requests it has processed, the last data received, etc, and not things like
 memory and cpu usage.  It is my app, so I can (and expect to need to) add
 methods or servlets to return the information I want to collect.

 My question is, what is the best way to make the request to get the data?
  Would  URL request from the monitoring app to the monitored app be
 appropriate, and then parse the response out for display in a browser?  If
 so, what java class is likely to be useful for this communication?  I will
 have all the information needed to connect to the application instance
 (server, port, etc), but want it to be portable across OS types.

 Thanks!

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




Is the listserv down?

2014-05-16 Thread Jeffrey Janner
Last message I got was Mark notifying Martin he was toast.
That was 2 days ago.

Jeffrey Janner
Sr. Network Administrator
jeffrey.jan...@polydyne.commailto:first.l...@polydyne.com
PolyDyne Software Inc.
Main:   512.343.9100
Direct:  512.583.8930

 [cid:image002.png@01CC0FB7.4FF43CE0]

Speed, Intelligence  Savings in Sourcing



Re: Compiling mod_jk in CentOs release 6.5

2014-05-16 Thread Doug Tucker

/configure

--with-apxs=/usr/lib64/httpd/modules


whenever I run above I keep getting this:

configure: error: You must specify a valid --with-apxs path

Any ideas why I am getting this error?



I just did this with my centos 6.5 system and the command I used was:

 ./configure --with-apxs=/usr/sbin/apxs



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



Tomcat dependency on application server

2014-05-16 Thread Randhir Singh
Hi,

We have JBoss as the application server  Tomcat as the web server in our
production  developmental setup which is on Red Hat Linux 5.X. We have
tomcat 6.X. My query is that if I need to restart tomcat, do I need to
restart JBoss  Tomcat both or just restarting Tomcat would be enough. I am
asking this query because I had killed the tomcat process using kill -9 and
while restarting tomcat it was not starting but when I killed JBoss 
tomcat and then restarted, Tomcat was up.

I hope my query is clear whether Tomcat is dependent on JBoss.

Regards

-- 

*STL Disclaimer:*
The content of this message may be legally privileged and confidential and 
are for the use of the intended recipient(s) only. It should not be read, 
copied and used by anyone other than the intended recipient(s). If you have 
received this message in error, please immediately notify the sender, 
preserve its confidentiality and delete it. Before opening any attachments 
please check them for viruses and defects. No employee or agent is 
authorised to conclude any binding agreement on behalf of Sterlite 
Technologies Limited with another party by email without express written 
confirmation by authorised person. Visit us at www.sterlitetechnologies.com 
 Please consider environment before printing this email !






Re: tomcat6 thread locked

2014-05-16 Thread devoss ind
On 7 May 2014 17:37, devoss ind devoss@gmail.com wrote:

 Hi,

 Am using tomcat 6, java6 in production environment to run our web
application. We found that recently, cpu in top is showing 100% nearly.
Then we dig into each thread cpu usage by -H option in top. We found only
one thread is taking 100%usage and identified the thread using thread dump.
The thread dump for that particular thread which is using 100% usage is as
follows...

 http-8080-exec-3687 daemon prio=10 tid=0x7336f400 nid=0x41a1 runnable
[0x619ad000..0x619ade30]
java.lang.Thread.State: RUNNABLE
 at
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:616)
 - locked 0x967b22f0 (a
org.apache.coyote.http11.InternalNioOutputBuffer)
 at
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:608)
 at
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1024)
 at org.apache.coyote.Response.action(Response.java:183)
 at org.apache.coyote.Response.sendHeaders(Response.java:379)
 at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
 at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
 at
org.apache.catalina.connector.Response.flushBuffer(Response.java:548)
 at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:345)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
 at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
 at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)

 We can see that above thread is locked due to some problem in NIO.

 We have verified in tomcat manager also for such thread. We found that a
particular thread is taking 14140517ms time and the request in that line is
of POST request which is not related to our application.

 That particular thread is not releasing till we restart tomcat.

 This is happening frequently.

 Please help me to find out the root cause of this problem. How to avoid
restarts.

 Our server.xml connector configuration is as follows...

 Connector port=${http.port}
protocol=org.apache.coyote.http11.Http11NioProtocol
connectionTimeout=5000
  acceptCount=1500
maxThreads=1
redirectPort=8443 /

 Please help in this thread locking problem.



Re: Comet Servlet with a reverse proxy in front of it

2014-05-16 Thread Elias Kopsiaftis
Hey,

I actually got this working so far with nginx(and by so far I mean the
random connection errors I was getting with apache2 have not surfaced yet).

Ill post the nginx config setup later today when I get home for the benefit
of anyone else who wants to do this.


On Mon, May 12, 2014 at 3:34 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Elias,

 On 5/12/14, 11:20 AM, Elias Kopsiaftis wrote:
  Is there any way to put a reverse proxy in front of a Comet
  servlet?

 I don't believe so. There is work being done on supporting Websocket
 through mod_proxy but it will likely never support Comet.

  I tried apache but thats a no go because it uses a single thread
  per connection, which is not scaleable

 Only some Apache httpd MPMs are one-thread-per-connection.

  then I tried nginx, which perhaps I did something wrong in my
  setup but in the client code, the call to getInputStream never
  returns, indicating something is wrong. I apologize for not
  providing too many details and just proposing a general question,
  but Im hoping there is a general solution to this problem. If you
  guys needs server specific details I can provide later today when I
  get home from work.

 I think that httpd + Tomcat is not going to work, here. I'm not sure
 about Nginx. If you find something that works, please post back with
 your findings.

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

 iQIcBAEBCAAGBQJTcSJSAAoJEBzwKT+lPKRYFL8P/jryAJ8epDKL8nioPLV2PAWF
 2z2rmNLEtYq4Do+lraq0ttoIhYKkJ0pLyV7/evNDEkjTrtrM2uNEY/BrsVgWelp9
 q6RqjYKdFhc/rPmTL+Uu2JHMFfpUfNrVGqAmPwqVU6qwzVrlfujF/z/EHxq13Rib
 IXQgMJcB2yFx7Boeg2BJWLUhbTeod0aR8RjNKQG6EhiQghnATb6FpKEjHvYkJXCt
 SGr0NptEM2xVlqTfbsuBDf/ZJQS+bh9h89c0nqZPkuYWkH5ZGbq02am8e4nJOVhl
 tU3lUQCT5+3wNlXeGVuFdoOlFxl9IJGRU7sx+Sjku2eIXRDTXYvQ3sH4wgjxIomV
 qwrcN5aBnW/l5slPaXcxA6NNcxcjfOyoCBs+oLzWDA8B1ijh4JY2SsMVrUSSXDVr
 F4JIVrR+19nXJnFiBVKboU5nN54mzIo3OtKNeI3/dnITXdRX1gft5jmWaI4n59Ci
 yodCN5l35R9uFurSYWmVPyYv8Bk+aOFgYjqLPJU6d7So3g/fVx8cWubAqzj9Ft8V
 IYRBUCn/rsDW2nRXJX/vlmgKwsgrDI2rlorIdcRYmj+PCOBykuBsHpVk29Te1Cxy
 eOh7V05X7VOXzqWnOm2zO43PwCPc98g0eDlB4/l/VDyE/VZ4IXcQifa1f6vZutOH
 8mzvN7jAkrMBvsGk48kr
 =+J8x
 -END PGP SIGNATURE-

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




Slow page response time in tomcat 8.0.5

2014-05-16 Thread Hariprasad Manchi
Hi,
We are trying to use apache-tomcat 8.0.5 for our web application and have
encountered performance issue with respect to the page response time.
However, once the application is deployed in 8.0.5 we see a longer delay in
response time from the server for the login page itself. With older version
of tomcat i.e., tomcat 7.x(7.0.53), 6.x(6.0.18) we did not see such delay.

We have 270 custom tags defined across 6 tld files in our application and
have the tag pooling feature turned off in conf/web.xml (enablepooling is
set to false; since this is a requirement for the application we had to
turn it off).

We tried to root cause the issue and used fidller tool to monitor the
requests and response times. The browsers - both IE 11 and Chrome - were
firing the requests quickly but were waiting for the response from the
server. We do not know what is the actual cause for this delay. We have
captured the traffic for both IE and Chrome and could send them if needed.

Could you please advise how to proceed to identify the root cause for this
delay? Or could you confirm this as already a known issue?

Any help would be highly appreciated.

We are not clear to which group the question should be posted, hence
sending this email to both users and taglib-users email list.

Regards,
Hariprasad


Re: Increment XX:PermSize for Tomcat 7 on Windows 2012R2

2014-05-16 Thread Daniel Mikusa
On May 12, 2014, at 10:54 AM, Lorenzo Fini loreatt...@gmail.com wrote:

 Hi,
 I'm trying to increment the PermSize on Tomcat 7.
 I added  -XX:PermSize in the java options launching tomcat7w,
 causing Tomcat to not load and to give me the following error on Windows
 Server 2012R2:
 
 Unrecognized VM option 'PermSize=256m ‘

Are you perhaps using a JVM that doesn’t have a PermSize like Oracle Java 8?

  http://java.dzone.com/articles/java-8-permgen-metaspace

 
 The same configuration was working on Windows Server 2007.
 I was able to start the server adding -XX:PermSize=256m inside double
 quotes, now the question is.. is it the right way?

Is it honoring the value?  In other words, does it actually increase the size 
of the permgen?

Dan

 
 
 Lorenzo


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



Re: where find documentation

2014-05-16 Thread Арсений Зинченко
I used this one:

http://wiki.metawerx.net/wiki/Web.xml


2014-05-15 16:05 GMT+03:00 Francesco Viscomi fvisc...@gmail.com:

 Hi all,
 i'm try to find a documentation that describe every tag inside the web.xml
 file, but i wasn't able to find anything about that on
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


 someone can help me?
 thanks in advance;
 Francesco
 Italy



RE: Test Mail, Please Ignore

2014-05-16 Thread Sebastien Tardif
I sent email below yesterday and never saw it in the list:

-Original Message-
From: Sebastien Tardif 
Sent: Wednesday, May 14, 2014 12:59 PM
To: 'Tomcat Users List'
Subject: Slow execution of Tomcat 7.0.52 due to coarse lock in 
WebappClassLoader.loadClass
I'm having some visible performance issue related to the use of method 
synchronized loadClass(String name, boolean resolve) in WebappClassLoader

I see that the author or least some of the author(s) of the class got the idea 
in other cases of a more specialize lock that against the entire instance.

Should we just lock here using the name of the class we are looking for?

My partial threads stack dump:

2014-05-14 12:36:01
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode):

http-bio-31680-exec-57 - Thread t@124
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
...
http-bio-31680-exec-56 - Thread t@123
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)

http-bio-31680-exec-55 - Thread t@122
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)

   Locked ownable synchronizers:
- locked 444b3957 (a 
java.util.concurrent.locks.ReentrantLock$NonfairSync)

http-bio-31680-exec-54 - Thread t@121
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.org.apache.xerces.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:358)

http-bio-31680-exec-53 - Thread t@120
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)

http-bio-31680-exec-52 - Thread t@119
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)

http-bio-31680-exec-51 - Thread t@118
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)

http-bio-31680-exec-50 - Thread t@117
   java.lang.Thread.State: BLOCKED
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)
- waiting to lock 264d40df (a 
org.apache.catalina.loader.WebappClassLoader) owned by http-bio-31680-exec-41 
t@108
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at 
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)


http-bio-31680-exec-49 - Thread t@116
   

Re: Best practice to load object in memory.

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dhaval,

On 5/9/14, 2:46 PM, Dhaval Jaiswal wrote:
 At the time of initializing tomcat apps server, some object/data
 loading in memory, which is consuming lot of memory of the server.
 
 What is the best practice to handle it. Loading of object/data is
 mandatory in my case.

So you have a requirement of loading a log of data into memory at
startup, but it's taking a lot of memory. Do I have that right?

You either need different requirements (no load on startup, or maybe
no need for free memory) or you need more memory.

Did you think there was some magic sauce you could add to fix your
conflicting requirements?

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

iQIcBAEBCAAGBQJTdjG3AAoJEBzwKT+lPKRY3QYQAMXSl6lq1RjgQfemo8VRNhCC
m2/DkgCcr39GmUOCScHiPsHVynKoGaEyyFpgN0yCt+NoOIR/mesmuVKurjbTKHcg
4geuMdaDNcvvnYF6SDrwWstENTvF/tYseAuUswMjUFTkznsvfPXsIBzJc4s6a8NY
kbUX9R6imqxv/xUS7K2RVnddnuNEs9lvKTdTTUll/78jUwPKNKTiqvvP/VAB7viG
V7uft8B08OsOUpb5fNb0EjCmmfSJsWsyl2HkON67yix++LEmIfgvIwUo4PVH3MNd
0w/hX/OeAct5NejKfBQOtpdLQfAulwwGK1wNhpL8vUXYQzyRrrYMlNRaZrsMaysv
MZsI2sX2RZ8uklxxT8TBfXJPSGW4dPD4rh4+bO22h6ykKDV0NByVa+J2otvXLP0W
cReYg48U5eJKWjVqxk7yDV/gXG9jI1WmZCtMKQd2nk9qczIvx2m8bzZRrjqsQC37
nvXgFUYK3bgGH7W74a+bWYbkmsDA4V8PxTkcCBU0/RVOikAYEjx3DTQv2Tye/1zu
xfJchQqwLlzn7Cwyl48kLO85xxnbE5xuUeTGUn3sWk0WIeTtBi4ddOKmkLz3YRU5
nVI4rXGjErVJFd6FySFnWHNseO4jl6Eb/vU0wu31Tqf85r1EuM3WQvhbfr3fv6Qw
pCBIUaBiixlEJd6DMqIS
=it6E
-END PGP SIGNATURE-

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



Re: Slow page response time in tomcat 8.0.5

2014-05-16 Thread Leon Rosenberg
Hello Hariprasad,

you could embed moskito webui into your application, annotate your tags
with @Monitor and you would see how long they execute and what is the
execution path, which tags are called during an http request how often and
how long they execute. You can follow this link for more information on the
integration:
blog.anotheria.net/msk/the-complete-moskito-integration-guide-step-1/

MoSKito itself: http://www.moskito.org

regards
Leon


On Thu, May 15, 2014 at 7:04 PM, Hariprasad Manchi
hariprasad...@gmail.comwrote:

 Hi,
 We are trying to use apache-tomcat 8.0.5 for our web application and have
 encountered performance issue with respect to the page response time.
 However, once the application is deployed in 8.0.5 we see a longer delay in
 response time from the server for the login page itself. With older version
 of tomcat i.e., tomcat 7.x(7.0.53), 6.x(6.0.18) we did not see such delay.

 We have 270 custom tags defined across 6 tld files in our application and
 have the tag pooling feature turned off in conf/web.xml (enablepooling is
 set to false; since this is a requirement for the application we had to
 turn it off).

 We tried to root cause the issue and used fidller tool to monitor the
 requests and response times. The browsers - both IE 11 and Chrome - were
 firing the requests quickly but were waiting for the response from the
 server. We do not know what is the actual cause for this delay. We have
 captured the traffic for both IE and Chrome and could send them if needed.

 Could you please advise how to proceed to identify the root cause for this
 delay? Or could you confirm this as already a known issue?

 Any help would be highly appreciated.

 We are not clear to which group the question should be posted, hence
 sending this email to both users and taglib-users email list.

 Regards,
 Hariprasad



Re: Application monitoring

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 5/14/14, 1:41 PM, Mark Eggers wrote:
 On Wed, 14 May 2014 12:28:46 -0400, David kerber wrote:
 
 I am working on a small Tomcat servlet to monitor other
 tomcat-based applications running on the same physical machine,
 and am trying to figure out the best way to communicate between
 the monitoring app, and the monitored apps.
 
 My setup has several tomcat instances of a single application,
 each running from its own directory, and listening on its own TCP
 port.  So there is no direct communication between the
 instances.
 
 I'm trying to monitor various data about the application, not
 about tomcat itself or the JVM. So I want to collect such things
 as the number of requests it has processed, the last data
 received, etc, and not things like memory and cpu usage.  It is
 my app, so I can (and expect to need to) add methods or servlets
 to return the information I want to collect.
 
 My question is, what is the best way to make the request to get
 the data?  Would  URL request from the monitoring app to the
 monitored app be appropriate, and then parse the response out for
 display in a browser?  If so, what java class is likely to be
 useful for this communication?  I will have all the information
 needed to connect to the application instance (server, port,
 etc), but want it to be portable across OS types.
 
 Thanks!
 
 http://wiki.apache.org/tomcat/FAQ/Monitoring
 
 In particular, item 3. Unfortunately, the sample code seems to be 
 missing . . .

Which is item 3? I'd be happy to fix whatever is missing.

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

iQIcBAEBCAAGBQJTdjLiAAoJEBzwKT+lPKRYKK0P/37LoZHwXvDX/jQ/CNXoC85P
WpqyFkowFVG5M5XGNhnAvYIBgCuHD0lteur4M0+ovhYJky1LyzoPfK78L+aEAaMG
9MtCKH9wAIz9hNfQdYSw8EBE8pHzQ9xmnqrl2LqVtFkUq1SVQaCNQ7PH/s6dsq0C
ZElWzyCv8AcLZRQ0P5cWR4URA4EE26i4v5/WRzs5JddJFF7KcqLfdFsFQRR8EBCf
J8nBOJvFhtsbXSLZFeLmzJt4Cpmu1jfaAnkCGu/iJHqlnN6pqsRJMcciYOivfWd6
5krVvOL/7+UbO0gmsu3qCzjbgbKWBlwleaNMRcR+VSUDHaVUVAdVzNIWIqFzAk7V
AM07bWOl/pE3+SbOav+ckJN9nhTUeQUvEsmvPSKx78N2CGJvZw080dLzlQu4kxMN
TEGvOrhOmxy2SJMQ1VMVRRKxiG/mIpMJDZxB7SxaWvw7Y7STkkgz+rn3fAh0guQa
HiGEQSEuoRuD65PojSMXiZUEmT58OZkjYvqckjFkdedRUQSS7QB1FagkRRHB5uZ5
Q4v75AHiyLBCjdHSEJDnpOQbTMPnJEiT3iy8kQZtpH3SoDL4EWg9m9H5eZkfVKaL
+XgjDvfIXnZ2PD7I+rVGukkWz/wrv3OBVWwRSacdQZSa96z5JnAH9lwepL+Zm9M0
U7CtgDY30Q22fYqJFP7F
=IIse
-END PGP SIGNATURE-

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



NoClassDefFoundError: org/apache/tomcat/util/descriptor/LocalResolver Error while building project after Tomcat upgrade to 7.0.53 from 7.0.41 !

2014-05-16 Thread Utkarsh Dave
I am trying to upgrade my Tomcat from 7.0.41 to the latest release 7.0.53
available and the project build failed with below error.

java.lang.NoClassDefFoundError:
org/apache/tomcat/util/descriptor/LocalResolver
at
org.apache.jasper.xmlparser.ParserUtils.init(ParserUtils.java:69)
at
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:94)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:243)

And same error from multiple places also.
Is this a known issue?

Regards
-Utkarsh


Re: Slow execution of Tomcat 7.0.52 due to coarse lock in WebappClassLoader.loadClass

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Sebastien,

On 5/14/14, 12:58 PM, Sebastien Tardif wrote:
 I'm having some visible performance issue related to the use of 
 method synchronized loadClass(String name, boolean resolve) in 
 WebappClassLoader

Are you loading huge numbers of (distinct) classes over a long period
of time? I wouldn't expect loadClass() to be called very much on a
stable application.

 I see that the author or least some of the author(s) of the class 
 got the idea in other cases of a more specialize lock that against 
 the entire instance.

Examples? The loadClass(String,boolean) method pretty much needs to be
synchronized from start to finish. Perhaps you are right that the
first few lines of he method need not be synchronized, but everything
else does because it will modify the internal state of the class
loader, which is otherwise not thread-safe.

 Should we just lock here using the name of the class we are looking
 for?

Do you mean like synchronized(my class's name)? That won't work, as
the string object you choose to use as a monitor might not be the one
that is being used by other code. Interning strings is quaint, but it
still doesn't solve the problem: the internal state of the ClassLoader
will be modified and it's dangerous to remove synchronization from it.

 My partial threads stack dump:
 
 2014-05-14 12:36:01 Full thread dump Java HotSpot(TM) 64-Bit Server
 VM (20.45-b01 mixed mode):
 
 http-bio-31680-exec-57 - Thread t@124 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
 ... http-bio-31680-exec-56 - Thread t@123 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
  http-bio-31680-exec-55 - Thread t@122 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
  Locked ownable synchronizers: - locked 444b3957 (a
 java.util.concurrent.locks.ReentrantLock$NonfairSync)
 
 http-bio-31680-exec-54 - Thread t@121 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.org.apache.xerces.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:358)
  http-bio-31680-exec-53 - Thread t@120 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
  http-bio-31680-exec-52 - Thread t@119 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at
com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.findClass(ReflectionNavigator.java:505)
  http-bio-31680-exec-51 - Thread t@118 java.lang.Thread.State:
 BLOCKED at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1605)

 
- - waiting to lock 264d40df (a
org.apache.catalina.loader.WebappClassLoader) owned by
http-bio-31680-exec-41 t@108
 at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

 
at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
  http-bio-31680-exec-50 - Thread t@117 java.lang.Thread.State:
 BLOCKED at
 

Re: destroySubcontext failing with NameNotFoudException

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ravikiran,

On 5/7/14, 6:12 AM, N, Ravikiran wrote:
 Hi all,
 
 I trying to understand under what conditions destroySubContext
 fails in tomcat..? I'm trying to destroy Context which I had
 created, because of which I'm unable to createContext the next time
 I start the service. My code is below :
 
 private Context srvCtx; public void init(ServletConfig
 servletconfig) throws ServletException { Context initCtx = new
 InitialContext(); srvCtx = initCtx.createSubcontext(myapp); }
 
 public void destroy() { try { if (srvCtx != null) { 
 srvCtx.destroySubcontext(GS_CTX_NAME); srvCtx.close(); } } 
 catch(NamingException e) { log_.error(new
 LogQueueMessageStructure(Couldn't unbind the context,3016),e); } 
 }
 
 What is wrong with my code and also how can I debug this issue..?
 Please help me out..!!

Well, first off: your code has insane indentation. That could be it.

An error message or stack trace would be nice.

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

iQIcBAEBCAAGBQJTdjwnAAoJEBzwKT+lPKRYakgP/2bcug+sumtED9ap0GzJdRCl
I2sUHeo1AxC9rRkZV6Jj8gmVHzF/76VWKU+HKJ+DuvRx8TO4inGXIgsPM3ZfYZSq
T1HEUaStRGf1X0KJHrMmPBiPSP+GnHvR+Csx6TBv9dWIHJJ2orim2RqU1Vw0sLKt
xaf0QipLWNTa7mDmPiYpyqX19vIrRt7++aDvOFZPazFatHLuAU+LPuEV6MERb+Gy
h7Pl1VhYZ4qUxCpzccPtS7y9aLB7nNW0/d/1I/vMmqmnzSsfrvEW4SHtDt9qgESx
mRGddljCKAm5slPqqI+hlcStqaKuREB9bdkUC8dioHqJ2g5Gh54J3/EG5AhBLJvM
fnxFl6HJLHeUZRI8jBDM+pBDNhM9uLcbupRFlZLEcKXualGASDFfqwbhDQl0jK+3
PBrqkTJvd3CKu8Ma1VY1UAApyKHufON3fyMRHuN1osONKLXrh1Vw4aH9IchbAxpN
8qaAFMmY1TdwBkQUvmrliiHiZ5VPolkBTD0BwUhuVkNSxHs/HRYjhBlnOe0owkps
FmMYIoUxh0RKlJrm32Mbwd+8D4yhgND/hdfN/s66+LoQ+BTldDLYjKyIpIlLtz31
wsahFGl4flz1yrkig5R0hYl/n0PYyCaB8rtdhJ+/L8I97TEbhW8eopTOchQIHkYp
v0rcs/4T2xL0NhGRzP1d
=cudR
-END PGP SIGNATURE-

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



Re: Application monitoring

2014-05-16 Thread David kerber

On 5/15/2014 9:57 AM, Leon Rosenberg wrote:

Hello David,

I will not ask you why you are reinventing the wheel (ok, I lied, why are
you reinventing the wheel?).
You have multiple options available:
1) You could use jmx and publish your information as jmx beans.
2) You could use rmi between you 'collector' and the target apps.
3) You could use simple http (preferably json), but in that case I would
advice to setup a separate collector for it.

For any of the above options there are numbers of classes and utilities you
can use. For example jersey as jax-rs implementation is perfect for
exchange of json data, for rmi you could use DistributeMe (
http://www.distributeme.org) or spring-remote, and so on.

But yet again, why reinventing the wheel?


I'm not trying to.  Your responses above are the exact kinds of 
information I was looking for:  how to communicate between my app that 
displays the information, and the monitored apps.


Now I just need to look into how to use jmx, rmi and json to figure out 
which will serve my needs the best.  My goal here is to be able to click 
on a browser bookmark and after logging in, have all the information 
from these dozen apps displayed in an organized table, so I don't have 
to do anything more than scroll down the page to see them all.


They are all OS-agnostic, I presume?

Thanks!




regards
Leon



On Wed, May 14, 2014 at 6:28 PM, David kerber dcker...@verizon.net wrote:


I am working on a small Tomcat servlet to monitor other tomcat-based
applications running on the same physical machine, and am trying to figure
out the best way to communicate between the monitoring app, and the
monitored apps.

My setup has several tomcat instances of a single application, each
running from its own directory, and listening on its own TCP port.  So
there is no direct communication between the instances.

I'm trying to monitor various data about the application, not about tomcat
itself or the JVM. So I want to collect such things as the number of
requests it has processed, the last data received, etc, and not things like
memory and cpu usage.  It is my app, so I can (and expect to need to) add
methods or servlets to return the information I want to collect.

My question is, what is the best way to make the request to get the data?
  Would  URL request from the monitoring app to the monitored app be
appropriate, and then parse the response out for display in a browser?  If
so, what java class is likely to be useful for this communication?  I will
have all the information needed to connect to the application instance
(server, port, etc), but want it to be portable across OS types.

Thanks!

-
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



NoClassDefFoundError: org/apache/tomcat/util/descriptor/LocalResolver Error while building project after Tomcat upgrade to 7.0.53 from 7.0.41 !

2014-05-16 Thread Utkarsh Dave
I am trying to upgrade my Tomcat from 7.0.41 to the latest release 7.0.53
available and the project build failed with below error.

java.lang.NoClassDefFoundError:
org/apache/tomcat/util/descriptor/LocalResolver
at
org.apache.jasper.xmlparser.ParserUtils.init(ParserUtils.java:69)
at
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:94)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:243)

And same error from multiple places also.
Is this a known issue?

Regards
-Utkarsh


Re: tomcat6 thread locked

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

devoss,

Exact Tomcat version? OS and version? Java version?

On 5/15/14, 12:00 PM, devoss ind wrote:
 On 7 May 2014 17:37, devoss ind devoss@gmail.com wrote:
 
 Hi,
 
 Am using tomcat 6, java6 in production environment to run our
 web
 application. We found that recently, cpu in top is showing 100%
 nearly. Then we dig into each thread cpu usage by -H option in top.
 We found only one thread is taking 100%usage and identified the
 thread using thread dump. The thread dump for that particular
 thread which is using 100% usage is as follows...
 
 http-8080-exec-3687 daemon prio=10 tid=0x7336f400 nid=0x41a1
 runnable
 [0x619ad000..0x619ade30]
 java.lang.Thread.State: RUNNABLE at
 org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:616)

 
- - locked 0x967b22f0 (a
 org.apache.coyote.http11.InternalNioOutputBuffer)
 at
 org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:608)

 
at
 org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1024)

 
at org.apache.coyote.Response.action(Response.java:183)
 at org.apache.coyote.Response.sendHeaders(Response.java:379) at
 org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)

 
at
 org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)

 
at
 org.apache.catalina.connector.Response.flushBuffer(Response.java:548)

 
at
 org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:345)

 
at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)

 
at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

 
at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

 
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

 
at
 org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)

 
at
 org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)

 
at
 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)

 
at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

 
at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

 
at java.lang.Thread.run(Thread.java:619)
 
 We can see that above thread is locked due to some problem in
 NIO.
 
 We have verified in tomcat manager also for such thread. We found
 that a
 particular thread is taking 14140517ms time and the request in that
 line is of POST request which is not related to our application.
 
 That particular thread is not releasing till we restart tomcat.
 
 This is happening frequently.
 
 Please help me to find out the root cause of this problem. How to
 avoid
 restarts.
 
 Our server.xml connector configuration is as follows...
 
 Connector port=${http.port}
 protocol=org.apache.coyote.http11.Http11NioProtocol
 connectionTimeout=5000 acceptCount=1500 maxThreads=1 
 redirectPort=8443 /
 
 Please help in this thread locking problem.
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTdjKHAAoJEBzwKT+lPKRYoPsQAKx0UqJ8eVP9gXJ+dluvUBii
RmbIkljyBiVjCLj3uQlPoMNu6B9LRjcwQM0cBXh9MmXakoYVNJ9fxSv1bc8iI/4X
EjKxRdYcupuGxgzPXrM2onhdhfAXgfsjYUKiFspPv+RKjG+wVrfULdkcLW4FgQV9
XnTnZD32W7R3LprCYksk4WGpU4NCJOjCx2VXIXT39jl00pyPqTZ1StTmzXa/9WZP
w1xwytW+sUHt1hgFsLyVbKJzL/61e1Fkk4M/avyBVqWHm3sCdi8b2qpCfwoAmEZX
mhBEC1diNhvi7+w0n7K3iXN6f+iloECUpHWiXcVOn9Q1p8t1cNXN6vFCNIpdrmzL
T4Doa4S4aomnFWRIVqg8DsO1FI5v0ZJnAsI9NEHVdd7RDMZpEYdnvkVFG2QN6rnb
SwVVjFbmhZVB1bmPMFzPb+OPRTeQUivdgLvnpXRCegVyxTxpPaoDJeykeahZqueh
0owe7fOFJBiG9dgDD+EDb87p3CipHGQA6sxxsQVTJ5kO9hzAthhTUd47J6Xy2bCa
Fkz6MAQ7//G5GwPrYfZHQG1DIIWg+CYwZIkr4YTP83zD8P9oUGgt1HHYXhvq8hCq
I910AxAg8r0l9X1c6QXQ1C+20FjG2wYRcMjU/LItrZY2ra7U//oT3L8YX0Gx4UrB
SM7oBj/HEFDcTzU/4ACv
=jW9p
-END PGP SIGNATURE-

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



Re: Compiling mod_jk in CentOs release 6.5

2014-05-16 Thread J Java
 There's no reason to read some how to guide on the Internet for how
to build mod_jk: the building steps come with the source package,
 and they are up-to-date instead of some guy's blog that requires root
privileges to run properly.

Chris.

completely agree. But what you can do when if those up-to-date steps are
are not helping you out?
Also, some guy's step definitely helped me achieve waht i wanted to
(building and settingup mod_jk) out and thats what is important I guess
than who has written it or how he advises to do it. Anyway..it was just a
suggestion. no advise

Thanks,
Shailesh




On Wed, May 7, 2014 at 10:14 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 To whom it may concern,

 On 5/3/14, 4:10 AM, J Java wrote:
  /configure
  --with-apxs=/usr/lib64/httpd/modules
 
 
  whenever I run above I keep getting this:
 
  configure: error: You must specify a valid --with-apxs path
 
  Any ideas why I am getting this error?
 
  - --with-apxs needs to be given the full path to the apxs program
  (in httpd-devel package). So, if it's in /usr/lib64/httpd/modules
  (which it shouldn't be), then you need to say:
 
  $ ./configure --with-apxs=/usr/lib64/httpd/modules/apxs
 
  On my Amazon Linux system (which is RHEL-compatible, which should
  obviously be fairly similar to CentOS), apxs is in /usr/sbin/apxs
 
 
  PFB link which gives  some shell scrpt to compile mod_jk on
  CENTOS. I am
  not a shell script expert but what I found in this script is using
  below line (which includes path to aspx) to configure aspx:
 
  http://www.cafe-encounter.net/p1086/build-mod_jk-for-centos
 
  ./configure --with-apxs=/usr/sbin/apxs
 
  So why dont you try to use this path instead of
  /usr/lib64/httpd/modules/apxs

 There's no reason to read some how to guide on the Internet for how
 to build mod_jk: the building steps come with the source package, and
 they are up-to-date instead of some guy's blog that requires root
 privileges to run properly.

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

 iQIcBAEBCAAGBQJTamLQAAoJEBzwKT+lPKRY56EQAJPWpOlbcW4t/ptzwM6pAf0/
 QaIfRGu65/RFRn8TY7so94y2Mg56dkdOOm4+zfnwhOnSjAHjmRnt4yaX70G4KGdq
 ZtjXQ+SgvgU6Vj4R4gumca7KTrpdpPQVmAzvX6ZWIKopUbGXUMr4C1amr0a9oeuI
 9ayCZQZTLEkRYcB5nmgmxAV2KwNuzUEWdA/QGSNmwM3vHQqbz33s9tMFgiODKEE3
 aM2IQnNQOu9gDn8pkY7ir4942JM+cm5dzdGZV0gAHhOo2DbAi/JwaJ8c3rbLo09p
 UE7V6Axw5ZVXvvzgh19pYykMUniTNgoxygK2XfbEs32h2WEF+6MHZqBjCgXIWWbK
 zBSVk+I4MWuMbi0OV428vEkJm8rfun3a5bui2llbeUclbfnl/urZOIE9mqVj/R9s
 +pvSpWJJ4gMyQ+bcKLxpRiJM+9+cuf4IWW+9KoNmqYU4lv5X+AIXrbrSwsn5yeyH
 d/R0lsXzAz9ULxXCc+CcA1P6OWEQJ8iOCWRR9CHuUEmMrhUNks4N4lytAmYHB1f2
 UuI5Bv9UR88Q9xrfmnCYm0TDBPNi25JcC0/UAOBnZkQDeqSVa9wgxk/AmnJh+KZe
 R0oC7d5YZ5e67u9n4VtX6S9GgHmUNSebgyFEOfqtyX3WOX19hERSYnxaHAKmeouZ
 sAi3QVaKv9n5VXipqk2u
 =tNvP
 -END PGP SIGNATURE-

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




Re: Tomcat dependency on application server

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Randhir,

On 5/15/14, 3:17 AM, Randhir Singh wrote:
 Hi,
 
 We have JBoss as the application server  Tomcat as the web server
 in our production  developmental setup which is on Red Hat Linux
 5.X. We have tomcat 6.X. My query is that if I need to restart
 tomcat, do I need to restart JBoss  Tomcat both or just restarting
 Tomcat would be enough. I am asking this query because I had killed
 the tomcat process using kill -9 and while restarting tomcat it was
 not starting but when I killed JBoss  tomcat and then restarted,
 Tomcat was up.
 
 I hope my query is clear whether Tomcat is dependent on JBoss.

I'm fairly sure that there is only a single JVM for JBoss/Tomcat. If
you killed one, you've killed the other.

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

iQIcBAEBCAAGBQJTdnUaAAoJEBzwKT+lPKRYnH8QALfeHn4XVXB6KANb0hmAPEL3
7pNRaUW0AypQQjujzr7X4DKv3MOnMwWfIaiVcazNbtC7j+W3Mi6khksZIq1cz0At
o9K0CDdJhAg5be9a68T7E5ko4mdy+rjX2ZsuX2LDdp5wyQaYWEXRWd3+hfBL2Gk7
D+225vxnMUeB9gHLaVUQ4k/3TOZvO/DYT9TCnxOlviP1+QEek5chN6a9XDJpQKpg
O/EVBudYmDMLu9QKbOJJ5jomKUUa/VPsjhwz4O32+2Zok5VWLIrct5joF3r2ej+p
5RfHLnijRcCX5QkZOAYM9mdvFuFb1+lNAUGKPJwZU47SI7delyJZwxqGJYmo495e
Q2nGMqepgXlQhOtwuTMdSh9gFV6LqJeaWcW6ZpyMNXbkNSSRSIy3hgcZqRycsSUa
dvBRg6j57MMhNiCDx9IVtxF+OqKbiiLNdb9tJRArSXdoSx3a1EYbRbmye3xWbrUv
SYadbr14KBqTXxaK2qJBb7E3j/fn1J5NKEARQbM/ML5Q/0TaNIRMlmjbOt2yccYG
pNRtC8FRkHWaN3eYtpM0vMNCZ/Cl/atzr3StoN/EX5bWjba6eaaXBaeKdG3FypyY
jL0nQu7P0Ir1ASrcxlQeN5snLmI2G4AoFjenOhEsCDDQKixSiryzZRR6ZVqCPZ/k
Bi3P3ZPYqngg8oU6s6b6
=bJS6
-END PGP SIGNATURE-

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



Re: Application monitoring

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

David,

On 5/16/14, 11:12 AM, David kerber wrote:
 On 5/15/2014 9:57 AM, Leon Rosenberg wrote:
 Hello David,
 
 I will not ask you why you are reinventing the wheel (ok, I lied,
 why are you reinventing the wheel?). You have multiple options
 available: 1) You could use jmx and publish your information as
 jmx beans. 2) You could use rmi between you 'collector' and the
 target apps. 3) You could use simple http (preferably json), but
 in that case I would advice to setup a separate collector for
 it.
 
 For any of the above options there are numbers of classes and 
 utilities you can use. For example jersey as jax-rs
 implementation is perfect for exchange of json data, for rmi you
 could use DistributeMe ( http://www.distributeme.org) or
 spring-remote, and so on.
 
 But yet again, why reinventing the wheel?
 
 I'm not trying to.  Your responses above are the exact kinds of 
 information I was looking for:  how to communicate between my app
 that displays the information, and the monitored apps.
 
 Now I just need to look into how to use jmx, rmi and json to figure
 out which will serve my needs the best.  My goal here is to be able
 to click on a browser bookmark and after logging in, have all the
 information from these dozen apps displayed in an organized table,
 so I don't have to do anything more than scroll down the page to
 see them all.
 
 They are all OS-agnostic, I presume?

I've done a presentation about how to do this with JMX. Since you are
using a persistent server that is already running Java, you could
maintain a persistent JMX connection with each of the servers to
monitor, and so some of the tools mentioned within are probably less
relevant, but here it is:
http://people.apache.org/~schultz/ApacheCon%20NA%202014/Monitoring%20Apache%20Tomcat%20with%20JMX.pdf

That will show you what information you can get from Tomcat (e.g.
request counts) as well as how to publish whatever information you
want to make available from your own web application.

If you write something cool, consider sticking it up on the wiki or
something.

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

iQIcBAEBCAAGBQJTdjOAAAoJEBzwKT+lPKRYBLQP/i4n8gy+7vE2ydGd302Qh9RY
ZXFjLUJZt4HiBm3OYQLGOMb3mSgcyYE32CFwmgNPUv5zrJdIlkBgymPBh1JN4fXk
KjWpX6uFKBzKVVa+p0IWCwQ0dGq1xvE01g2UcitivUiwV3O1FlXdOn/qOGtWvLqS
Q02VB0NrUxE3Y+HUGA6pufthhApyFQ81Vl+XUy7suh2k42WsITBed4nQBot5RE5u
NjaZS4pLYoL/t1q0Q2pFo+z/INZAjs1FsX750sMaOfLfwVDI7c4Hp1zjO74CpWfV
zOoSNQtcC96QYSILL90eBs2qT/lpc+/HPK6KFZJy6U2H29E83VKrUG58jjT5Khjv
JDPSVz1aidFKJqt3mrrw2FwiewwlVo1z39MFLtGgc/z12BnAwrwdnsE2j0teC0kZ
hq9+GxUUebLb7N3jyKHlRUpWHTEtAsfoYMppYEV+x1IFSKvEwuIv/xDHHGqq+5jx
27BOA3xPc7QTjCnpBhqU8CQFuohp+zKeo8qU+MxEkOgBYHCx7xYPwSWYDg1w/hMF
a30g126eh9aMMrMeCc0NuhPwKe1pescko6IgLgvshKMBNTM7vO4kp7CBaqkY52bw
roQxvNIKk5S8ki9biHtmTOLYTQjqZ2byzKM4bgI16aiQsSK13S4iVu7jxeq6IBc0
C0R7koNee6WgzEETFX0B
=DTAc
-END PGP SIGNATURE-

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



Re: Slow page response time in tomcat 8.0.5

2014-05-16 Thread Mark Thomas
On 15/05/2014 18:04, Hariprasad Manchi wrote:
 Hi,
 We are trying to use apache-tomcat 8.0.5 for our web application and have
 encountered performance issue with respect to the page response time.
 However, once the application is deployed in 8.0.5 we see a longer delay in
 response time from the server for the login page itself. With older version
 of tomcat i.e., tomcat 7.x(7.0.53), 6.x(6.0.18) we did not see such delay.
 
 We have 270 custom tags defined across 6 tld files in our application and
 have the tag pooling feature turned off in conf/web.xml (enablepooling is
 set to false; since this is a requirement for the application we had to
 turn it off).
 
 We tried to root cause the issue and used fidller tool to monitor the
 requests and response times. The browsers - both IE 11 and Chrome - were
 firing the requests quickly but were waiting for the response from the
 server. We do not know what is the actual cause for this delay. We have
 captured the traffic for both IE and Chrome and could send them if needed.
 
 Could you please advise how to proceed to identify the root cause for this
 delay? Or could you confirm this as already a known issue?
 
 Any help would be highly appreciated.
 
 We are not clear to which group the question should be posted, hence
 sending this email to both users and taglib-users email list.

Get a profiler. Profile what your application is doing.

Mark


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



Re: where find documentation

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Francesco,

On 5/16/14, 10:01 AM, Арсений Зинченко wrote:
 I used this one:
 
 http://wiki.metawerx.net/wiki/Web.xml
 
 
 2014-05-15 16:05 GMT+03:00 Francesco Viscomi fvisc...@gmail.com:
 
 Hi all, i'm try to find a documentation that describe every tag
 inside the web.xml file, but i wasn't able to find anything about
 that on 
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
 
 
 someone can help me? thanks in advance; Francesco Italy

There's always the servlet specification itself. There is a reference
at the end that covers most -- but not all - of the elements. There is
also a significant amount of documentation in the XML schemas. You
should check those out, too.

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

iQIcBAEBCAAGBQJTdnSmAAoJEBzwKT+lPKRY0koP/142leN00V+960gu7HMIb0ke
tX1hnY7WK0CGdjRi+YC9LvEqmyxn9EThb3MpTn/0eQOIMEOqBYSWJd3mXbEvdZ9P
U9Zy/FlWsdUYoJ3oJ9VdrI5OyvYrvl0JwqcToTBXlhFk1ukLkBOjANmqr+/egNYA
rjvuuWpoe10OvH1rGfWch7khGnLFCRYgiVy+eBvYojmglcla/2/Jfs8Nyy0At1jk
pVOi7K4qwBm6FCZqCcyWJmcVj7p8+j1P6HFRLi7i8B5IM4Rd7aluEyoGISnmwLy4
dGLWkoxlbw2ONAM9tLFPNBSmE3qXu613/rwlVlxadDJcWjUFBb2tERKQyrxN66VJ
AEjle3BIjS4YY0Xs4QxVq+8ec/givdDHVwHyGUDrNbBMHH6oJIVSR9IXRTMtDroj
I/Xk6ft1sIVYxOGIQpbmcsevYYvupdS1A9n4Q8WOm+tSonrj4YJPfD4JUXUo7S0Y
nCShmCqfFCqBZF2bk7k4iMr+b31tdUDutEKI92Ol6r16nLuNFxNIhjMSLopvjXlj
9S9RCkXMmpUxs7WhkmYitJqz3nQ4/cCKLQH5ofXXh3zu9vba0Cdjsd6EFrsdzMTF
yuZbzExW0zcnLziWpRfl/tpaqC4Y+3wUljJ4vBqcRfz9O/fkd4YVObkYzFqO4045
QssBF1LlFn9vTTcu+wEk
=P0L2
-END PGP SIGNATURE-

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



Re: where find documentation

2014-05-16 Thread Terence M. Bandoian

On 5/15/2014 8:05 AM, Francesco Viscomi wrote:

Hi all,
i'm try to find a documentation that describe every tag inside the web.xml
file, but i wasn't able to find anything about that on
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


someone can help me?
thanks in advance;
Francesco
Italy



Which version of Tomcat are you using?  Your link above is for 5.5. Go to:

http://tomcat.apache.org/

for links to documentation for other versions of Tomcat.

web.xml is documented in the servlet specifications.  Links to servlet 
specifications may be found on the Tomcat wiki:


http://wiki.apache.org/tomcat/Specifications

Hope that helps.

-Terence Bandoian

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



Re: Compiling mod_jk in CentOs release 6.5

2014-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Shailesh,

On 5/16/14, 1:57 PM, J Java wrote:
 There's no reason to read some how to guide on the Internet
 for how to build mod_jk: the building steps come with the
 source package, and they are up-to-date instead of some guy's
 blog that requires root privileges to run properly.
 
 Chris.
 
 completely agree. But what you can do when if those up-to-date
 steps are are not helping you out?

Ask here? You can get a pretty good response time with a well-asked
question.

 Also, some guy's step definitely helped me achieve waht i wanted
 to (building and settingup mod_jk) out and thats what is important
 I guess than who has written it or how he advises to do it.
 Anyway..it was just a suggestion. no advise

- -chris

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

iQIcBAEBCAAGBQJTdnV0AAoJEBzwKT+lPKRYn8YQAJEjTkkZloe8wfyAsUOKqX7h
nfKPfzdRh6vN62931gsd+DwAvgSuxk627qORaYZpHQ/R3qRcxV3on4Mt42lCwnS3
FcXPZZtq3FMfZlzvbusSTEdf2cyh3HlBzGZvI4UyLKE26O1CoGTrpR0GynxSEomw
NEdgZ/Q7ObX2G5eUvD70Yo/ZiKQCbBZ5cpaExtKWJ8wP7S++EBKZr23NVX/E8SOs
bWefpZiGD+IDBsE2ShhTMR3u+CQAu99MCL/bey2BcPkQGFI7unmtDCUTYmrTi42Z
IMWyKjhbla80s6Bj5pr+Os4lTCPwACTLIPA7WDkX14NiLVBZf+ecvIs/54EV3XA0
P3xlqIEnMt/01aQmP87Ku3wTwxuwsoALXyqx3sg9Bo2BU/xW/GVjk7q0AU3Uw58N
pJgoFGOF/a8NEJY4o1Evnot2jjxLfm8GIiKdYCM/eW7Bt+wb6pV+wARMnzR2zeD0
wRsgHcJ5k2YfdN5ULTmZbcLsDDWC63aSbI7PVYFG/7kvRw9HJv9z2Lu6kMM85kJm
5Z8ZTQjyCttOx4pNuMrQg4uHnze6fjpKIQ7pkMJj5AvVS+fBUVd3qhMqmPVeWTdu
djry54uB8Qb7qa69W+LE5tCj/eBkqbGnSlTfjj41r85n72egNjhSB3RD4le8LiVr
z9h+gkk4VdrE0T379pr8
=om6w
-END PGP SIGNATURE-

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



Re: Comet Servlet with a reverse proxy in front of it

2014-05-16 Thread Elias Kopsiaftis
Here is my config for using nginx as a reverse proxy in front of tomcat.
Seems to work so far. Just replace the question marks with your
configuration


 server {
listen 80;
server_name ??;
root /var/lib/tomcat7/webapps/?.

location / {
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:8085/;
}




On Thu, May 15, 2014 at 1:04 PM, Elias Kopsiaftis yemi...@gmail.com wrote:

 Hey,

 I actually got this working so far with nginx(and by so far I mean the
 random connection errors I was getting with apache2 have not surfaced yet).

 Ill post the nginx config setup later today when I get home for the
 benefit of anyone else who wants to do this.


 On Mon, May 12, 2014 at 3:34 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Elias,

 On 5/12/14, 11:20 AM, Elias Kopsiaftis wrote:
  Is there any way to put a reverse proxy in front of a Comet
  servlet?

 I don't believe so. There is work being done on supporting Websocket
 through mod_proxy but it will likely never support Comet.

  I tried apache but thats a no go because it uses a single thread
  per connection, which is not scaleable

 Only some Apache httpd MPMs are one-thread-per-connection.

  then I tried nginx, which perhaps I did something wrong in my
  setup but in the client code, the call to getInputStream never
  returns, indicating something is wrong. I apologize for not
  providing too many details and just proposing a general question,
  but Im hoping there is a general solution to this problem. If you
  guys needs server specific details I can provide later today when I
  get home from work.

 I think that httpd + Tomcat is not going to work, here. I'm not sure
 about Nginx. If you find something that works, please post back with
 your findings.

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

 iQIcBAEBCAAGBQJTcSJSAAoJEBzwKT+lPKRYFL8P/jryAJ8epDKL8nioPLV2PAWF
 2z2rmNLEtYq4Do+lraq0ttoIhYKkJ0pLyV7/evNDEkjTrtrM2uNEY/BrsVgWelp9
 q6RqjYKdFhc/rPmTL+Uu2JHMFfpUfNrVGqAmPwqVU6qwzVrlfujF/z/EHxq13Rib
 IXQgMJcB2yFx7Boeg2BJWLUhbTeod0aR8RjNKQG6EhiQghnATb6FpKEjHvYkJXCt
 SGr0NptEM2xVlqTfbsuBDf/ZJQS+bh9h89c0nqZPkuYWkH5ZGbq02am8e4nJOVhl
 tU3lUQCT5+3wNlXeGVuFdoOlFxl9IJGRU7sx+Sjku2eIXRDTXYvQ3sH4wgjxIomV
 qwrcN5aBnW/l5slPaXcxA6NNcxcjfOyoCBs+oLzWDA8B1ijh4JY2SsMVrUSSXDVr
 F4JIVrR+19nXJnFiBVKboU5nN54mzIo3OtKNeI3/dnITXdRX1gft5jmWaI4n59Ci
 yodCN5l35R9uFurSYWmVPyYv8Bk+aOFgYjqLPJU6d7So3g/fVx8cWubAqzj9Ft8V
 IYRBUCn/rsDW2nRXJX/vlmgKwsgrDI2rlorIdcRYmj+PCOBykuBsHpVk29Te1Cxy
 eOh7V05X7VOXzqWnOm2zO43PwCPc98g0eDlB4/l/VDyE/VZ4IXcQifa1f6vZutOH
 8mzvN7jAkrMBvsGk48kr
 =+J8x
 -END PGP SIGNATURE-

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





Re: Slow execution of Tomcat 7.0.52 due to coarse lock in WebappClassLoader.loadClass

2014-05-16 Thread Mark Thomas
On 14/05/2014 17:58, Sebastien Tardif wrote:
 I'm having some visible performance issue related to the use of method 
 synchronized loadClass(String name, boolean resolve) in WebappClassLoader
 
 I see that the author or least some of the author(s) of the class got the 
 idea in other cases of a more specialize lock that against the entire 
 instance.
 
 Should we just lock here using the name of the class we are looking for?

No. It is far from being that simple.
http://svn.apache.org/viewvc?view=revisionrevision=927565

Mark


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



Re: Session fixation Tomcat 7

2014-05-16 Thread Terence M. Bandoian

On 5/8/2014 8:56 PM, Akash Jain wrote:

Hi,

I am trying to resolve session fixation issue with tomcat 7.0.52

We have a Spring MVC application running on it, and the Auth method is
provided by another application which writes cookie, and we use the cookie
value to check whether the user is valid or not.

My application URL patterns are
/ - Home page
/login - Redirect to another application to ask user to authenticate
/myaccess/user*** -- All authenticated URL's

Context path=
  docBase=myapplication
  sessionCookieName=mycookiename
  sessionCookieDomain=application.mydomain.com
  sessionCookiePath=/

As I cannot use org.apache.catalina.authenticator.FormAuthenticator here.

How can i prevent the session fixation ?

Thanks.



Do all communications use SSL or TLS?

-Terence Bandoian


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