Problem description
If you have configured a health check URL, the application checks whether the URL can be accessed properly when the application starts. The application publishing process continues after receiving a return code with an HTTP code of 200. If you receive an error response (not 200) within health check period, the URL health check is considered to have failed.
Cause
When you perform application deployment, startup, scale-out, and scale-out operations on EDAS, the URL health check fails. The possible causes of the failure are as follows:
- The application failed to start.
- The URL address is incorrectly configured.
- The application is configured with an interceptor and the URL address is blocked.
Solution
- Check the application logs to check whether the application is started properly. For more information about how to troubleshoot issues through logs, see Use log files to troubleshoot issues in EDAS.
- Check whether the URL is incorrectly configured. The configuration example is as follows:
Note: The URL address selected when setting URL health check needs to pay attention to the following points:
- Make sure that the HTTP status code 200 is returned. If an application runs properly, the HTTP status code 200 is returned. If an application does not run properly, an HTTP status code other than 200 is returned.
- Do not use the URL to perform operations that may affect business.
- Make sure that the response is timely generated.
- Do not use the URL to call internal API operations. For example, do not use the URL to request Object Storage Service (OSS) resources. Otherwise, a large number of access requests to OSS resources are generated.
- Make sure that the maximum amount of data is returned.
- If the default running container for a WAR package application is Tomcat, the application port is
8080by default, and the URL of the health check can be set tohttp://127.0.0.1:8080/order/healthCheck.html. - You can specify the container path as the root path and set the port to
8081when you use a WAR package to create an application. If the WAR package contains thehealthcheck.htmlfile that is used to identify the health status, you can set the health check URL tohttp://127.0.0.1:8081/healthcheck.html.
- Ensure that no blocker is configured for the application to block requests from the HTTP health check URL.
- After the preceding troubleshooting, deploy the application again.
Ideal For
-
Enterprise Distributed Application Service (EDAS)