Take the popular R for example
netstat -aon|findstr "1080"
Check whether the port is occupied
Some security update was installed due to updating the system
netsh interface ipv4 show excludedportrange protocol=tcp
Here is my computer.
Hint 1031-1130 is occupied, then the method is to use the port not mentioned in it, or delete the update.