Archived

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

WSAEADDRNOTAVAIL with cable unplugged

Hello,

I have one PC with two network adapters, each one with only one IP address. I want redundancy of network adapters.

The endpoint for the objet adapter is:
tcp -p 20000 -h 100.100.2.9:tcp -p 20000 -h 100.100.2.10:tcp -p 20000 -h 127.0.0.1
When I execute my server with this configuration and the two network adapter are in a connected state the adapter initialices correctly and the clients can connect without problems.

In this situation, with one client connected to one IP address of the server (i.e: 100.100.2.9) I can unplug the cable corresponding to the network adapter with this IP and the client is capable to switch to the other IP (100.100.2.10) and continue with its work. Great! :-)

But when I try to execute my server with one cable unplugged, the adapter can't initialice and raises an exception:

performance_ice_server_d: .\Network.cpp:404: Ice::SocketException:
socket exception: WSAEADDRNOTAVAIL

My question is, can Ice initialice the Object Adapter without one IP and, after, when the cable goes plugged and the network connection is up, the server can listen at the two interfaces.

Version: Ice 2.0.0 en WindowsXP SP2 (with TCP/IP Media Sense activated).

Best regards,
Mario

PD: Sorry about my english ;-)

Comments

  • You can use -h 0.0.0.0, which means that Ice will listen on any available network interface. However, the drawback of this is that collocated objects are not recognized, and therefore local calls to Ice objects are not optimized.