Solve the problem of not connecting to the Linux server

  A few weeks ago, I deployed a java project to the Tencent server (Linux system) and found that no matter how I access it, it was unsuccessful. What is particularly strange is that when I use xshell to connect to the server, I found that no matter how I connect, I can’t connect. , Is my Tencent server down? In desperation, I had to go to Tencent Cloud's official website to find out some information, and found that it was a pit I dug for myself, so I solved this problem effortlessly! Next, I will slowly explain to you the whole process from encountering problems to solving them.
  First of all, when I encounter a problem, the page returned when I visit the relevant url is like this, as shown in the following figure:

Insert picture description here
  From the interface, you can see the words This site can't be reached, which means that this website cannot be accessed, and when I use xshell to connect to the linux server, the connection fails even if the account and password are correct. As shown in the figure below:
Insert picture description here
  Then I went to the Tencent Cloud official website and learned about some situations. I logged on to my server via VNC on Tencent Cloud’s personal console (remember that in this case, you can only log in using VNC. On your own server), as shown below:

Insert picture description here
  After logging in to the server, I decisively use the firewall-cmd --query-panic command to decisively check whether I have enabled panic mode before. I don’t know if I don’t check it. I was shocked when I checked, but I didn’t expect the result to be returned was yes. (Open). So I executed the firewall-cmd --panic-off command decisively to turn off the panic mode, and both succeeded when I visited the URL again and used xshell to connect to the server. Below is a screenshot of the relevant operation:
Insert picture description here
  some students may not know the panic mode of firewalld, here I will post a URL, and interested students can open it by themselves.
Firewalld's panic mode

Guess you like

Origin blog.csdn.net/Melo_FengZhi/article/details/109957777