Archived

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

LAN/WAN problems

Hi

I have a server which use IceGrid, and this server have 2 Ipaddress. 192.168.88.14 for LAN, and 213.122.XX.XX for WAN.
When the client and the server are both in the local network (LAN), everything works fine. When the client and the server are not on the same LAN,there is a problem:

C:\Ice-3.1.1\Ice-3.1.1\src\ice\Network.cpp:675: Ice::ConnectFailedException:
connect failed: WSAETIMEDOUT.

I'm sorry for using the previous Version of ICE,but ICE 3.1.1 is the last version which support win2000.

Look at the picture in the Attach file.

First, client establishes an connection to the server 221.122.XX.XX. Then, client connects to the 192.168.88.14:59542.

I think the reason why the problem come is that the client can't connect the server 's LAN IP, and the client should not know the server's LAN IP.

However, in the second step, the server's LAN IP is completed in ICEGRID'S internal system. How can I solve this problem?

My client' code is below
PropertiesPtr properties = _communicator->getProperties();
		
		string strProxStr=_T("\"") + properties->getPropertyWithDefault(_T("IcePatch2.InstanceName"), _T("IcePatch2")) + _T("\" ");
		string strLocator=properties->getPropertyWithDefault(_T("Ice.Default.Locator"),_T("IceGrid/Locator:tcp -h 192.168.88.14 -p 4061"));
		theApp.m_Log.WriteSystemLog(EVENTLOG_INFORMATION_TYPE,CString(_T("stringToProxy:"))+strProxStr.c_str()+_T("\r\nIce.Default.Locator:")+strLocator.c_str());
		serverBase = _communicator->stringToProxy(strProxStr);
		
		TermEntryPrx server = TermEntryPrx::checkedCast(serverBase);
		
		Ice::Long lTimeNow=server->timeNow();

and here is my sysytemlog:
stringToProxy:"KTD.Server.TermEntry" 
Ice.Default.Locator:IceGrid/Locator:tcp -h 221.122.XX.XX -p 4061.

Comments

  • bernard
    bernard Jupiter, FL
    Hi,

    Windows 2000 is reaching the end of its "Extended Support" ... it's very surprising you would need to target this platform for any new development! In any case, you need to upgrade to the latest version of Ice (currently 3.4.1) if you wish to get further free support from ZeroC staff while you evaluate Ice.

    For your current issue, the solution depends on what you are trying to achieve:

    - if your clients should only communicate with the server through its global IP address, then make sure that's the only address (or name) published by the server in its proxies. The relevant settings here are Endpoints and possibly PublishedEndpoints for your server's object adapters

    - if you want the LAN clients to communicate with the server through its LAN IP and remote clients to also communicate with this server, then you should probably install a Glacier2 router between your remote clients and LAN.

    Cheers,
    Bernard