?????? ?????? ?????? why only 2 requests for async request can raise from a end-point?

2015-06-30 Thread ????
Hi Christopher,


after your advise, i recheck all arround, and it's really raise from the c# 
test program.  :(


there is a bug in WebRequest, i dont know what happend in this class, since 
requesting to localhost is ok. and if pure Socket, or 
WebClient.DownloadStringAsync wont meet this bug. if not your firm advice, i 
will never doubt about this.




Best Regards


--  --
??: Christopher Schultz;ch...@christopherschultz.net;
: 2015??7??1??(??) 2:00
??: Tomcat Users Listusers@tomcat.apache.org; 

: Re: ?? ?? why only 2 requests for async request can raise from a 
end-point?



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

,

On 6/30/15 1:22 PM,  wrote:
 yes, i connect tomcat directly, port is 8080.
 
 I wrote the test tool in pure non-block mode, so just one thread
 in c#, and i used webbrowser, wget, telnet to perform this test
 too.

So you have a single thread managing multiple WS connections to
Tomcat? What I'm trying to determine is how many connections you are
actually opening. How many connections is the CLR willing to open to a
single WS endpoint?

 It's very strange that it wont happen when the tomcat run in 
 localhost, this problem exist only between different machines. and
 I had write a simple echo server for compare, the echo server can 
 accept many connection as expected.
 
 now i run tomcat in embed mode, hope i can find out what
 happened...

I wonder if this is something the CLR is doing to you. Can you
instrument the client as well as the server?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktklAAoJEBzwKT+lPKRYs1cQAJ9xWApemBJHwhMoMHfuoQMQ
DMj6cQDrvrgo3Ahq4LKlhnhc/Sszjp4wpBcpBBD8ZfkTwArn3aE07ZPPjmY/3epF
EZS0aezKMPCsSngCBYj1qMEbSwTwMFdD7ofC9OW1E7z31wOfuZ2G8/XXjWdis19R
wtXyrMLZf1ZBTmdUvDR6wugbNqOqvVHkhvubgIdjK6uzbBhYrX3c+Dm6f3tIUMOq
oNMzBaeCQcILqibm9hkFK4gpIEDNI3R2EqippDu1bMcuJImNPi5vzlT0KbpzJIH4
sKubU322QIReqcG/4R+wCfNAIC0JM7fZKEj8rJonYLlvDd7KdhoPFD3xOs2uNZrw
zeksSFWJmTFuRYwGzP+X4vmXIekcRu3Wdls+lPUvy8sZKqnRJp7Wr9SN97V/7gHC
AatxKsDLsI5NvS8C1TeYqLc52Umby3ivJbzSR9T2WWy30UcoWFhYMwu1dftkgra5
rJNOgw2Ke95XQHCR1mlcZyD00l8ZzpIAU7jirTq1gSYj94t+GzGjTcN1a7GV/r2d
v8pwDNAgJbeEzMBtxFsHsZOFM4GJbX/Qx+i/j6/f6zvWCEwUmMd7mNl4/SZ/aHlm
XiaVSrXdVUDzMZqGQX9Lzsgf1SHurGCMy2J5uGijMiR3FpuzcjPoD1u5/DrGo02d
qRdyDzdNdCeygcOQbCDS
=Wmnl
-END PGP SIGNATURE-

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

application frequently down

2015-06-30 Thread Yon,
Hi all, we have application that frequently down, from log
file(catalina.out) with the information below:


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x003d66934012, pid=2956, tid=140037724735232
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build
1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode
linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0x134012]  __tls_get_addr@@GLIBC_2.3+0x134012
#
# Failed to write core dump. Core dumps have been disabled. To enable core
dumping, try ulimit -c unlimited before starting Java again
#
Anyone has idea what this error about? Thank you.


Re: why is Tomcat 7 invoking WebSocket protocol?

2015-06-30 Thread Kiran Badi
Hi Mark,

Sorry to jumping in

But even I have seen this in few of my exception traces though I never use
websockets.Some where down the line when exception is thrown wsfilter shows
up in traces.I am guessing it should be some kind of exception filter so it
bubbles up for exception types irrespective of protocol.

Let me check my old stack traces and post few snippets of it,but they were
valid exception in my case just that I never had websockets in my app.

On Monday, June 29, 2015, Mark Thomas ma...@apache.org wrote:

 On 29/06/2015 07:12, Ric Bernat wrote:
 
  We have a Jersey application running on Tomcat 7.0.62. In production,
  99.9% of our web service calls run quickly (e.g., 100ms), but there are
  about half a dozen web service calls per hour that take an extraordinary
  amount of time to complete: 30-120 seconds (not ms).
 
  We do not use WebSockets in our application. However, our profiling tool
  clearly shows that Tomcat is invoking the WebSocket protocol on the
  slow-running web service calls. In the stack trace below, see this line:
 
  org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:46)

 That shows nothing of the sort. I suggest you take a look at the code in
 question before jumping to invalid conclusions.

 Mark


 
  How can we track down what is causing Tomcat to use the WebSocket
  protocol, given that our application code does not make any references
  to WebSocket annotations, etc.? Or is there a configuration option we
  can use to cause Tomcat to not use WebSockets?
 
  Thanks much.
 
   Stack trace
org.glassfish.jersey.server.ApplicationHandler.handle
  (ApplicationHandler.java:13)
org.glassfish.jersey.servlet.WebComponent.service
  (WebComponent.java:401)
org.glassfish.jersey.servlet.ServletContainer.service
  (ServletContainer.java:386)
org.glassfish.jersey.servlet.ServletContainer.service
  (ServletContainer.java:335)
org.glassfish.jersey.servlet.ServletContainer.service
  (ServletContainer.java:222)
  ….catalina.core.ApplicationFilterChain.internalDoFilter
  (ApplicationFilterChain.java:303)
  …g.apache.catalina.core.ApplicationFilterChain.doFilter
  (ApplicationFilterChain.java:208)
 org.apache.tomcat.websocket.server.WsFilter.doFilter
 (WsFilter.java:46)
  ….catalina.core.ApplicationFilterChain.internalDoFilter
  (ApplicationFilterChain.java:241)
  …g.apache.catalina.core.ApplicationFilterChain.doFilter
  (ApplicationFilterChain.java:208)
 org.apache.catalina.core.StandardWrapperValve.invoke
  (StandardWrapperValve.java:220)
 org.apache.catalina.core.StandardContextValve.invoke
  (StandardContextValve.java:122)
  …apache.catalina.authenticator.AuthenticatorBase.invoke
  (AuthenticatorBase.java:505)
org.apache.catalina.core.StandardHostValve.invoke
  (StandardHostValve.java:170)
   org.apache.catalina.valves.ErrorReportValve.invoke
  (ErrorReportValve.java:103)
 org.apache.catalina.valves.AccessLogValve.invoke
  (AccessLogValve.java:957)
  org.apache.catalina.core.StandardEngineValve.invoke
  (StandardEngineValve.java:116)
  org.apache.catalina.connector.CoyoteAdapter.service
  (CoyoteAdapter.java:423)
  …g.apache.coyote.http11.AbstractHttp11Processor.process
  (AbstractHttp11Processor.java:1079)
  …ote.AbstractProtocol$AbstractConnectionHandler.process
  (AbstractProtocol.java:620)
  …ache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
  (NioEndpoint.java:1747)
  …apache.tomcat.util.net.NioEndpoint$SocketProcessor.run
  (NioEndpoint.java:1706)
java.util.concurrent.ThreadPoolExecutor.runWorker
  (ThreadPoolExecutor.java:1145)
   java.util.concurrent.ThreadPoolExecutor$Worker.run
  (ThreadPoolExecutor.java:615)
  …he.tomcat.util.threads.TaskThread$WrappingRunnable.run
  (TaskThread.java:61)
 java.lang.Thread.run (Thread.java:745)
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 javascript:;
  For additional commands, e-mail: users-h...@tomcat.apache.org
 javascript:;
 


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




tcnative CVE-2015-4000 (Logjam) (UNCLASSIFIED)

2015-06-30 Thread Wunder, Greg P CTR (US)
Classification: UNCLASSIFIED
Caveats: NONE

http://mail-archives.apache.org/mod_mbox/tomcat-users/201506.mbox/%3c557cce04.4020...@mediture.com%3E

Related to this link here, does anyone have a binary distro for Windows x86 and 
x64 for Tomcat 8.0.23 of tcnative-1.dll that is version 1.1.34?
I've been attempting to build locally and ran into several snags.
Rather than re-create the wheel I was trying to find out when the new version 
will be released and if there is one I can currently get.

Thanks,

Greg


Classification: UNCLASSIFIED
Caveats: NONE



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



Re: why is Tomcat 7 invoking WebSocket protocol?

2015-06-30 Thread André Warnier

Hi.

Sorry to jump in, and to top-post, and maybe make an irreverential comment :

But maybe the solution consists simply in renaming that filter, so that it does not give 
the mistaken impression that the WebSocket protocol is necessarily being used ?


Kiran Badi wrote:

Hi Mark,

Sorry to jumping in

But even I have seen this in few of my exception traces though I never use
websockets.Some where down the line when exception is thrown wsfilter shows
up in traces.I am guessing it should be some kind of exception filter so it
bubbles up for exception types irrespective of protocol.

Let me check my old stack traces and post few snippets of it,but they were
valid exception in my case just that I never had websockets in my app.

On Monday, June 29, 2015, Mark Thomas ma...@apache.org wrote:


On 29/06/2015 07:12, Ric Bernat wrote:

We have a Jersey application running on Tomcat 7.0.62. In production,
99.9% of our web service calls run quickly (e.g., 100ms), but there are
about half a dozen web service calls per hour that take an extraordinary
amount of time to complete: 30-120 seconds (not ms).

We do not use WebSockets in our application. However, our profiling tool
clearly shows that Tomcat is invoking the WebSocket protocol on the
slow-running web service calls. In the stack trace below, see this line:

org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:46)

That shows nothing of the sort. I suggest you take a look at the code in
question before jumping to invalid conclusions.

Mark



How can we track down what is causing Tomcat to use the WebSocket
protocol, given that our application code does not make any references
to WebSocket annotations, etc.? Or is there a configuration option we
can use to cause Tomcat to not use WebSockets?

Thanks much.

 Stack trace
  org.glassfish.jersey.server.ApplicationHandler.handle
(ApplicationHandler.java:13)
  org.glassfish.jersey.servlet.WebComponent.service
(WebComponent.java:401)
  org.glassfish.jersey.servlet.ServletContainer.service
(ServletContainer.java:386)
  org.glassfish.jersey.servlet.ServletContainer.service
(ServletContainer.java:335)
  org.glassfish.jersey.servlet.ServletContainer.service
(ServletContainer.java:222)
….catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:303)
…g.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:208)
   org.apache.tomcat.websocket.server.WsFilter.doFilter

(WsFilter.java:46)

….catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:241)
…g.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:208)
   org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:220)
   org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:122)
…apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:505)
  org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:170)
 org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:103)
   org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:957)
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:116)
org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:423)
…g.apache.coyote.http11.AbstractHttp11Processor.process
(AbstractHttp11Processor.java:1079)
…ote.AbstractProtocol$AbstractConnectionHandler.process
(AbstractProtocol.java:620)
…ache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
(NioEndpoint.java:1747)
…apache.tomcat.util.net.NioEndpoint$SocketProcessor.run
(NioEndpoint.java:1706)
  java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1145)
 java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:615)
…he.tomcat.util.threads.TaskThread$WrappingRunnable.run
(TaskThread.java:61)
   java.lang.Thread.run (Thread.java:745)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

javascript:;

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

javascript:;

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







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



Re: why is Tomcat 7 invoking WebSocket protocol?

2015-06-30 Thread Kiran Badi
I know for sure I am not using websockets in my application, but stack
trace shows me wsfilter used by tomcat getting called for some reason,

Below is one of the stack trace  I had in my application, exception was
valid but if you look at complete stack trace below we can see exception
propagates through all filters namely S2, Log4j Servlet, my custom filter
and finally through WS Filter.

Just for understanding purpose, is this valid flow , exceptions needs to
bubble up through all the filters ?



com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mytable'
doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2828)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2777)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1651)
at MyApp.MyAppPackage.MyClassDAO.viewAllRecords(MyClassDAO.java:44)
at MyApp.MyAppPackage.MyClass.processRequest(MyClass.java:51)
at MyApp.MyAppPackage.MyClass.doGet(MyClass.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:64)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at MyApp.handlers.MyServlet.processRequest(MyServlet.java:75)
at MyApp.handlers.MyServlet.doGet(MyServlet.java:239)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.MyFilter.MyApp.global.Handlers.trimresponse.doFilter(trimresponse.java:45)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at

Re: Tomcat - OOM Perm gen

2015-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Kiran,

On 6/29/15 10:21 AM, Kiran Badi wrote:
 Christopher Schultz wrote:
 The number of users shouldn't impact your PermGen space. Perhaps 
 only once you get to that stage are you hitting enough of your 
 features to load classes into PermGen. (Or maybe you are using 
 String.intern a lot...)
 
 I analysed some logs and I could see that users query features 
 which makes DB calls, so those calls do have 1000's of rows in 
 it.But some calls also fetch empty result set and some error out, 
 partly because code for those calls are broken( Some of those dao 
 classes have hard coded DB parameter which I am cleaning it out 
 now). As far as I know I do not do any string cancat, those calls 
 are all simple list fetch calls to views.
 
 I am trying to implement some caching using either ehcache or JCS 
 but I think it has to wait for some time, till I gain some 
 understanding on how these works.( I think I need to serialize lot 
 of model classes for that probably will require some code changes 
 again).i  know I have lot of work to do ,maybe I one at a time 
 change :)
 
 PermGen failures will effect the whole JVM. There is no way to 
 protect App B from App A unless they are in different JVMs.
 
 I can understand this. so doing daily restart now to manage  issue 
 till I figure out some solution to it.
 
 What makes you say that? It seems that you have more information 
 than you are giving us.
 
 Its not hardened code so I think it still has some issues with it. 
 Also during development I can see similar errors on local dev box, 
 If I do deploy and redeploy at least 8 to 10 times, I start seeing 
 those  perm gen errors,its just that it references a new class
 file every time,maybe I can share it with you all once I get it
 again.

Stop right there.

Are you periodically hot-re-deploying your application in production?
If so, you may want to stop doing that, as it appears that you have a
ClassLoader-pinning leak in your application or some dependent library.

See this presentation for more information:
http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60
mins.pdf

 Also it's I have written this code and I am not that fantastic 
 coder yet, but I will reach there short span :)
 
 
 Usually, PermGen doesn't have to be enormous. What's your memory 
 cap with your hosting provider?
 
 I have private tomcat 7x but I remember hosting provider
 mentioning that 512mb is final,but I will check with them again
 later this week.

You should be able to run a reasonable service in half a gig of heap
space. Just be aware that caching information in your application is
going to significantly increase the amount of heap space required by
your application in a steady-state.

 Below is what I see in catalina logs when I do restart of tomcat,
 
 Picked up _JAVA_OPTIONS: -Xms20m  -Xmx128m -XX:MinHeapFreeRatio=20
  -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m  -XX:MaxNewSize=10m 
 -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 
 -XX:+CMSClassUnloadingEnabled -XX:+CMSClassUnloadingEnabled

So you have a 128MiB max heap space, but you aren't specifying a
PermGen size. For some frameworks (particularly Spring), you'll need
to increase the size of the PermGen heap space because it really just
does need to load 3e8 classes or whatever.

Or, you could upgrade to Java 8 which does not have a PermGen space.
You'll just eventually run out of regular heap space in that case,
if you really do have a memory leak.

 I think was thinking CMSClassUnloadingEnabled should fix my perm 
 gen issues, but I think its not the case.

Class unloading should pretty much always be enabled, so that setting
likely does nothing for you. It doesn't look like you are enabling the
CMS GC, so those settings probably don't make a bit of difference.

 You either need more PermGen space, or you need to locate some 
 kind of leak in your application and fix it. IIRC, there are
 some RMI-related leaks and Proxy-related leaks in PermGen
 depending upon your exact circumstances.
 
 It would be good to know what's in PermGen when it hits its 
 limit.
 
 What are your current heap settings, including PermGen? What 
 JVM?
 
 Try: $ jmap -heap pid
 
 and
 
 $ jmap -permstat pid
 
 I will try to get those dumps but I do not use any RMI or generate 
 some kind of proxies . Mine is simple app with lot of forms in it. 
 Though there are few calls which fetches lot of data from 
 servers.Sometimes few autocomplete calls fetch 1000's of records.I 
 am trying to remove those calls.

Fetching a lot of data isn't usually a big deal. Just make sure that
your fetch size is set to something reasonable. There are some JDBC
drivers (MySQL Connector/J in particular) that will load the entire
ResultSet into memory before allowing you to traverse it unless you
make arrangements to limit that memory usage.

But bringing-back thousands of records from a db isn't a problem --
unless you don't *have to* in which case you 

RE: why is Tomcat 7 invoking WebSocket protocol?

2015-06-30 Thread Caldarale, Charles R
 From: Kiran Badi [mailto:ki...@poonam.org] 
 Subject: Re: why is Tomcat 7 invoking WebSocket protocol?

 I know for sure I am not using websockets in my application, but stack
 trace shows me wsfilter used by tomcat getting called for some reason,

As it should be.

 Just for understanding purpose, is this valid flow , exceptions needs to
 bubble up through all the filters ?

Of course.  Any method on the call stack gets a shot at the exception.

 - Chuck


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


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



Re: 回复: why only 2 requests for async request can raise from a end-point?

2015-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

许明,

On 6/29/15 5:37 AM, 许明 wrote:
 I wrote a test tool with c#, not with browser, and each request
 has it's own session, that browser not support now.
 
 And, PHP and IIS can change option to set the limitation of one 
 end-point requests, so i can't agree browser has this limit.
 
 I have run tomcat in localhost, and 100 requests are allowed, it's 
 only appear when the server and client run on different machine.

Are you connecting directly to Tomcat, or are you connecting through IIS
?

How many threads are you starting in your C# driver?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVkswtAAoJEBzwKT+lPKRY63YP/iDSLQRyZF9rzpKmj1Y+zzGw
wByBGhbT/kjUpTZ5nCOz7b3alDhJCiZ5EHXdC5h9vAiQWp0nM1VUz7uDpH0wrAxp
97xxR4BzTmwE+HzvehXWP6gpw3UZkWN4ILEi51qyYYkCVyy2ZxO3D2jDXHMvM4Aj
rdUrktB7rDhLKi/0RB18NjfmIWxvWF1HbXaEkFK6NZh0bu0B7mVuKmba2bJmFJRM
OCMaeP8WC1//2DH2+S4/QWro++tugFUE+vV+xUsW2kd4DEtczi6ZwvGnCD7uuyZc
a2T/eDe0GDP4aguBGJkP/l61X1NHHnW5vLAx26/b6f4ZJCZ9yXOdxt4b0tihHVXq
aGgcHnL6P2Z39HZZpDAdRQ46XzohkVfd4zcb+QTAEZzjzvy7r0u/Y/s4WwZwxZYk
jTMM1FEfezbiTVkd+Kvc21s8HLGHa/Ftb0m8Ywt9ISWmCWUdOMY8RNPsQ0oa6TNH
LQ9luPgg8tAe5o4aK2q1MLV9BjbrzcPCWYGMPHLCZ3rCRWj1llAmcYO9Y5VxT2xT
zirtT9VWE5hc6bYQI1irNrpPQblOBJOJlzVE4Gbb4EY87fGJZKVx6DXfXnQiy0SS
ib787uUqCiSTXbS7Jw0uZOlhRj1T5UvjzV++FTYdcH5xCIqQasvBXb6LzfLp0A8+
B48cov2uWgAQ61a+Qg7B
=w5AE
-END PGP SIGNATURE-

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



Re: Distinct servlets for different domains in one web application

2015-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Christian,

On 6/28/15 12:01 PM, Christian wrote:
 is it somehow possible to create a web application with multiple 
 servlets that are registered to different domains for the same url 
 paths using tomcat 8?

Yes, but it has nothing to do with Tomcat: you have to do the work
yourself.

 I already crawled through the catalina code that is responsible
 for the servlet selection and didn't find anything that would allow
 this. But this doesn't mean that it isn't possible at all.

Right: this isn't something that the spec requires, and it's usually
not something that the server would get involved with. But, as I said,
you can do it yourself; you have all the tools you need.

 As far as I know, java configuration for servlet registration
 doesn't allow passing domain names. But maybe there is an option
 within context.xml.

Nope.

 I want to create a web application that has different domains for
 the application itself and its management site. Both parts should
 run at the context root, at different domains. The application
 needs a shared (spring-)context in which the application's beans
 are stored.

If you want to support more than one (DNS) domain, you'll need to make
sure that your application is deployed into a Host that is either
the default Host, or one that matches all of the domains you want to
use. Fortunately, Tomcat comes pre-configured with a single, default
Host that does just that. You have nothing to do but drop your WAR
file into webapps/ and let it auto-deploy.

That's where Tomcat pretty much stops being involved, and you get to
do the rest of the work.

You mentioned that you had two servlets, and you want one to handle
everything to one domain, and the other servlet handles the other
stuff. For the sake of argument, I'll call those domains
management.app.com and everythingelse.app.com.

Let's assume you have these two servlets defined in web.xml:

  servlet
servlet-nameApplicationServlet/servlet-name
servlet-classcom.app.ApplicationServlet/servlet-class
  /servlet
  servlet
servlet-nameManagementServlet/servlet-name
servlet-classcom.app.ManagementServlet/servlet-class
  /servlet

... and you have them mapped:

  servlet-mapping
servlet-nameApplicationServlet/servlet-name
url-pattern/app/url-pattern
  /servlet-mapping

  servlet-mapping
servlet-nameManagementServlet/servlet-name
url-pattern/manage/url-pattern
  /servlet-mapping

If you want, I suppose you could map the ApplicationServlet to /. It
doesn't really matter.

At this point, anyone visiting your application could hit either of
the two mapped URL patterns to get to either servlet.

Let's assume that all you want to do is make sure that the management
servlet is only available when you use the management.app.com domain
name. Write a Filter that detects the domain name and throws you out
if it's not management.app.com. Map this filter to /manage and you
are done.

Or, if you'd like for any request to any URL to go to either /app or
/manage, then you'll want to write a Filter that does something like thi
s:

  public void doFilter(...)
  {
  String domain = // ...
  if(.equals(domain))
application.getNamedDispatcher(ManagementServlet)
   .forward(request, response);
  else
application.getNamedDispatcher(ApplicationServlet)
   .forward(request, response);
  }

Map this Filter to / and let it handle everything. Make sure you
don't map it to FORWARD requests, or you'll end up with infinite
recursion.

You'll need to grab the ServletContext in the Filter's init() method
and keep it around (as application).

At this point, you can even remove the servlet-mapping elements from
your web.xml: users will have to access the application through your
Filter no matter what.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktP7AAoJEBzwKT+lPKRYEtAP/0PlUEpG+4A7d7LzDkHsFi/N
6Hsqayn8aBL6pSXMuCBhDgmzj6JnxZ2ZrzevhksYxLLtlyhJjrhTE0VdwtASz4nH
mepVKvbaRJZ3KCeupDlTLI+YF9BRlPvUEwSuq2FW2kzH4eu7XFJ2GmoZ0HQ2xPqy
MxQ/fkLb4HZKxnF7QVAa3FrnzuINQteEp6LCOxV7ONQMU2/s/iO/JuY/LOqTHeUQ
5M2mIIZPtdJa26QDEoAjn+dxaWU00Cl/whobrPOX/On7wVt9DZOxic15u7jWqixV
XukZe4HqFI5RQop3PtODD+BzoUY02evs15TVl7tqLkmxQreH5ZBd5Q7BEfX7I69S
KP/AQYG5cSEenNrgApVe/ikFg4C3A0rn60dHviO+8grn5SDgLXQC/50+16Tjv6ix
3L1qBgyD2QD4DKj9Piv/GGZqrxJoi+ubaOtTn0keWBeJ3v+gYRxMxHJ8Gww3kSW5
NpGTSfl0mbQJCGXeBG9wPLyPRsXLLz1x3uW8z+YFr+GBYpEezEwHvRhDum/VEWd9
UeavOdcJlj2805ZUdMi6JX4FiRKX8TO6rR8LNCes/OhzbUorj19AvKSvAKh/+14J
hnvnyN3IcHjwl1oPOeSSH+Y0hxYkP3qolFGA8MRAJ2VVFDuP51DNqHNz0MySn5NS
9UyWgIqFzKXO/s/tiiPZ
=tNIx
-END PGP SIGNATURE-

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



Re: 回复: 回复: why only 2 requests for async request can raise from a end-point?

2015-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

许明,

On 6/30/15 1:22 PM, 许明 wrote:
 yes, i connect tomcat directly, port is 8080.
 
 I wrote the test tool in pure non-block mode, so just one thread
 in c#, and i used webbrowser, wget, telnet to perform this test
 too.

So you have a single thread managing multiple WS connections to
Tomcat? What I'm trying to determine is how many connections you are
actually opening. How many connections is the CLR willing to open to a
single WS endpoint?

 It's very strange that it wont happen when the tomcat run in 
 localhost, this problem exist only between different machines. and
 I had write a simple echo server for compare, the echo server can 
 accept many connection as expected.
 
 now i run tomcat in embed mode, hope i can find out what
 happened...

I wonder if this is something the CLR is doing to you. Can you
instrument the client as well as the server?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktklAAoJEBzwKT+lPKRYs1cQAJ9xWApemBJHwhMoMHfuoQMQ
DMj6cQDrvrgo3Ahq4LKlhnhc/Sszjp4wpBcpBBD8ZfkTwArn3aE07ZPPjmY/3epF
EZS0aezKMPCsSngCBYj1qMEbSwTwMFdD7ofC9OW1E7z31wOfuZ2G8/XXjWdis19R
wtXyrMLZf1ZBTmdUvDR6wugbNqOqvVHkhvubgIdjK6uzbBhYrX3c+Dm6f3tIUMOq
oNMzBaeCQcILqibm9hkFK4gpIEDNI3R2EqippDu1bMcuJImNPi5vzlT0KbpzJIH4
sKubU322QIReqcG/4R+wCfNAIC0JM7fZKEj8rJonYLlvDd7KdhoPFD3xOs2uNZrw
zeksSFWJmTFuRYwGzP+X4vmXIekcRu3Wdls+lPUvy8sZKqnRJp7Wr9SN97V/7gHC
AatxKsDLsI5NvS8C1TeYqLc52Umby3ivJbzSR9T2WWy30UcoWFhYMwu1dftkgra5
rJNOgw2Ke95XQHCR1mlcZyD00l8ZzpIAU7jirTq1gSYj94t+GzGjTcN1a7GV/r2d
v8pwDNAgJbeEzMBtxFsHsZOFM4GJbX/Qx+i/j6/f6zvWCEwUmMd7mNl4/SZ/aHlm
XiaVSrXdVUDzMZqGQX9Lzsgf1SHurGCMy2J5uGijMiR3FpuzcjPoD1u5/DrGo02d
qRdyDzdNdCeygcOQbCDS
=Wmnl
-END PGP SIGNATURE-

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



Re: AIX OS Patch Breaks Apache/Tomcat

2015-06-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

David,

On 6/30/15 1:10 PM, RAY, DAVID wrote:
 I am running Apache 2.2.29 and Tomcat 7.0.59 with tomcat 
 connector(mod_jk) version 1.2.40 on AIX version 7.1 server.
 
 Started having problems this morning after AIX OS was patched to
 AIX 7.1 TL 03 SP 04 and openssh to 6.0.0.6108. WebAdvisor runs fine
 immediately after apache is started or restarted. However its
 response slowing down.
 
 AIX server CPU steadily increases and approaches 100% after running
 for 5 or 10 minutes under heavy load.. Seeing http process
 accumulate. Not seeing much traffic at all in Tomcat server
 status.

Which process is more busy? Apache httpd or Tomcat?

 Recompiled apache, tomcat connector, and Tomcat native. Still no
 luck.
 
 Later determined there is a bug with openssh 6.0.0.6.108 and tried
 6.0.0.6109. Recompiled again.

OpenSSH should have no impact on httpd or Tomcat. Do you mean OpenSSL
instead?

 Still no improvement. Just booted from Clone backup taken before
 the AIX patch and everything runs fine, no problems. Anyone else
 have this experience with AIX patches/updates?

I'm fairly sure Rainer uses AIX quite often, and he's one of the
principal maintainers of mod_jk.

 Not really much to see in error logs. Tomcat is configured to run 
 with java6 32 bit:
 
 IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32
 jvmap3260sr16-20141216_227499 (JIT enabled, AOT enabled) J9VM -
 20141216_227499 JIT  - r9_20140523_64469ifx3 GC   -
 GA24_Java6_SR16_20141216_1020_B227499) JCL  - 20141216_01


Any change of upgrading Java? Java 6 is dead and frankly so is Java 7.
IBM may still support their own JVMs... I'm not in a position to know.
There may be a bug in the Java runtime that is causing problems for
you. At least make sure you are running the absolutely latest version
of Java 6 that you can get from IBM for AIX.

Are you able to at least test with Java 8 to see if there is any
improvement?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktjBAAoJEBzwKT+lPKRYLZIP+gM+NCqQ89hlmiaFPX2wkM3q
awLKUfSL7oeAtfbYGneikLqesfkJSZ4DSQhCapdB8XlLsfFvlLQ20roNzd6JHEa/
LufAtuSTn5Tm2gi0iI1SwrKYvZjZDwehEGi82n5qIBvP3JbYxu7MYWoLIdbyNzH5
5buPvRNR+Qft9saektlxlo8MqjetjMQ7vwPhGy4jFcq730goP4iNrmZ+tUUmoyA3
aIkuu58sH3XZnCFyULv0hNSo5lBulgv9lYIJN0uszf1mDXNgD4TcF/J3BQDRdCUC
OjxabU6uYTBhfO9BRVGuUXwadAYmqCkC+xmKykPkX3QIM5CedV3wKA0kHu+e32Cz
xSVyMgI6LC2urpxDGqTZDGUdE/YbNQ0UEzMAL5oFoTDagGv9rTt0zkATIhhABae5
IY8jtEUGuizo1Hbj7DMmFVO/qZ/lgVb2f8IzZPsBCwqxlA2k3pLuta0igb/eFUWX
NTSOcEOKzy8Zg5QyDOIWFp3omOPgiNJwGLDEXi8w5UNa6eJCbyFgcUGuROLLmxsU
DEkQbDUQf1g4Z6T7CqV0bmW+Gic/u1AKzibO+wmR7iHbtxP5RW8ytcxFVINE74zq
Kt56GKSl7FBZKAUq8nBldeAdCRYWK0CjfTVrAr0iaJfmWl9gODMCFimBJq3hSrCH
T7fhd+5uS/2ZwgNtZuDw
=4lSg
-END PGP SIGNATURE-

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



Tomcat 8 AprEndpoint Poller thread consuming high CPU

2015-06-30 Thread Rich Mayfield
Moved from Tomcat 7.0.55 to Tomcat 8.0.23 and now see the AJP Poller
thread churning through a lot of CPU in a pretty much quiet system.

This seems like a bug.

* Restarting does not resolve the issue
* I've seen some mention of bumping up the memory. Doubling the max
heap (-Xmx from 506m to 1012m) does not help. This is a relatively
small service that is essentially idle - or at least it would be with
the exception of this Poller thread.

The connector configuration is unchanged.

Connector port=28080 protocol=AJP/1.3
   secure=true
   scheme=https
   connectionTimeout=2
   packetSize=2
   maxThreads=1024
   URIEncoding=UTF-8
   redirectPort=443
   useSendfile=false
   compression=force
   
compressableMimeTypes=text/html,text/xml,text/plain,text/javascript,text/css,application/json,application/xml
/

The thread consuming all the CPU

ajp-apr-28080-Poller #62 daemon prio=5 os_prio=0
tid=0x2ba40293e000 nid=0x407d waiting on condition
[0x2ba3fc20]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xeaf94570 (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at 
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at 
java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:172)
at 
java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
at 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
at 
org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
at 
org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1883)
at java.lang.Thread.run(Thread.java:745)


# rpm -qa | grep apr
apr-1.5.1-1
apr-util-1.5.3-1

# rpm -qa | grep http
httpd-2.2.27-1

Server version: Apache Tomcat/8.0.23
Server built:   May 19 2015 14:58:38 UTC
Server number:  8.0.23.0
OS Name:Linux
OS Version: 2.6.18-371.el5
Architecture:   amd64
JVM Version:1.8.0_40-b25
JVM Vendor: Oracle Corporation

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



AIX OS Patch Breaks Apache/Tomcat

2015-06-30 Thread RAY, DAVID
Hello.

I am running Apache 2.2.29 and Tomcat 7.0.59 with tomcat connector(mod_jk) 
version 1.2.40 on AIX version 7.1 server.  Started having problems this morning 
after AIX OS was patched to AIX 7.1 TL 03 SP 04  and openssh to 6.0.0.6108.  
WebAdvisor runs fine immediately after apache is started or restarted.  However 
its response slowing down.  AIX server CPU steadily increases and approaches 
100% after running for 5 or 10 minutes under heavy load..  Seeing http process 
accumulate.  Not seeing much traffic at all in Tomcat server status.  
Recompiled apache, tomcat connector, and Tomcat native.  Still no luck.  Later 
determined there is a bug with openssh 6.0.0.6.108 and tried 6.0.0.6109.  
Recompiled again.  Still no improvement.  Just booted from Clone backup taken 
before the AIX patch and everything  runs fine, no problems.  Anyone else have 
this experience with AIX patches/updates?  Not really much to see in error 
logs.  Tomcat is configured to run with java6 32 bit:

IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32 
jvmap3260sr16-20141216_227499 (JIT enabled, AOT enabled)
J9VM - 20141216_227499
JIT  - r9_20140523_64469ifx3
GC   - GA24_Java6_SR16_20141216_1020_B227499)
JCL  - 20141216_01


Thank you.
David



?????? ?????? why only 2 requests for async request can raise from a end-point?

2015-06-30 Thread ????
Hi, Christopher,


yes, i connect tomcat directly, port is 8080.


I wrote the test tool in pure non-block mode, so just one thread in c#, and i 
used webbrowser, wget, telnet to perform this test too. 


It's very strange that it wont happen when the tomcat run in localhost, this 
problem exist only between different machines. and I had write a simple echo 
server for compare, the echo server can accept many connection as expected.


now i run tomcat in embed mode, hope i can find out what happened...


Thanks




--  --
??: Christopher Schultz;ch...@christopherschultz.net;
: 2015??7??1??(??) 1:04
??: Tomcat Users Listusers@tomcat.apache.org; 

: Re: ?? why only 2 requests for async request can raise from a 
end-point?



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

,

On 6/29/15 5:37 AM,  wrote:
 I wrote a test tool with c#, not with browser, and each request
 has it's own session, that browser not support now.
 
 And, PHP and IIS can change option to set the limitation of one 
 end-point requests, so i can't agree browser has this limit.
 
 I have run tomcat in localhost, and 100 requests are allowed, it's 
 only appear when the server and client run on different machine.

Are you connecting directly to Tomcat, or are you connecting through IIS
?

How many threads are you starting in your C# driver?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVkswtAAoJEBzwKT+lPKRY63YP/iDSLQRyZF9rzpKmj1Y+zzGw
wByBGhbT/kjUpTZ5nCOz7b3alDhJCiZ5EHXdC5h9vAiQWp0nM1VUz7uDpH0wrAxp
97xxR4BzTmwE+HzvehXWP6gpw3UZkWN4ILEi51qyYYkCVyy2ZxO3D2jDXHMvM4Aj
rdUrktB7rDhLKi/0RB18NjfmIWxvWF1HbXaEkFK6NZh0bu0B7mVuKmba2bJmFJRM
OCMaeP8WC1//2DH2+S4/QWro++tugFUE+vV+xUsW2kd4DEtczi6ZwvGnCD7uuyZc
a2T/eDe0GDP4aguBGJkP/l61X1NHHnW5vLAx26/b6f4ZJCZ9yXOdxt4b0tihHVXq
aGgcHnL6P2Z39HZZpDAdRQ46XzohkVfd4zcb+QTAEZzjzvy7r0u/Y/s4WwZwxZYk
jTMM1FEfezbiTVkd+Kvc21s8HLGHa/Ftb0m8Ywt9ISWmCWUdOMY8RNPsQ0oa6TNH
LQ9luPgg8tAe5o4aK2q1MLV9BjbrzcPCWYGMPHLCZ3rCRWj1llAmcYO9Y5VxT2xT
zirtT9VWE5hc6bYQI1irNrpPQblOBJOJlzVE4Gbb4EY87fGJZKVx6DXfXnQiy0SS
ib787uUqCiSTXbS7Jw0uZOlhRj1T5UvjzV++FTYdcH5xCIqQasvBXb6LzfLp0A8+
B48cov2uWgAQ61a+Qg7B
=w5AE
-END PGP SIGNATURE-

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

RE: why is Tomcat 7 invoking WebSocket protocol?

2015-06-30 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: why is Tomcat 7 invoking WebSocket protocol?

 But maybe the solution consists simply in renaming that filter, so that it 
 does not 
 give the mistaken impression that the WebSocket protocol is necessarily being 
 used ?

That can't be a solution, because there really isn't a problem here.  The 
WsFilter has to be in the chain, just in case there's a websocket upgrade in 
the request.  The OP needs to focus on the real problem, not this non-issue.

 - Chuck


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


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



[OT] Re: SSL configuration using PFX as keystore

2015-06-30 Thread Mark Thomas
This is probably off-topic now so marking as such.

On 29/06/2015 14:29, André Warnier wrote:
 Mark Thomas wrote:
 On 26/06/2015 19:37, Mark Thomas wrote:
 On 22/06/2015 11:56, Mark Thomas wrote:
 On 22/06/2015 09:39, Mark Thomas wrote:
 snip/

 Prompting for authentication in response to an untrusted certificate is
 bizarre to say the least.

 Microsoft generously provide MSDN subscriptions for Apache committers
 which is why I have the various OS's to hand to test this. The
 subscription also comes with tech support. I'll open an incident. It
 will be interesting to see if things have improved since I last tried
 raising bugs with Microsoft (I filed so many bugs with MS Office and it
 took so long for MS to fix them that I hit the limit of issues MS would
 let me have open in parallel).
 Support incident raised. I await the response with interest...

 Oh dear. Not a good first response from Microsoft.

 First they tried to say that the WebDAV server must be triggering the
 prompt for credentials which would be difficult to say the least given
 that the TLS connection is never established AND that the WebDAV
 endpoint was configured for anonymous access.

 Then they tried to suggest that I contact Apache for support. Lets just
 say that suggestion got shut down rather quickly.
 
 Like, I /am/ Apache support ? :-)

Pretty much. Once I'd stopped laughing.

 Finally they went back to trying to suggest that the server was asking
 for credentials. A rather circular discussion followed that demonstrated
 that the support person had little to no understanding of the OSI
 network model (they continued to try to claim that establishing a TCP
 connection meant that the WebDAV server could have sent the request for
 authentication credentials despite the fact that the TLS connection
 failed).

 The only small ray of hope is that they asked for a network trace of the
 connection process. That should enable someone more clueful at Microsoft
 to confirm it is the client error handling at fault.

 I'll keep the list informed of progress.

Progress, if you can call it that, has not been good. They have now
asked for additional network traces since:

quote
... to be able to understand what packets are sent by client and what
response did Server generate for the specific packet, I would like to
check a simultaneous trace on both communication endpoints
/quote

I have just sent a very long, fairly stropy reply pointing out the
complete pointlessness of this request - not least because the
information they claim they don't have is right in front of them in the
form of the sequence and acknowledgement numbers in the network trace.

I've also formally complained to the support engineer's manager and
requested - no, make that demanded - that the issue is passed to the
relevant product team.

I'd share the full e-mails but during my investigations I have stumbled
across a very, very minor security issue in the Microsoft WebDAV client.
It barely qualifies as a problem but it is only fair to give Microsoft a
chance to fix it before I go public with the details. I'll save the
e-mails and make then public once the security issue has gone away. It
might make an amusing lightning talk presentation at ApacheCon one year.

I will say that if you are using the WebDAV client then it is extremely
unlikely that you will be affected by the security issue. My view is
that the security issue is not sufficient reason on its own to look for
a different client.

That said, based on my experience of this WebDAV client in the past
(very buggy) and my current experience trying to get what should be a
simple bug fixed in the current client I would always recommend that you
use a 3rd party WebDAV client (and check out the quality of the support
provided before you make your final selection).

Mark

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