Project

General

Profile

WebSocket / BOSH ping problem

Steffen Larsen
Added almost 3 years ago

Hi,

I have a strange problem, in the way I get pings to the different clients.

I have several client which have different transports - some are running BOSH, some WS (WebSockets) and some normal TCP.

My properties for ping is like so:

@c2s/watchdog_delay[L]=60000

c2s/watchdog_timeout[L]=60000

c2s/watchdog_ping_type[S]=xmpp@

So for TCP I receive the ping and can answer back with a pong - but for WS I do not receive such a IQ stanza. So it gets terminated after my watchdog timeout.

The same for BOSH, but I believe that BOSH does not need such a ping feature since its request/response model.

My WS is setup like so:

@--comp-class-1 = tigase.server.websocket.WebSocketClientConnectionManager

--comp-name-1 = ws2s

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

ws2s/connections/5291/socket=ssl

ws2s/connections/5291/type=accept@

I can se that I am present with all my clients.. so they should receive a ping like the TCP one.

Stream management is enabled (XEP-0198) and I am running Tigase server 7.0.2-b3821/563fcf81 (in single node mode - no cluster and directly on the server).

-Cheers!

/Steffen


Replies (7)

Added by Wojciech Kapcia TigaseTeam almost 3 years ago

If you prefix property with "c2s/" it applies only to regular socket connections. You can either configure watchdog separately for @ws2s/@. Also - watchdog is disabled for BOSH as it doesn't make sense to check those connections using watchdog - appropriate checking is inherent in BOSH itself.

Added by Steffen Larsen almost 3 years ago

Hi W,

Thanks for your fast reply! :-)

Yes I knew that it was a bit unnecessary for BOSH as I wrote, but should c2s also apply for WS streams? or does it not count as real socket connections?..

I'll add both to the property file.

Added by Wojciech Kapcia TigaseTeam almost 3 years ago

While ws2s is similar to c2s (and it extends it implementation wise) it's still a separate component with all what it entails - among which is separate configuration :-)

Added by Steffen Larsen almost 3 years ago

Okie dokie. I just tested it and it seems to work.. The fun part of it is that its sending whitespace ping to the WS client instead of XMPP pings (which I receive on the TCP client).

Added by Steffen Larsen almost 3 years ago

I've set it like this, and my TCP client gets XMPP ping, but my WS client gets whitespaces.. hmmmm

@c2s/watchdog_delay[L]=60000

c2s/watchdog_timeout[L]=60000

c2s/watchdog_ping_type[S]=xmpp

ws2s/watchdog_delay[L]=60000

ws2s/watchdog_timeout[L]=60000

ws22s/watchdog_ping_type[S]=xmpp@

Added by Wojciech Kapcia TigaseTeam almost 3 years ago

you have:

ws22s/watchdog_ping_type[S]=xmpp

there is no ws22s but ws2s ;-)

Added by Steffen Larsen almost 3 years ago

ha ha ha!!!! DOH :-)

    (1-7/7)