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

Program delayed in ICE-Grid, Help!

Hi, I have writen a Program used ICE Grid . The Program contains an ICE grid with two grid nodes, they are two ICE Server. They running on Redhat Linux AS 4 OS. The ICE version is 3.1.1. But, when remote ICE Clients are firing requests to any of the two ICE Server, the time it takes to connect to server is either immediate or 20 seconds.:(

In the code,I get two places where will delay the program running.
The first is connect to icegrid.The codes as follows:

Ice.Properties pro = Ice.Util.createProperties();

ic = Ice.Util.initializeWithProperties(new String[0], pro);
Ice.ObjectAdapter adapter = ic.createObjectAdapter("clientAdapter");
ClientReceiverI object = new ClientReceiverI();
Ice.ObjectPrx base = adapter.add(object, Ice.Util.stringToIdentity("cObject"));

When running to "adapter.activate();", it will delay about 20 seconds.

The second is get ICE object.The codes as follows:
Ice.ObjectPrx base = ic.stringToProxy("IceGrid/Query");
IceGrid.QueryPrx query = IceGrid.QueryPrxHelper.checkedCast(base);
IDSPrxs = query.findAllObjectsByType("TeleControl");
}catch(Ice.LocalException e){
}catch(Exception e){

if(IDSPrxs != null && IDSPrxs.length > 0){
for(int i = 0 ; i < IDSPrxs.length; i++){

TeleControlPrx proxy = TeleControlPrxHelper.checkedCast(IDSPrxs);
String prxIP = proxy.getProxyIP();
TeleControlPrxMap.put(prxIP, proxy);
}catch(Exception e){

When running to "TeleControlPrx proxy = TeleControlPrxHelper.checkedCast(IDSPrxs);" ,will delay about from 20 second to 5 minutes.

I debug the code ,track the runing into "TeleControlPrxHelper.checkedCast",I see it will delay in the code like this:


The Class of the instance "__obj" is "ICE.ObjectPrx".

I can't resolve this questions, and I don't know the reason of the delay.

I have troubled with this problem for several weeks, Please Help me ,very thanks!!!


  • benoit
    benoit Rennes, France

    Could you upgrade to Ice 3.2.1 and see if the problem still occurs? (note that we only provide free support on the forums for the latest Ice version.)

  • Are you endpoints valid? Are you having to do DNS lookups? When I've run into this before it's because either the endpoints that I was connecting to weren't routable from where I was connecting from, or that my system was doing DNS lookups on internal addresses that weren't defined in the DNS and it was taking a long time to resolve.
  • Thanks


    To Benoit:
    Can you tell me, is there anybody else comes to this problem?

    To Ctennis:
    I use IP in all of my properties files, so I think it's not about the DNS.

    Shen Hongzhou.