Archived

This forum has been archived. Please start a new discussion on GitHub.

Connection Lost between Client and Server

Hi, all
I have a simple client/server application based on ICE.
The client and the server are not in the same network, and the connection between the two networks will be reset every 40 minutes by the network equipment(for some security reason). So, I get the errors as follows:
09/09/30 10:24:40 Ice.ConnectionLostException
error = 0
09/09/30 10:24:40 Caused by: java.io.IOException: Connection reset by peer
I wonder if there are some properties can be configed in the client to resolve this problem?
Thanks!

Shen

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Where does this exception occur?

    A proxy invocation raises this exception if the invocation can't safely be retried without breaking at-most-once semantics. Your application needs to catch this exception and decide what to do.

    If the invocation that raised the exception is an idempotent operation, you should specify it in the Slice with the idempotent keyword, this will allow the Ice runtime to automatically retry and your application will not see this error unless the retry fails (note your application should still catch exceptions, you shouldn't rely on the automatic retry to always work).

    For more information on Ice automatic retries, see this section in the Ice manual, idempotent operations are also documented here in the paragraph "Idempotent Operations".

    Cheers,
    Benoit.
  • Thanks very much!
    It seems that I have to handle the exception by changing my code.