edit-icon download-icon

HSF-0001

Last Updated: Mar 19, 2018

Error message:

HSFServiceAddressNotFoundException: Address of the target service to be called not found.

Description:

The target service to be called is xxxx, which is in the xxxx group.

Solution:

Check the basic problems

  1. The names are inconsistent: Check whether the values of interface, version, and group in the codes are completely consistent with those in the provider and consumer XML files. Note that the values are case sensitive, and that a leading or ending space is regarded as a character of the value.
  2. The firewall of the service provider is enabled or the network is unavailable: Use telnet to check whether the IP HSF port (12200 by default) of the service provider can be normally connected. If the port cannot be normally connected, the firewall is enabled or the network is faulty. Perform troubleshooting with responsible personnel.
  3. Check whether multiple NICs exist. If multiple NICs exist, use -Dhsf.server.ip to set the IP address of the provider.
    1. In the local development environment, use JVM to enable parameter settings.
    2. In the production environment, determine the solution together with the development personnel.
  4. Service calling is initiated too early. Calling is initiated before the ConfigServer pushes forward the address, resulting in an error. Add related settings of maxWaitTimeForCsAddress to configuration items for the service consumer. For details, see Consumer subscription service.

Check the development environment

When a lightweight configuration center is used locally for development, service publishing and subscription do not require authentication, and services can be successfully registered and subscribed to provided that the services start normally. After the foregoing basic problems are solved, perform troubleshooting according to the following steps.

Check the lightweight configuration center

  1. Log on to the Simple Application Server Console, and check whether the corresponding service is successfully published and whether the IP address and port of the service provider are correct. If the service fails to be published, perform troubleshooting according to the following steps in “Check the service provider”.
  2. Check whether the corresponding service is successfully subscribed to. If the service fails to be subscribed to, perform troubleshooting according to the following steps in “Check the service consumer”.
  3. Check whether the IP address and port of the service provider can be normally connected by using Telnet from the device of the subscriber.

Check the service provider

If it is discovered on the console of the lightweight configuration center that the service fails to be published, perform the following troubleshooting steps.

  1. Run ping jmenv.tbsite.net to check whether the IP address of the address server and the IP address of the lightweight configuration center are consistent.
  2. Clear all the logs in /{userhome}/logs/, and clear the /{userhome}/configclient/ directory.
  3. Start the service provider application. If Tomcat is already started, restart it.
  4. Check whether any exception exists in the Tomcat startup log, and check the startup time (ms). If any exception exists, clear the exception.
  5. View /{userhome}/configclient/logs/configclient.log or /{userhome}/logs/configclient/configclient.log (the directory varies according to different versions). Check whether the IP address of the registration center connected to Connecting to remoting://{IP address} is consistent with the IP address of the lightweight configuration center. If the IP addresses are inconsistent, check whether the IP address of the lightweight configuration center has been adjusted by using -Daddress.server.ip={accessible IP address}.
  6. [Register-ok] and [Publish-ok] are displayed for the corresponding service. Check whether the name, version, and group are the same as expected.
  7. If [Register-ok] and [Publish-ok] are displayed, the service provider is normally registered to the service registration center. In the development environment, a service can be successfully registered provided that the service can be successfully started.

Check the service consumer

  1. Run ping jmenv.tbsite.net to check whether the IP address of the address server and the IP address of the lightweight configuration center are consistent.
  2. Start the service consumer application. If Tomcat is already started, restart it.
  3. Check whether any exception exists in the Tomcat startup log, and check the startup time (ms). If any exception exists, clear the exception.
  4. View /{userhome}/configclient/logs/configclient.log or /{userhome}/logs/configclient/configclient.log (the directory varies according to different versions). Check whether the IP address of the registration center connected to Connecting to remoting://{IP address} is consistent with the IP address of the lightweight configuration center. If the IP addresses are inconsistent, check whether the IP address of the lightweight configuration center has been adjusted by using -Daddress.server.ip={accessible IP address}.
  5. View the service subscription status in the log, and view [Data-received] to check whether specific information about the service provider is received. If data about the service provider is not received, determine whether the service provider is successfully registered.
  6. Check whether the IP address and port of the service provider can be normally connected by using Telnet from the device of the subscriber. If the IP address or port of the service provider cannot be normally connected, the firewall is enabled or the network is faulty. Perform troubleshooting with responsible personnel.

Check the EDAS formal environment

EDAS manages and deploys applications in a formal environment. Strict service authentication and data isolation exist in the formal environment. Because authentication exists, services in the formal environment cannot be directly called across different primary accounts. Services in the formal environment also cannot be called and accessed from the development environment.

Check the service provider

  1. In cat /home/admin/{taobao-tomcat directory}/bin/setenv.sh,view -Daddress.server.domain={domain name of the address server} to obtain the domain name of the address server.
  2. Ping {domain name of the address server}, and check whether the returned IP address is normal. If the domain name of the address server cannot be pinged, the network is faulty. Check the network.
  3. Clear all logs in /home/admin/logs/, the /home/admin/configclient/ directory, and the /home/admin/{taobao-tomcat directory}/logs/ directory.
  4. Start the service provider application. If Tomcat is already started, restart it.
  5. Check whether /home/admin/{taobao-tomcat directory}/logs/catalina.out contains any exception information, and check the startup time (ms). If any exception exists, clear the exception.
  6. Check whether /home/admin/{taobao-tomcat directory}/logs/localhost-{date}.log contains any exception information. If any exception exists, clear the exception.
  7. View /home/admin/configclient/logs/configclient.log or /home/admin/logs/configclient/configclient.log (the directory varies according to different versions). [Register-ok] and [Publish-ok] are displayed for the corresponding service. Check whether the service name, version, and group are the same as the expected information. If [Publish or unregister error] is displayed, perform troubleshooting.

    Check the version of HSF, which is indicated in edas.hsf.xxxx in the catalina.out log file.

    1. If the version is earlier than edas.hsf.2114.1.0, a corresponding service group must be created. Otherwise, authentication may fail. Log on to the EDAS Console, choose Service Market > Service Groups on the left-side menu bar, and check whether the application service group is created.
    2. If the version is edas.hsf.2114.1.0 or later, multi-tenant isolation is already provided, and it is not required to create a service group. A corresponding service is registered twice. One is tenant-based registration (which is always successful), and the other is group-based registration (which may fail but does not affect service calling).
  8. If [Register-ok] and [Publish-ok] are displayed, the service provider is normally registered to the service registration center.

Check the service consumer

  1. In cat /home/admin/{taobao-tomcat directory}/bin/setenv.sh,view -Daddress.server.domain={domain name of the address server} to obtain the domain name of the address server.
  2. Ping {domain name of the address server}, and check whether the returned IP address is normal. If the domain name of the address server cannot be pinged, the network is faulty. Check the network.
  3. Clear all logs in /home/admin/logs/, the /home/admin/configclient/ directory, and the /home/admin/{taobao-tomcat directory}/logs/ directory.
  4. Start the service consumer application. If Tomcat is already started, restart it.
  5. Check whether /home/admin/{taobao-tomcat directory}/logs/catalina.out contains any exception information, and check the startup time (ms). If any exception exists, clear the exception.
  6. Check whether /home/admin/{taobao-tomcat directory}/logs/localhost-{date}.log contains any exception information. If any exception exists, clear the exception.
  7. View /home/admin/configclient/logs/configclient.log or /home/admin/logs/configclient/configclient.log (the directory varies according to different versions). View the corresponding service subscription status in the log, search for the corresponding service, and view [Data-received] to check whether specific information about the service provider is received. If data about the service provider is not received, determine whether the service provider is successfully registered.
  8. Check whether the IP address and port of the service provider can be normally connected by using Telnet from the device of the subscriber. If the IP address or port of the service provider cannot be normally connected, the firewall is enabled or the network is faulty. Perform troubleshooting with responsible personnel.
Thank you! We've received your feedback.