1. IntroductionI have configured Tomcat on Alibaba Cloud before, and it was accessible after testing. Later, I uninstalled Tomcat for some reasons. I started to reinstall Tomcat and start testing last night, but found that it was still inaccessible. Then I wasted another night. The main reasons may be the following. I hope it can help you. 2. SolutionAlibaba Cloud has two layers of inspection measures. The first layer is the firewall, and the second layer is the security group. Here we first configure the firewall 2.1 Configure the firewall and open the portHere we first check whether the firewall status is turned on systemctl status firewalld `` If this error `Unit firewalld.service could not be found.` appears, it means that we do not have the firewall service, and we need to download the firewall first; ```java yum install firewalld firewall-config After the download is complete, we need to start the firewall first: service firewalld start After the startup is complete, we open Tomcat's port 8080 firewall-cmd --zone=public --permanent --add-port=8080/tcp After opening the port, we need to refresh the effect, which can be achieved by the following command: firewall-cmd --reload After refreshing, we can check the opened port number through the following command: firewall-cmd --list-all If you see the following interface, it means that the firewall has opened the following ports 2.2 Configure security groups in the Alibaba Cloud consoleIt should be noted here that it is best to configure both the inbound and outbound directions of port 8080, so that the security group has also been configured. 2.3 Check ports and resolve port conflictsAt this time, we start Tomcat. Here we enter the bin directory of Tomcat and start Tomcat through the following command ./startup.sh It is best not to use the Enter and view through org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8106]: This means that the port has conflicted and needs to be modified. Then we need to go to conf/server.xml to modify and find the corresponding port number. There are mainly several places where port numbers may conflict: Modify the port according to your actual situation. Start Tomcat every time you modify it. If there is no port error, it means that Tomcat can start normally. Just like that, my lovely Tom cat finally came out, thank God. This is the end of this article about Alibaba Cloud Server Tomcat being inaccessible. For more relevant Alibaba Cloud Server Tomcat content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to migrate local mysql to server database
>>: Problem record of using vue+echarts chart
This article is from Tom Ewer's Managewp blog,...
Test project: react-demo Clone your react-demo pr...
Table of contents Vue this.$store.state.xx.xx Get...
Table of contents 1. Shallow cloning 2. Deep clon...
<!doctype html> <html xmlns="http:/...
MTR stands for Mini-Transaction. As the name sugg...
MySql Index Index advantages 1. You can ensure th...
Generally speaking, in order to get more complete...
The isnull() function cannot be used as a substit...
1. Download and decompress MySQL 8.0.20 Download ...
1. Set up HOST on the host Macbook The previous d...
Flex layout is a commonly used layout method nowa...
How to install Linux CentOS 7.7 system in Vmware,...
Add the following code to the CSS style of the el...
Table of contents 1. Joint index description 2. C...