Secure Websocket connection (wss:) aborted in tomcat/spring when https works


Peter T

In our app, if the Websocket is established as wss:, the connection is aborted, while ws: works fine.

Usually Websockets are no longer open after a few minutes. Sometimes up to 20 to 30 frames are transmitted, sometimes only once or not, and then off again. The http response code is 101 (most of the time it seems to be aborted before anything is sent to the client in most cases, the chrome network panel just shows "done" in these few cases).

The error message is different:

javax.net.ssl.SSLException: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request

(4000 times)

javax.net.ssl.SSLException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol

(1x)

javax.net.ssl.SSLException: error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure

(10 times)

javax.net.ssl.SSLException: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init

(3000 times)

The client receives an onClose (not onError).

List of Chrome debuggers

  • https://our.domain"secure" with a valid certificate, while
  • wss://our.domainis "unknown/cancelled"

I try to use

  • Chrome 62
  • Firefox 57

(And: the same behavior happens when the client runs locally on the server's machine, so it won't be a network issue.)

The backend is tomcat/spring, running on AWS EC2 Windows server.

I would appreciate any help :-) What is the difference between https and wss?

Peter T

We actually solved the problem by moving the server to an Ubuntu machine (which by the way required a huge reduction in tomcat's memory).....I'm really interested in what the problem is on the Windows machine though.

Related


How to use Secure WebSocket (WSS)?

Nate I'm using AutobahnJS and Thruway on my website and it works fine with a non-encrypted connection: var connection = new autobahn.Connection({ url: 'ws://www.example.com:9090',

How to use Secure WebSocket (WSS)?

Nate I'm using AutobahnJS and Thruway on my website and it works fine with a non-encrypted connection: var connection = new autobahn.Connection({ url: 'ws://www.example.com:9090',

How to use Secure WebSocket (WSS)?

Nate I'm using AutobahnJS and Thruway on my website and it works fine with a non-encrypted connection: var connection = new autobahn.Connection({ url: 'ws://www.example.com:9090',

Play Framework: Secure WebSocket (WSS)

Mattia Micomonaco I have read this article ( How to use TLS("wss://") with Play!Framework WebSockets ) and learned that Play framework 2.x does not support Secure WebSocket. Someone suggested to use nginx proxy. I'm thinking of configuring Play to serve HTTPS

How to use Secure WebSocket (WSS)?

Nate I'm using AutobahnJS and Thruway on my website and it works fine with a non-encrypted connection: var connection = new autobahn.Connection({ url: 'ws://www.example.com:9090',

Play Framework: Secure WebSocket (WSS)

Mattia Micomonaco I have read this article ( How to use TLS("wss://") with Play!Framework WebSockets ) and learned that Play framework 2.x does not support Secure WebSocket. Someone suggested to use nginx proxy. I'm thinking of configuring Play to serve HTTPS

WSS connection for https fails

winnyboy5 I'm enforcing virtual SSL for localhost running through xampp. Right now, I'm using a web socket that requires "wss:" instead of "ws:". But when using "wss", I get the following error: WebSocket connection to "wss://192.168.1.5/?aswin" failed: WebSoc

WSS connection for https fails

winnyboy5 I'm enforcing virtual SSL for localhost running through xampp. Right now, I'm using a web socket that requires "wss:" instead of "ws:". But when using "wss", I get the following error: WebSocket connection to "wss://192.168.1.5/?aswin" failed: WebSoc

How to use secure websocket (wss) in tornado

forest I'm new to Tornado and web services in general. In my application I have Qt/c++ client and python Tornado installed on the server side. The Qt client sends commands in the form of text messages (eg "ws://192.121.1.213:8080? function =myfunction? args =p

How to use secure websocket (wss) in tornado

forest I'm new to Tornado and web services in general. In my application I have Qt/c++ client and python Tornado installed on the server side. The Qt client sends commands as text messages (eg "ws://192.121.1.213:8080? function =myfunction? args =params.."). N

How to use secure websocket (wss) in tornado

forest I'm new to Tornado and web services in general. In my application I have Qt/c++ client and python Tornado installed on the server side. The Qt client sends commands as text messages (eg "ws://192.121.1.213:8080? function =myfunction? args =params.."). N

Jetty 9 WebSocket client issue when using secure connection

Alex I am writing a WebSocket client in a Java application using the Jetty 9.4.18 library. I'm new to WebSockets, so I started to test using the two example classes from the Jetty documentation, and then connect toecho.websocket.org When connecting without SSL

Jetty 9 WebSocket client issue when using secure connection

Alex I am writing a WebSocket client in a Java application using the Jetty 9.4.18 library. I'm new to WebSockets, so I started to test using the two example classes from the Jetty documentation, and then connect toecho.websocket.org When connecting without SSL

Jetty 9 WebSocket client issue when using secure connection

Alex I am writing a WebSocket client in a Java application using the Jetty 9.4.18 library. I'm new to WebSockets, so I started to test using the two example classes from the Jetty documentation, and then connect toecho.websocket.org When connecting without SSL

Jetty 9 WebSocket client issue when using secure connection

Alex I am writing a WebSocket client in a Java application using the Jetty 9.4.18 library. I'm new to WebSockets, so I started to test using the two example classes from the Jetty documentation, and then connect toecho.websocket.org When connecting without SSL

Jetty 9 WebSocket client issue when using secure connection

Alex I am writing a WebSocket client in a Java application using the Jetty 9.4.18 library. I'm new to WebSockets, so I started to test using the two example classes from the Jetty documentation, and then connect toecho.websocket.org When connecting without SSL

WSS/TLS WebSocket connection with Swift iOS

Ch4vi Solved (answer below) I'm using the Starscream library to create a secure websocket wss in a test server with a self-signed certificate and I'm finding that the connection cannot be established. var socket = WebSocket(url: NSURL(scheme: "wss", host: "sel

WSS/TLS WebSocket connection with Swift iOS

Ch4vi Solved (answer below) I'm using the Starscream library to create a secure websocket wss in a test server with a self-signed certificate, but found that the connection cannot be established. var socket = WebSocket(url: NSURL(scheme: "wss", host: "selfsign

WSS/TLS websocket connection with Swift iOS

Ch4vi SOLVED (following answer) I am using Starscream library to create a safe websocket wss in the test server we have a self-signed certificate and I find it impossible to make the connection. var socket = WebSocket(url: NSURL(scheme: "wss", host: "selfsigne

WSS/TLS WebSocket connection with Swift iOS

Ch4vi Solved (answer below) I'm using the Starscream library to create a secure websocket wss in a test server with a self-signed certificate and I'm finding that the connection cannot be established. var socket = WebSocket(url: NSURL(scheme: "wss", host: "sel

WSS/TLS websocket connection with Swift iOS

Ch4vi SOLVED (following answer) I am using Starscream library to create a safe websocket wss in the test server we have a self-signed certificate and I find it impossible to make the connection. var socket = WebSocket(url: NSURL(scheme: "wss", host: "selfsigne

WSS/TLS WebSocket connection with Swift iOS

Ch4vi Solved (answer below) I'm using the Starscream library to create a secure websocket wss in a test server with a self-signed certificate and I'm finding that the connection cannot be established. var socket = WebSocket(url: NSURL(scheme: "wss", host: "sel

WSS/TLS WebSocket connection with Swift iOS

Ch4vi Solved (answer below) I'm using the Starscream library to create a secure websocket wss in a test server with a self-signed certificate, but found that the connection cannot be established. var socket = WebSocket(url: NSURL(scheme: "wss", host: "selfsign

Minimal Java8 Nio Secure Websocket Client (wss)

value: I've spent a lot of time finding a simple java websocket client that works with wss and doesn't make a mess... I have tried https://github.com/TooTallNate/Java-WebSocket Added dependency when adding description, copied SSLClientExample.java and tested i