Project

General

Profile

Tigase wss

Serhii Administrator
Added over 4 years ago

Hello. Try to configure wss.

So far without success. When sending a request to the address wss://mysite:5290/.

In the logs I see the following

2014-09-30 11:24:58.148 [ResultsListener-socketReadThread-3] SocketThread$ResultsListener.run() WARNING: Protocol execution exception.

java.util.concurrent.ExecutionException: java.nio.charset.MalformedInputException: Input length = 180

    at java.util.concurrent.FutureTask.report(FutureTask.java:122)

   at java.util.concurrent.FutureTask.get(FutureTask.java:188)

    at tigase.net.SocketThread$ResultsListener.run(SocketThread.java:586)

Caused by: java.nio.charset.MalformedInputException: Input length = 180

    at tigase.server.websocket.WebSocketXMPPIOService.decode(WebSocketXMPPIOService.java:511)

    at tigase.server.websocket.WebSocketXMPPIOService.readData(WebSocketXMPPIOService.java:162)

    at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:617)

    at tigase.net.IOService.call(IOService.java:262)

    at tigase.net.IOService.call(IOService.java:103)

In the configuration files (init.properties)

--comp-class-4 = tigase.server.websocket.WebSocketClientConnectionManager

--comp-name-4 = ws2s

ws2s/connections/ports[i]=5290,5291

ws2s/connections/5291/socket=ssl

ws2s/connections/5291/type=accept

I use Strophe.js to connect to Tigase backend.

Use release 5.2.0


Replies (5)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 4 years ago

You configured WebSocket to run on two ports 5290 and 5291, on 5290 you have plain version of WebSocket (@ws://@) while SSL based WebSocket is configured to run on port 5291 (@wss://@) as in your etc/init.properties you have:

ws2s/connections/5291/socket=ssl
ws2s/connections/5291/type=accept

which configures WebSocket on port 5291 to use encrypted and secured connection.

So in your case you should use following address: wss://mysite:5291/

Added by Serhii Administrator over 4 years ago

Yes, I understand that. But when I send a request to 5291. On the server logs can not see that the request was. And the client side also did not receive any response from the server.

Added by Serhii Administrator over 4 years ago

Can you help me? Tell me how I can analyze what I'm doing wrong?

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 4 years ago

I would suggest to enable debug on Tigase XMPP Server by adding following line to etc/init.properties file:

--debug=server

Maybe if you increase logging level you will be able to analyze issue.

But I also have additional questions:

  1. Which web browser you are using? Which version?

  2. Do you have proper SSL certificate installed in Tigase XMPP Server for domain @mysite@? (Some browsers fail to connect if SSL certificate in not know as valid to them)

Added by Serhii Administrator over 4 years ago

Thanks for the help. I've already figured out (found an error). Sorry that took your time.

    (1-5/5)