Re: Disabling hostname verification on websockets in Tomcat 8+

2023-05-26 Thread V User
ealize that was significantly different from X509ExtendedTrustManager. Looks like it's working now, thanks! On Fri, May 26, 2023 at 3:24 AM Mark Thomas wrote: > On 25/05/2023 22:52, V User wrote: > > > The how-to on websockets ( > > https://tomcat.apache.org/tomcat-9.0-doc/web-socket-howto.html)

Re: Disabling hostname verification on websockets in Tomcat 8+

2023-05-26 Thread Mark Thomas
On 25/05/2023 22:52, V User wrote: The how-to on websockets ( https://tomcat.apache.org/tomcat-9.0-doc/web-socket-howto.html) says that you can bypass hostname verification with a custom TrustManager: "For secure server endpoints, host name verification is enabled by default. To b

Disabling hostname verification on websockets in Tomcat 8+

2023-05-25 Thread V User
e would be to update all our servers to have certificates with proper SANs and make our application initiate websockets using hostnames that match the SANs, but that will take some time to do and I'm trying to figure out if there's a workaround that will let us complete the upgrade to Tomcat 9

Re: Websockets: get Reference to @ServerEndpoint in a Servlet ?

2022-07-04 Thread Mark Thomas
On 30/06/2022 11:56, Jürgen Weber wrote: Hi, use case: HTML clients connect to @ServerEndpoint, some Servlet.GET should send a message to connected HTML clients. I found no other way to have the Servlet have a reference to the ServerEndpoint than a hack with a static field, as in the Tomcat

Websockets: get Reference to @ServerEndpoint in a Servlet ?

2022-06-30 Thread Jürgen Weber
Hi, use case: HTML clients connect to @ServerEndpoint, some Servlet.GET should send a message to connected HTML clients. I found no other way to have the Servlet have a reference to the ServerEndpoint than a hack with a static field, as in the Tomcat sample.

Re: Load balancing websockets

2021-08-01 Thread Christopher Schultz
Sridar, On 7/28/21 20:16, Sridhar Rao wrote: We are using the tomcat8.5 app nodes behind an Nginx Load Balancer. Whenever the LB takes out an app node from the pool, "existing" WebSocket connections are still staying with the app node. Also, if a new app node is added to the pool, WS

Load balancing websockets

2021-07-28 Thread Sridhar Rao
Hi All, We are using the tomcat8.5 app nodes behind an Nginx Load Balancer. Whenever the LB takes out an app node from the pool, "existing" WebSocket connections are still staying with the app node. Also, if a new app node is added to the pool, WS connections are not load balanced as they are

Re: Tomcat Secure WebSockets clients - hostname verification

2019-10-09 Thread Gary Sheppard
On Wed, Oct 9, 2019, 18:11 Gary Sheppard wrote: > On Tue, Jun 12, 2018 at 12:13 Mark Thomas wrote: > > >> It would be very useful to be able to configure this, so if you are > >> going to patch the code, please make this configurable by the client. > >> See HttpsURLConnection.setHostnameVerifier

Re: Tomcat Secure WebSockets clients - hostname verification

2019-10-09 Thread Gary Sheppard
On Tue, Jun 12, 2018 at 12:13 Mark Thomas wrote: >> It would be very useful to be able to configure this, so if you are >> going to patch the code, please make this configurable by the client. >> See HttpsURLConnection.setHostnameVerifier >> >> I think it's appropriate to simply match that API

Re: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-31 Thread Mark Thomas
On 31/07/2019 04:37, Kirill Ilyukhin wrote: > Hello Mark, > > Please let me disagree with you. I have connected JVisualVM to Tomcat JVM, > run the test with 10,000 connections, performed several explicit GCs and > made a heap dump. All 10,000 WsSessions are in heap. They are referenced as >

Re: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-30 Thread Kirill Ilyukhin
Hello Mark, Please let me disagree with you. I have connected JVisualVM to Tomcat JVM, run the test with 10,000 connections, performed several explicit GCs and made a heap dump. All 10,000 WsSessions are in heap. They are referenced as following: this <- wsSession - class:

Re: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-30 Thread Mark Thomas
On 30/07/2019 05:48, Kirill Ilyukhin wrote: > Hello Mark, > > Please see the test case and Tomcat JVM heap dump screenshot attached.  > For sake of simplicity I do Thread.sleep() in client code instead of > reading bytes from server. That test case does not demonstrate a memory leak in either

Re: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-29 Thread Kirill Ilyukhin
Hello Mark, Please see the test case and Tomcat JVM heap dump screenshot attached. For sake of simplicity I do Thread.sleep() in client code instead of reading bytes from server. Test configuration is the following: Server version:Apache Tomcat/8.5.3 Server built: Jun 9 2016

Re: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-29 Thread Mark Thomas
On 26/07/2019 10:33, Kirill Ilyukhin wrote: > Hello, > > When Tomcat receives WebSocket text message with invalid UTF-8, it closes > this connection with NOT_CONSISTENT reason. But after that some objects > (WsSession, UpgradeHandler, etc) stay in heap forever. They are referenced > from

Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-26 Thread Kirill Ilyukhin
Hello, When Tomcat receives WebSocket text message with invalid UTF-8, it closes this connection with NOT_CONSISTENT reason. But after that some objects (WsSession, UpgradeHandler, etc) stay in heap forever. They are referenced from AbstractProtocol's connections map. This leak consistently

Re: Using custom Configurator with WebSockets

2019-04-28 Thread Christopher Dodunski
Your idea of wrapping the interface returned by the registry was a stroke of brilliance! And I'm pleased to say it was successful. I'm now working to resolve another small hiccup. The IoC registry can be configured to provide the service as either a singleton or a new instance for each new

Re: Using custom Configurator with WebSockets

2019-04-26 Thread Mark Thomas
Hmm. Looking at this some more I'm not sure this is going to work. HarbourServerEndpoint needs to extend javax.websocket.Endpoint which it can't do as an interface. I think you are going to have to wrap the instance returned by the registry. In which case you can probably go back to using POJO.

Re: Using custom Configurator with WebSockets

2019-04-26 Thread Christopher Dodunski
So I've converted the server endpoint from annotation-based to programmatic, to get around the constraint of the @ServerEndpoint annotation having to decorate a concrete class. The elements of this annotation now occupy an implementation of ServerApplicationConfig: public class

Re: Using custom Configurator with WebSockets

2019-04-24 Thread Christopher Dodunski
Thanks Mark, you've made it clear that annotating the interface is not an option. Converting my server endpoint from annotation based to programmatic is not a problem, nor is implementing ServerApplicationConfig to configure what were previously @ServerEndpoint elements: value, encoders,

Re: Using custom Configurator with WebSockets

2019-04-24 Thread Mark Thomas
anding of the WebSocket > library. It won't work. From the Java WebSockets specification: 4.1 @ServerEndpoint This class level annotation signifies that the Java class it decorates must be deployed by the implementation as a websocket server endpoint and made available in the URI-space of the webso

Re: Using custom Configurator with WebSockets

2019-04-24 Thread Christopher Dodunski
Hi Mark, Looking at the Tapestry-IoC Registry code I notice that although it constructs a (plastic) service proxy object, it does cast it to its associated interface before making it available from the registry's getService() method. So if I move the WebSocket annotations to my interface as

Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
Based on what you wrote regarding WebSocket annotations not following Java inheritance, I imagine the below wouldn't work either. public class MyServerEndpointConfig extends ServerEndpointConfig { @Override public Class getEndpointClass() { return MyServiceInterface.class; }

Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
> The custom Configurator looks fine. The problem is with trying to do > this with a POJO endpoint. There is an underlying assumption that - for > a POJO endpoint - the endpoints will will instances of the POJO class. > This doesn't seem to hold in your case so hence it breaks. > > The WebSocket

Re: Using custom Configurator with WebSockets

2019-04-22 Thread Mark Thomas
On 17/04/2019 22:58, Christopher Dodunski wrote: > Hello, > > Just a quick question with regard to extending > ServerEndpointConfig.Configurator to override Tomcat's default action of > instantiating the POJO class annotated with @ServerEndpoint on receiving a > WebSocket request. My reason for

Using custom Configurator with WebSockets

2019-04-17 Thread Christopher Dodunski
Hello, Just a quick question with regard to extending ServerEndpointConfig.Configurator to override Tomcat's default action of instantiating the POJO class annotated with @ServerEndpoint on receiving a WebSocket request. My reason for doing this is that my endpoint class depends on IoC

Re: Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Just to clarify, both services being injected the IoC way are developed by me as part of the core program, so nothing sinister to be concerned about. What would be useful to know is whether Tomcat instantiates classes annotated with @ServerEndpoint inside or outside of the context of the WAR app

Re: Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Hi John, The server-side endpoint is itself implemented as a Tapestry 'service', allowing it to be injected into other application classes for pushing messages out to connected clients. Whereas the service injected into the endpoint class itself allows the endpoint to query this service when a

Re: Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread John Dale
IoC - *shudders* Can't this be used to "inject" mass surveillance into J2E apps? It was curiously missing in the bullet items down the home page of tapestry. :p So, you're expecting to inject dependencies into components instantiated on a websocket? By "the rest of the application" below, are

Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Hi team, I have developed a web application using the Apache Tapestry framework and deployed on Apache Tomcat. The application also supports WebSocket connections with desktop clent applications. Following the advice of the Tapestry community, I included the server-side endpoint within the

Re: HTTP2 with WebSockets

2019-02-07 Thread Mark Thomas
On 07/02/2019 00:31, Jesse Schulman wrote: > Is it possible for tomcat to run with HTTP2 and WebSockets on the same > connector? I have tried configuring it myself and looked for examples > without success. This works out of the box. I have confirmed the behaviour with my local build

Re: HTTP2 with WebSockets

2019-02-06 Thread Jesse Schulman
ort in > which the app can access tomcat for websockets directly. We've not been > able to get this to work over httpd. > John > > > On Wed, Feb 6, 2019 at 5:32 PM Jesse Schulman > wrote: > > > Is it possible for tomcat to run with HTTP2 and WebSockets on the same > &g

Re: HTTP2 with WebSockets

2019-02-06 Thread John Larsen
I am interested in this too. Basically we've had to set another port in which the app can access tomcat for websockets directly. We've not been able to get this to work over httpd. John On Wed, Feb 6, 2019 at 5:32 PM Jesse Schulman wrote: > Is it possible for tomcat to run with HT

HTTP2 with WebSockets

2019-02-06 Thread Jesse Schulman
Is it possible for tomcat to run with HTTP2 and WebSockets on the same connector? I have tried configuring it myself and looked for examples without success. Thanks! Jesse

Re: WebSockets and JSPs

2018-10-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Shawn, On 10/16/18 00:00, Shawn Heisey wrote: > On 10/15/2018 9:16 PM, Jerry Malcolm wrote: >> I have several webapps that do a significant amount of recursive >> loads of snippits of HTML utilizing XHR/http/ajax requests. These >> apps are all

Re: WebSockets and JSPs

2018-10-15 Thread Shawn Heisey
On 10/15/2018 9:16 PM, Jerry Malcolm wrote: I have several webapps that do a significant amount of recursive loads of snippits of HTML utilizing XHR/http/ajax requests. These apps are all debugged and in production.   The server has no problem whatsoever in keeping up with the multiple

WebSockets and JSPs

2018-10-15 Thread Jerry Malcolm
limits on the browsers that block more than 6 concurrent connections to a server is killing me in performance. I've been looking into WebSockets which I understand does not incur the wrath of the browsers when I have a need for more than 6 concurrent connections.   I have no problem making

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-13 Thread tomcat
*client* API ? Yes, the client API is part of the websockets EE specification. Initially, Tomcat had just enough to implement the requirements of the specification, so it was unusable in practice (users were supposed to use another client, such as Tyrus which is now donated to Jakarta - feels nice

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-12 Thread Rémy Maucherat
On Tue, Jun 12, 2018 at 7:05 PM André Warnier (tomcat) wrote: > This is a bit OT, but I have a question since the beginning of this thread > : > Is Tomcat really supposed to provide a websocket *client* API ? > Yes, the client API is part of the websockets EE specification. Initi

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 6/12/18 1:06 PM, André Warnier (tomcat) wrote: > On 12.06.2018 18:13, Mark Thomas wrote: [snip].. >> >> I'll see what I can do. The major constraint is that all this has >> to be set via Tomcat specific user properties as there is no API

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-12 Thread tomcat
On 12.06.2018 18:13, Mark Thomas wrote: [snip].. I'll see what I can do. The major constraint is that all this has to be set via Tomcat specific user properties as there is no API for in the Java WebSocket API. This is a bit OT, but I have a question since the beginning of this thread : Is

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-12 Thread Mark Thomas
On 12/06/2018 16:12, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/11/18 10:31 AM, Mark Thomas wrote: On 11/06/18 11:47, Weiner Harald wrote: What are your thoughts? I'm leaning towards adding: SSLParameters sslParams = new SSLParameters();

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/11/18 10:31 AM, Mark Thomas wrote: > On 11/06/18 11:47, Weiner Harald wrote: > > > >> What are your thoughts? > > I'm leaning towards adding: > > SSLParameters sslParams = new SSLParameters(); >

Re: Tomcat Secure WebSockets clients - hostname verification

2018-06-11 Thread Mark Thomas
On 11/06/18 11:47, Weiner Harald wrote: > What are your thoughts? I'm leaning towards adding: SSLParameters sslParams = new SSLParameters(); sslParams.setEndpointIdentificationAlgorithm("HTTPS"); sslSocket.setSSLParameters(sslParams); unconditionally to WsWebSocketContainer.createSSLEngine()

Tomcat Secure WebSockets clients - hostname verification

2018-06-11 Thread Weiner Harald
Hello Tomcat user group, I want a Tomcat-Servlet to connect to a secure web socket endpoint to exchange data with another component / server (so my Tomcat-Servlet is acting as a WebSocket client). Now I would also like to do some hostname verification (verify that the host to which I am

Re: x-forwarded-X stuff and websockets

2018-04-26 Thread Johan Compagner
aders Tomcat depends on to identify the request as a WebSocket > request. Can you use tcpdump to capture a request that returns a 404? > Looking at that trace should point us in the right direction. > > Mark > thx mark thats very likely it. https://aws.amazon.com/elasticloadbal

Re: x-forwarded-X stuff and websockets

2018-04-26 Thread Mark Thomas
i checked they are on all > the reques tthen. > > This seems to work for all kind of connections to servlets/files/filters > and so on except websockets > Suddenly if we switch that on then all the websocket connections are > returning 404 (i see that in the browser a

x-forwarded-X stuff and websockets

2018-04-26 Thread Johan Compagner
/files/filters and so on except websockets Suddenly if we switch that on then all the websocket connections are returning 404 (i see that in the browser and in the tomcat access log) Can't find any other thing in the log files that would give me a clue what is happening Does anybody has an idea why

Re: [OT] Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread Guang Chao
omcat 8.5.16 with Java 1.8.0_91, Vaadin 7.7.10 and > >> Atmosphere Websockets. > >> > >> We have had reports of sessions logging out while users are > >> active with our Vaadin-based application. This has been > >> frustrating as we can't seem to track

Re: [OT] Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread Mark Thomas
On 09/08/17 17:46, Christopher Schultz wrote: > Websocket ignoramus, here. Is there a way for (websocket) application > code on the server side to trigger a "touch" of the HttpSession that > is linked with the connection? Or is the problem that the websocket > connection and the HTTP connection

Re: [OT] Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 8/9/17 11:35 AM, Mark Thomas wrote: > On 09/08/17 16:09, David Wall wrote: >> We're using Tomcat 8.5.16 with Java 1.8.0_91, Vaadin 7.7.10 and >> Atmosphere Websockets. >> >> We have had reports of sessi

Re: Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread David Wall
On 8/9/17 8:35 AM, Mark Thomas wrote: On 09/08/17 16:09, David Wall wrote: We're using Tomcat 8.5.16 with Java 1.8.0_91, Vaadin 7.7.10 and Atmosphere Websockets. We have had reports of sessions logging out while users are active with our Vaadin-based application. This has been frustrating

Re: Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread Mark Thomas
On 09/08/17 16:09, David Wall wrote: > We're using Tomcat 8.5.16 with Java 1.8.0_91, Vaadin 7.7.10 and > Atmosphere Websockets. > > We have had reports of sessions logging out while users are active with > our Vaadin-based application. This has been frustrating as we can't >

Session timeout despite user activity - websockets on Tomcat 8.5.16

2017-08-09 Thread David Wall
We're using Tomcat 8.5.16 with Java 1.8.0_91, Vaadin 7.7.10 and Atmosphere Websockets. We have had reports of sessions logging out while users are active with our Vaadin-based application. This has been frustrating as we can't seem to track down why Tomcat's session is not being updated

finally websockets close correctly

2017-08-09 Thread Cristian Lorenzetto
oh finally you resolved the problem with websockets when is closed... when i told you 2 years ago ... i didnt hear me

Re: parallel deployment and websockets

2017-05-31 Thread Johan Compagner
he time out happens a new websocket connection is coming in (with the above url) then we quickly re attach the session object to that new endpoint and it will go on only after a while if there is no new websocket being setup, we invalidate the session object (and then we could also invalidate the h

Re: parallel deployment and websockets

2017-05-31 Thread Mark Thomas
On 31/05/17 08:38, Johan Compagner wrote: >> >> >> It depends. If the URL in the HTTP UPGRADE request includes the session >> ID, and that session ID is still valid in ##1, then the WebSocket >> request will be handled by ##1. >> >> Mark >> >> > would a feature request be accepted for this that

Re: parallel deployment and websockets

2017-05-31 Thread Johan Compagner
> > > It depends. If the URL in the HTTP UPGRADE request includes the session > ID, and that session ID is still valid in ##1, then the WebSocket > request will be handled by ##1. > > Mark > > would a feature request be accepted for this that there can be a cookie set where that "load balancer"

Re: parallel deployment and websockets

2017-05-30 Thread Ludovic Pénet
messages on reconnections. Hope this helps. Ludovic Le 30 mai 2017 12:40:45 GMT+02:00, Johan Compagner <jcompag...@servoy.com> a écrit : >> >> > But now i have websockets, if i connect to ##1 first and i have the >end >> > point there >> > Then i add a ##

Re: parallel deployment and websockets

2017-05-30 Thread Johan Compagner
> > > But now i have websockets, if i connect to ##1 first and i have the end > > point there > > Then i add a ##2 version of the context > > then i guess a new user that opens a websocket will go to ##2 > > but if the existing user does a refresh in the browser

Re: parallel deployment and websockets

2017-05-30 Thread Mark Thomas
this is jsessionid? > > So a refresh in the browser or another request with the jsessionid will go > to the version it started with i guess? > > But now i have websockets, if i connect to ##1 first and i have the end > point there > Then i add a ##2 version of the context >

parallel deployment and websockets

2017-05-30 Thread Johan Compagner
id will go to the version it started with i guess? But now i have websockets, if i connect to ##1 first and i have the end point there Then i add a ##2 version of the context then i guess a new user that opens a websocket will go to ##2 but if the existing user does a refresh in the browser then it will als

Re: Websockets : differents behaviours on connection when using WS or WSS

2016-07-18 Thread Mark Thomas
On 18/07/2016 16:25, l.pe...@senat.fr wrote: > Hi. > > I am using Tomcat 8.0.36 with Atmosphere 2.4.5 ( > https://github.com/Atmosphere/atmosphere ) to implement WebSockets with > fallbacks such as long polling. Can you reproduce this without Atmosphere? If not, that suggests an

Re: Websockets : differents behaviours on connection when using WS or WSS

2016-07-18 Thread l.pe...@senat.fr
On 18/07/2016 16:25, l.pe...@senat.fr wrote: Hi. I am using Tomcat 8.0.36 with Atmosphere 2.4.5 ( https://github.com/Atmosphere/atmosphere ) to implement WebSockets with fallbacks such as long polling. I am writing tests using Tomcat JSR356 implementation. I studied your WebSocket samples

Websockets : differents behaviours on connection when using WS or WSS

2016-07-18 Thread l.pe...@senat.fr
Hi. I am using Tomcat 8.0.36 with Atmosphere 2.4.5 ( https://github.com/Atmosphere/atmosphere ) to implement WebSockets with fallbacks such as long polling. I am writing tests using Tomcat JSR356 implementation. I studied your WebSocket samples and I am using a fake trustore

Weird problem with WebSockets

2016-07-08 Thread Edwin Quijada
Hi! I have developed an app using websocket. I am using servers to upload my app in DigitalOcean but here the websockets doesnt work but using another server server4U everuthing is fine. I am using Tomcat 8.5.3 somebody has any cluee, any, about this behavour , the only thing that I think

Re: WebSockets

2016-07-08 Thread Martin Funk
are served. At poking around with the WebSockets I had a hard time to figure out if the HTML was wrong or if the server just didn't serve the Endpoint. So basically for debugging reasons. mf 2016-07-03 18:57 GMT+02:00 Mark Thomas <ma...@apache.org>: > On 03/07/2016 11:04, Martin Funk wrot

Re: WebSockets

2016-07-03 Thread Mark Thomas
On 03/07/2016 11:04, Martin Funk wrote: > Hi, > > I'm into my first steps of using the WebSocket API. > Things are quite nice so far, WebSockets, used the right way, might open up > a complete new type of WebApplications. > > I've got a question though, is there a wa

WebSockets

2016-07-03 Thread Martin Funk
Hi, I'm into my first steps of using the WebSocket API. Things are quite nice so far, WebSockets, used the right way, might open up a complete new type of WebApplications. I've got a question though, is there a way to configure Tomcat to announce the annotated ServerEndpoints, it comes across

8.0.33 unencrypted websockets not generating correct HTTP CONNECT when using proxies?

2016-05-02 Thread Rich Carreiro
I am running Tomcat 8.0.33. In my webapp I need to make outbound websocket connections (i.e. be a client endpoint) through a HTTP proxy. Outbound encrypted websockets (wss://foo.bar) work fine, but unencrypted ones (ws://foo.bar) fail. What I am seeing

Re: Tomcat 9.0.0M4 (and trunk) issue with Websockets (bug?)

2016-04-06 Thread Mark Thomas
On 05/04/2016 19:48, Mark Thomas wrote: > On 04/04/2016 18:01, Francesco Bassi wrote: >> Hello everybody. >> >> Tomcat 9 has a different behaviour than Tomcat 8, during the management of >> MessageHandler.onMessage: >> >> - in Tomcat 8: >> Thread.currentThread().getContextClassLoader() returns

Re: Tomcat 9.0.0M4 (and trunk) issue with Websockets (bug?)

2016-04-05 Thread Mark Thomas
On 04/04/2016 18:01, Francesco Bassi wrote: > Hello everybody. > > Tomcat 9 has a different behaviour than Tomcat 8, during the management of > MessageHandler.onMessage: > > - in Tomcat 8: > Thread.currentThread().getContextClassLoader() returns an instance of >

Tomcat 9.0.0M4 (and trunk) issue with Websockets (bug?)

2016-04-04 Thread Francesco Bassi
Hello everybody. Tomcat 9 has a different behaviour than Tomcat 8, during the management of MessageHandler.onMessage: - in Tomcat 8: Thread.currentThread().getContextClassLoader() returns an instance of org.apache.catalina.loader.WebappClassLoader - in Tomcat 9

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Mark Thomas
...@apache.org: On 22/03/2014 16:17, Cyril Auburtin wrote: Hi, this issue concerns the tomcat-embed server, (likely also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Cyril Auburtin
also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http://www.oracle.com/technetwork/articles/java/jsr356-1937161.html) and noticed it from my project

RE: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-24 Thread Caldarale, Charles R
From: Cyril Auburtin [mailto:cyril.aubur...@gmail.com] Subject: Re: [Bug 56301] Websockets not working after 8.0.0-RC10 Tomcat 8.0.0-RC10 is the stable version or is it 8.0.3? No version of Tomcat 8 has been released as stable. Look here: http://tomcat.apache.org/whichversion.html

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-23 Thread Cyril Auburtin
, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http://www.oracle.com/technetwork/articles/java/jsr356-1937161.html) and noticed it from my project https://github.com/n11/mongo-cli-java

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-22 Thread Cyril Auburtin
Hi, this issue concerns the tomcat-embed server, (likely also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http://www.oracle.com/technetwork/articles/java/jsr356

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-22 Thread Mark Thomas
On 22/03/2014 16:17, Cyril Auburtin wrote: Hi, this issue concerns the tomcat-embed server, (likely also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-22 Thread Cyril Auburtin
, Cyril Auburtin wrote: Hi, this issue concerns the tomcat-embed server, (likely also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http://www.oracle.com

Re: [Bug 56301] Websockets not working after 8.0.0-RC10

2014-03-22 Thread Hardik Vaishnav
-embed server, (likely also the normal tomcat server) after version 8.0.1, websockets can't be estblished like before. I tried from a simple websocket example (standard java websocket implemented in tomcat8 http://www.oracle.com/technetwork/articles/java/jsr356-1937161.html

Websockets timing out

2014-03-04 Thread Bob Mancarella
Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds OnClose is called and the connection is closed. I have tried changing connectionTimeout=-1 on Connector.

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
Ubuntu 13.04 and Tomcat 8 Same issue. Client makes the connection fine. Tomcat closes the connection in 10 seconds.

Re: Websockets timing out

2014-03-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 1:15 PM, Bob Mancarella wrote: Ubuntu 13.04 and Tomcat 8 Same issue. Client makes the connection fine. Tomcat closes the connection in 10 seconds. What's the client timeout on the server side? Perhaps you are... timing out. -

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
Besides what I mentioned where would i find that? On Tue, Mar 4, 2014 at 1:54 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 1:15 PM, Bob Mancarella wrote: Ubuntu 13.04 and Tomcat 8 Same issue. Client

Re: Websockets timing out

2014-03-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 11:16 AM, Bob Mancarella wrote: Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
Just using the EchoAnnotation code /// // client code

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
sorry, target is actually target = 'ws://' + window.location.host + '/inlook/websocket/echoAnnotationhttp://connect.ws/ ';

Re: Websockets timing out

2014-03-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bob, On 3/4/14, 2:39 PM, Bob Mancarella wrote: Just using the EchoAnnotation code

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
More info. This is the return code to the browser 1006CLOSE_ABNORMAL*Reserved.* Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. On Tue, Mar 4, 2014 at 2:41 PM, Bob Mancarella bobm...@gmail.com wrote: sorry,

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
Thats the strange thing. The code isnt doing anything. It connects, receives the onopen message and then the onclose with the 1006 return code within a few seconds. On Tue, Mar 4, 2014 at 3:04 PM, Bob Mancarella bobm...@gmail.com wrote: More info. This is the return code to the browser

Re: Websockets timing out

2014-03-04 Thread Mark Thomas
On 04/03/2014 16:16, Bob Mancarella wrote: Tomcat 7.0.52 on Ubuntu 14.04 Websocket connection closes automatically after about 10 seconds. The browser creates the initial connection. OnOpen is called on the server. After 10 seconds OnClose is called and the connection is closed. I have

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
JSR356

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it seems to work. Anyone else seeing this? On

Re: Websockets timing out

2014-03-04 Thread Mark Thomas
On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here http://www.websocket.org/echo.html I get the same results. Click on Connect but don't hit Send and I get a Disconnected message soon after. If I use TLS it seems to work. If I hit Send immediately after Connect it

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. On Tue, Mar 4, 2014 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:36, Bob Mancarella wrote: OK, this is strange. If I go here

Re: Websockets timing out

2014-03-04 Thread David kerber
On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. On Tue, Mar 4, 2014 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014

Re: Websockets timing out

2014-03-04 Thread Mark Thomas
On 04/03/2014 20:50, David kerber wrote: On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect and see if you stay connected. Seems to be working fine for me. I get an immediate close with the

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
Ugh. Looks like I need to use wss in my environment. I just found this. If an encrypted WebSocket Secure connection (wss://) is used, then in the case of transparent proxy servers, the browser is unaware of the proxy server, so no HTTPCONNECT is sent. However, since the wire traffic is encrypted,

Re: Websockets timing out

2014-03-04 Thread Bob Mancarella
I didn't implement programmatic. On Tue, Mar 4, 2014 at 3:52 PM, Mark Thomas ma...@apache.org wrote: On 04/03/2014 20:50, David kerber wrote: On 3/4/2014 3:46 PM, Bob Mancarella wrote: could you try this. http://dev.bizunite.com/inlook/echo.html click on annotation API then Connect

Re: Issue running Websockets JSR356 with Tomcat 7.0.50 Embedded

2014-02-25 Thread Jacopo Cappellato
); // this code gets the JarScanner and sets scanClassPath to false: // with this setting the websockets are not deployed Container[] containers = tomcat.getService().getContainer().findChildren(); StandardHost host = (StandardHost)containers[0]; containers

  1   2   3   >