Archived

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

Create session exception when the host IP changed.

Hello,

I tried to run the example 'session'. The server and client located at different host, and the example ran normally.
So, I changed the server host IP without restarting the server process.
Then I changed the client config to current server IP and restart the client process.
Now, I found the client can get factory's proxy, but the client would be hung when to create session.

Who can explain this case?

Thanks in advance.

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    When you change the IP address of your machine it is necessary for the object adapters in your server to update the list of IPs that it publishes in proxies that it creates. To do this your application needs to call refreshPublishedEndpoints on the object adapters. Otherwise and proxies it generates will contain endpoints with the IPs that were available when the application was started.

    You were able to access the factory object because, I assume, your server is listening on all local interfaces because you either did not specify a host parameter in your adapter endpoint configuration or specifed 0.0.0.0. But as I said above, any proxy returned by the factory will not contain the new IP unless refreshPublishedEndpoints was called.

    This is documented in section 32.4 of the manual under Refreshing Endpoints.