1. Run cmd with administrator privileges.
2. Find the occupied port, such as 8886
netstat -ano | findstr 8886
Query the pid of the program occupying this port. In this example, the last item 12596 is the PID of the program.
3. Close the process
taskkill -PID 12596 -F