Skip to main content

Problems using secure wss:// in Glassfish 4.0

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
iampuero
Offline
Joined: 2013-07-05

I have a client/server WebSocket connection set up using Glassfish 4.0. Using ws://, I'm able of sending and receiving messages and bytes with no issues whatsoever. However, I cannot for the life of me get the secure wss:// connection to work. Every time I always get a

javax.websocket.DeploymentException: Handshake response not received.
at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:300)
at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:158)
.

I've looked into the Server configurations, making sure that WebSockets are enabled for both http-listeners... I'm using port 8181... I'm able to connect securely using a browser using https (other than the self-signed certifiacte warning)...

So my question is what exactly are the required and necessary configurations for the Glassfish 4.0 server to enable a secure websocket connection. I'm obviously missing something, but have no idea what it is.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pavel_bucek
Offline
Joined: 2008-10-24

Hi,

sorry for late reply, I don't check this forum as often as I should. Can you please use users@tyrus.java.net for your next question? (Tyrus is WebSocket Reference Implementation used in glassfish).

To answer your question - we are aware of this issue and it is already fixed in Tyrus trunk. Also Secure Echo Sample was added to show how you can reach secured endpoint from java (using WebSocket client API).

related issues are:
https://java.net/jira/browse/TYRUS-146
https://java.net/jira/browse/TYRUS-154

trunk can be obtained from projects repository - see https://tyrus.java.net ; sample is located at https://java.net/projects/tyrus/sources/source-code-repository/show/trun...

Regards,
Pavel