Archived

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

Change IP address during runtime

Hello,

I have to change the ip address of the network-interface, while the ice-server-application is running.
Unfortunately when the address is changed and the client wants to get a proxy with the new ip address using the "stringToProxy"-Method, always the exception "Ice.ConnectionRefusedException" occur on client side. So it seems for me that the server doesn't accept connection under the new ip address.

How can I change the ip address on which the server-adapter should listen during runtime?

Thank you!

Wolfgang

Comments

  • benoit
    benoit Rennes, France
    Hi,


    It seems to me that there's 2 different issues with what you're trying to do.

    On the server side, an object adapter is listening on a fixed set of interfaces. If you change the IP address of an interface, I'm not sure the object adapter will still listen on the interface with the new IP address. Besides, proxies created with the object adapter will still embbed the old IP address (the object adapter doesn't know that an interface has a new IP address). The object adapter could be improved to be notified of network interface changes however. If you have a commercial interest in such a feature, please contact us at info@zeroc.com.

    The second issue is on the client side as you've pointed out. Yor clients shouldn't use proxies with endpoints (aka "direct proxies"). Instead, they should use "indirect proxies". Indirect proxies contain an identifier which is mapped to endpoints by the Ice location service. When the endpoints of a server are updated, the server sends the new endpoint information to the location service and the client queries the location service to get the endpoints of the adapter. See Section 30.16 and the IceGrid chapter in the Ice manual for more information on these proxies and the Ice location service.

    So right now, you should be able to do what you want if you restart the server when the IP address changes and if you use the Ice location service and indirect proxies to contact objects hosted by your server.

    Cheers,
    Benoit.