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
illustrate: There are two main types of nginx log...
<br />If only XHTML and CSS were object-orie...
Because the version I used when I was learning wa...
1. Download the installation package from the off...
Recently I need to change the version of MySQL da...
This article example shares the specific code of ...
1. Apache static resource cross-domain access Fin...
Nginx uses regular expressions to automatically m...
The specific code for implementing the retractabl...
Table of contents UNION Table initialization Exec...
The main configuration file of Nginx is nginx.con...
1. Software Download MySQL download and installat...
Today I saw a friend asking a question in the Q&a...
1. Review The Buffer Pool will be initialized aft...
/******************** * Virtual File System VFS *...