edit-icon download-icon

Configure custom service publishing IP address

Last Updated: Jan 17, 2018

Sometimes a service must be published on a virtual NIC or a non-physical IP address (for example, the EIP of an ECS instance) associated with the local host. If the virtual IP address is specified using -Dhsf.server.ip, an error occurs when the service is started and the service fails to be published, because the virtual IP address cannot be found in the NIC of the local host during publishing.

To solve this problem, EDAS provides the function of customizing the IP address for the service provider that allows the service provider to publish a service in the configuration center without specifying any IP address. After the service is successfully published, the service provider modifies the IP address and republishes the service. The service consumer does not need to make any changes.

The specific steps are as follows:

  1. After the service is successfully published, find it in Configuration List and click Update on the right of the service.

    You can also find the published service in Service List.

  2. On the Edit Configuration page, modify the IP address in the "Content" text box.

    NOTE: Do not modify the content next to the IP address unless otherwise required to avoid service calling errors.

    config-center

  3. Click OK to save the modification.

  4. Restart the service. The service with the new IP address is registered again to enable the modification to take effect.

After modification, the service consumer does not need to make any changes and can call the service in the normal way. You can view the log in the {user.home}\logs\configclient\config-client.log directory to check the real IP address called by the service consumer. Check the content next to the keyword [Data-received] in the log to view the complete information of the called service.

Thank you! We've received your feedback.