Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Client does not notice that socket is unavailable  RSS feed

 
Thomas Poffet
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On certain circumstances the client does not notice that the socket is unavailable. Unfortunately I cannot reproduce the situation. But it happened last time when a gateway was down.
The server tries to send the message, but cannot. It stops the communication service. The client does not notice and keeps listening on the port. Latter does not realize that there is no connection and therefore never tries to reconnect.
Does anybody know how to handle that situation?
Thanks
Thomas
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Thomas Poffet:
On certain circumstances the client does not notice that the socket is unavailable. Unfortunately I cannot reproduce the situation. But it happened last time when a gateway was down.
The server tries to send the message, but cannot. It stops the communication service. The client does not notice and keeps listening on the port. Latter does not realize that there is no connection and therefore never tries to reconnect.
Does anybody know how to handle that situation?
Thanks
Thomas


I probably need some more info on this, what client are you using with what protocol? What Gateway are you attaching to on what ports and which OS?

We have a similar situation with a financial gateway that we talk to (the OS drops the port but the gateway doesn't realise it and therefore our client never realises it either)

Cheers,
Martijn
 
Thomas Poffet
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Socket from the java.net package to communicate on TCP/IP port 2036. The client (which has a problem) runs on WindowsServer 2003 and the server on an IBM AIX system. Don't know about the gateways.
Cheers
Thomas
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I can only share that we had an identical problem in that we have a java client connecting to a gateway whose socket died but was _not_ cleaned up correctly by the server (it's a known OS issue that caused this). We had to provide heartbeat functionality within our client in order to detect and recover from this (basically handshake every x minutes).

Cheers,
Martijn
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!