All Products
Search
Document Center

Enterprise Distributed Application Service:What do I do if the "Can't assign requested address" error is reported when HSF applications are started?

Last Updated:May 25, 2023

Problem description

When Ali-Tomcat is used to start multiple High-speed Service Framework (HSF) applications on a machine deployed in Enterprise Distributed Application Service (EDAS) at the same time, the temporary directory may fail to be deleted or class loading errors may occur. The following error is reported when HSF applications are started:

java.net.BindException: Can't assign requested address

Causes

The current IP address and port fail to be obtained because the server port is inconsistent with the actual port of the application.

Solutions

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select the region. In the upper part of the Applications page, select the microservice namespace from the Microservice Namespace drop-down list and then click the name of the desired application.

  3. On the application details page, click the Basic Information tab. In the Application Settings section, click Edit next to Java Parameters.

  4. In the Application Settings dialog box, expand the Custom section. In the Custom Parameters field, add the following custom parameters. The values of the parameters vary based on your actual environment. Then, click Configure JVM Parameters.

    -Dhsf.server.port=12200 -Dhsf.server.ip=IP address of the NIC of the instance
    Image - Configure custom parameters
    • -Dhsf.server.ip: the IP address of the local network interface card (NIC) of the instance.

    • -Dhsf.server.port: the port number that you want to use. Before you specify the port number, run the netstat -tanp command to check whether the port is being listened on.