Home Help Center

Connection Lost between Client and Server

shenhongzhoushenhongzhou Member Shen HongzhouOrganization: NanJing UniversityProject: Remote Controller Proxy
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • shenhongzhoushenhongzhou Member Shen HongzhouOrganization: NanJing UniversityProject: Remote Controller Proxy
    Thanks very much!
    It seems that I have to handle the exception by changing my code.
Sign In or Register to comment.