Archived

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

About Ice::ConnectionRefusedException

Why my server throw Ice::ConnectionRefusedException when the server run one day or more. At the Server start ,the connection can do good.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    I'm afraid it's impossible to answer without more information about your application. The Ice::ConnectionRefusedException exception indicates that a client failed to establish a connection to a server because the server actively refused the connection. Where is this exception raised in your application? Is there any error messages?

    Please also specify the Ice version, OS and OS version you're using.

    Thanks,

    Benoit.
  • marc
    marc Florida
    I'm afraid you need to provide a lot more details in order for us to help you. As for the general meaning of a ConnectionRefusedException, please have a look at this FAQ:

    http://www.zeroc.com/faq/connectionRefusedException.html

    In general, a server cannot throw a ConnectionRefusedException, because it does not open any connections. I guess you mean a server that also acts as a client, and tries to establish a connection to some other server? If so, the only possible reason I can think of is that this other server is not available, or is not listening on the right host/port.
  • My server program also acts as a client,because I use your bi-directional mode.

    I have 2 server program , 1st pass the 2nd server proxy to client program and client make a connection.As the 2nd Server start , the Connection can run good and soon . When the server run one day or they make lots of connection the 2nd just throw the ConnectionRefusedException,but this time the 1st server program can run and be connected.

    Ice version 3 and vc2003 ,windows 2003

    The 2nd server 's configure file( segment )

    ....
    GalaxySvc.Endpoints=default -p 6678

    WorldCenter.Proxy=hub:tcp -h 202.99.233.118 -p 6677

    Ice.ACM.Client=0


    Ice.Warn.Connections=1

    Ice.ThreadPool.Client.Size=50
    Ice.ThreadPool.Server.Size=50

    ....

    I do not understand why the server (2nd) start ,the connecion cad make soon and good, and run long time ,the server maybe throw ConnectionRefusedException.
  • marc
    marc Florida
    I'm afraid from the description alone, it's impossible to diagnose what the problem is. We are not aware of any problem in Ice that could cause a sudden loss of connections, so I suspect it has to do with your network setup, or with your application running out of threads, or similar problems. If you would like us to analyze your application, we can do this as consulting services. Please contact us at info@zeroc.com if you are interested.
  • or with your application running out of threads

    hi, Marc,
    running out of threads can result in the Ice::ConnectionRefusedException ?
    or only delay the response to the clients? I feel a bit confused.
  • marc
    marc Florida
    You are right, a ConnectionRefusedException due to running out of threads is not possible. Even if all threads would deadlock, new connection would still be accepted into the TCP/IP backlog. And even if the backlog is full, connection establishment would only block, but there would be no ConnectionRefusedException.