I recently configured a server using Tencent Cloud. When using it, I found that the tomcat port was inaccessible, so I looked for some information on the Internet. There are two situations in total. I summarize them below. I hope it will be helpful to everyone and also leave a note for myself. First case:As the title says: https://console.cloud.tencent.com/cvm/securitygroup You need to go to this address to set up a security group. To be honest, I don't know whether I should say "mmp" or not. The instructions for use are too confusing. Of course, changing the security group and firewall still doesn't work. So I checked Tomcat's records and found:
This is obviously a problem with the environment variable configuration. The reason is that the previous installation diagram I used was simple and practical yum installation, and the environment variables were three lines of code copied from the Internet, and I didn't check carefully to see if they were correct. Okay, let’s take a dive once. Of course, this problem can also be seen by checking the running status of tomcat ps -ef|grep tomcat The picture above is problematic. This is normal, which is affected by the Java environment variable configuration. The actual installed JDK information does not match the environment variable configuration. So I modified the java version information in the environment variable, and finally it was done Modifying environment variables is described in my previous blog Tencent Cloud deploys one of the Java Web projects, application server Second case:Enter the command netstat -tunlp and you can see that port 8080 is not open at all. How can I access it? So how to enable it? Because Centos7 and above use firewalld instead of iptables, that is to say, firewalld should open port 8080. 1. Check the firewall status. firewall-cmd --state #Check the firewall status. The result is running or not running If not turned on systemctl start firewalld 2. In the running state, add the ports that need to be opened to the firewall firewall-cmd --permanent --zone=public --add-port=8080/tcp #Permanently add this port. Remove --permanent to indicate temporary. The corresponding shutdown command is firewall-cmd --zone=public --remove-port=8080/tcp --permanent 3. Load the configuration to make the changes effective. firewall-cmd --reload Use the command to check the open ports, and 8080/tcp appears, which is opened correctly. firewall-cmd --permanent --zone=public --list-ports Don't forget to restart the firewall. systemctl start firewalld.service Check again that port 8080 is open The most annoying thing is Tencent Cloud's server, after all these and the security group are set up. You have to wait for a while, and then access to Tomcat will be successful. Any access errors that occurred during this time were not related to the operation. The delay is severe. This is the end of this article about the solution to the problem that the tomcat port of Tencent Cloud Server is inaccessible. For more relevant content about the problem that the tomcat port of Tencent Cloud is inaccessible, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Web front-end performance optimization
>>: Vue.js style layout Flutter business development common skills
Official documentation: https://nginx.org/en/linu...
1. Set and change the root password Check whether...
Table of contents splice() Method join() Method r...
1. Demand The local test domain name is the same ...
Table of contents Class Component Functional Comp...
I was recently writing a lawyer recommendation we...
NProgress is the progress bar that appears at the...
Here are a few ways to remove it: Add the link dir...
Table of contents environment: 1. Docker enables ...
There is no mysql by default in the yum source of...
The database, like the operating system, is a sha...
Preparation 1. Environmental Description: Operati...
Table of contents 1. Pull the image 2. Create a R...
1. Download the mysql-5.7.17-winx64.zip installat...
This article example shares the specific code of ...