Solution to port occupation in win10

Source: Internet
Author: User

Solution to port occupation in win10

During socket communication debugging, if the program does not end normally, a port occupied error will be reported when the program is restarted.

1. Find the occupied port

Solution: Press win + R and Enter cmd to open the console, and enter

Netstat-ano | findstr8080

Check the process that occupies port 8080. The result is as follows:

 

The chart shows that 8080 is occupied by a program with a process id of 5036.

 

 

2. Killing related processes through the Task Manager Method 1: Killing processes using the Task Manager

Open Task Manager-> View-> Select column-> check the PID option and return to task manager to view the corresponding pid and end the process.
Of course, the above method is sometimes difficult to use, that is, when there are many processes in the task manager, it is very troublesome to find the corresponding process, so there is another way to kill the process

Start the task manager, click the PID in the detail column to sort it by PID, and right-click the corresponding process to end the task.

Method 2: Use commands to kill Processes

1> first, find the process name corresponding to the process number.

Tasklist | findstr process number

Example: tasklist | findstr 3112


2> then kill the process according to the process name
Taskkill/f/t/im process name
Example: taskkill/f/t/im/javaw.exe

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.