When your application is deployed to EDAS, the Tomcat port that you configured in the code may not take effect. This topic describes how to troubleshoot and fix the issue.
After you deploy your application to EDAS, you may encounter the following issues:
- The Tomcat port you configured in the application.properties file does not take effect for your Spring Boot application.
- After you change the Tomcat port in the console, the process that is listened to on the instance is not a Tomcat process.
These issues are not errors. The issues occur because EDAS enables canary release.
For all applications to which canary release is enabled in EDAS, requests for a service are first routed to Tengine. Then, Tengine forwards the requests to Tomcat.
To ensure that Tengine can identify the Tomcat port, EDAS sets the Tomcat port to 65000. This is a fixed value and is applicable when Tengine is being used. The following code shows the setting.
By default, the actual port number is still 65000 because
--server.port=65000 is added to the startup parameters. Therefore, when you check whether Tomcat is started, you need to check whether port 65000 listens to Tomcat.
In similar cases, when you change the application port, you change the Tengine port.
Port 65000 is still the Tomcat port although the Tengine port is changed to 8080.