localhost rejected our connection request solution
1. Background description
The front-end page uses vue. The vue project starts successfully without any error. The APP access address has appeared in the service console, as shown in the figure below:
click the access address. After the browser opens, the page is blank first, and then after a while it shows that it cannot access this Website, localhost rejected our connection request page, the information is as follows:
Two, the cause of the problem
There are several reasons for this problem: Please check one by one:
Reason 1. The project is not started successfully;
Reason 2. The port is occupied;
Reason 3. The Windows function is not enabled;
3. Solutions
For the above three reasons, there are three corresponding solutions:
Solution 1: Restart the front-end and back-end services
If the project does not start successfully, you need to check why the front-end project did not start successfully. The reason is complicated and I will not explain it in detail. You can try to restart the service project and restart it several times.
Solution 2: Close the occupied port program, or replace it with another port to restart the service
The easiest way is to restart the project with a new port number.
Or close the occupied port program, the operation is as follows:
[WIN + R] Open the command prompt, enter netstat -aon|findstr "8081" ,
(the port I checked here is 8081, pay attention to replace it with your own port number)
As shown in the figure, port 8081 is occupied, and the PID number of the program is 143132, then [Ctrl + Alt + Delete] to open the task manager, find the process with the PID number 143132, end the process, and then restart the service project.
Solution 3: Start Windows Features
Open "My Computer", select "Uninstall or change a program" in "Computer" in the upper left corner. Click "Turn Windows features on or off." (The location of the Windows 10 version is in the [WIN + I] shortcut key to open the Windows settings page, and find the <Applications – Programs and Features> path) as shown in the figure below: Click OK, and then the browser verifies that localhost is already accessible
!
This article is over!