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
Port mapping is not the only way to connect Docke...
Table of contents WebAPI DOM DOM Tree DOM element...
File transfer between Windows and Linux (1) Use W...
The database installation tutorial of MySQL-8.0.2...
What is WSL Quoting a passage from Baidu Encyclop...
Table of contents Overview 1. Simple Example 1. U...
In daily work, we sometimes run slow queries to r...
Solution to MySQLSyntaxErrorException when connec...
The nginx configuration file is mainly divided in...
VMware tools provides great convenience for using...
Main differences: 1. Type SQL databases are prima...
I slept late yesterday and was awake the whole da...
The GROUP BY statement is used in conjunction wit...
Preface Recently, I accidentally discovered MySQL...
Table of contents MySQL multiple instances Multi-...