Results 1 to 2 of 2

Thread: Change IP address during runtime

  1. #1
    wgwolf is offline Registered User
    Name: Wolfgang
    Organization: Uni Erlangen - Germany
    Project: .
    Join Date
    Oct 2005
    Location
    Nuremberg, Germany
    Posts
    10

    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
    University of Erlangen-Nuremberg
    Institute for Manufacturing Automation and Production Systems
    Egerlandstr. 7-9
    D-91058 Erlangen
    Germany
    URL: www.faps.uni-erlangen.de

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-25-2011, 08:00 AM
  2. How to get client's IP address?
    By leojay in forum Help Center
    Replies: 1
    Last Post: 08-27-2009, 08:47 AM
  3. How to get client's ip address when I use Glacier?
    By ewiniar in forum Help Center
    Replies: 2
    Last Post: 06-16-2006, 05:55 AM
  4. about restrict IP address in Ice
    By richardma in forum Help Center
    Replies: 2
    Last Post: 01-24-2006, 02:25 AM
  5. How to get client's IP address
    By zephyr007 in forum Help Center
    Replies: 4
    Last Post: 12-28-2004, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •