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
Many people use Linux Homebrew. Here are three ti...
The accessibility of web pages seems to be somethi...
Preface This article mainly introduces the releva...
Table of contents 1. v-on directive 1. Basic usag...
This article uses vue, and adds mouse click event...
Table of contents 1. Preparation Pull the redis i...
1. Background Use LDAP to centrally manage operat...
Preface: In daily study and work, we often encoun...
This article shares the specific code of JavaScri...
When it comes to bionic design, many people will t...
Table of contents 1. What is Dockerfile? 2. Analy...
Table of contents Question 1: How are props used ...
This article shares the specific code of js to im...
The problems and solutions encountered when insta...
Optimize the fastcgi configuration file fcgiext.i...