Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
I bet you may have seen this error at least once If you are a web developer :)
Different error from different tools
---------------------------
Internet Information Services (IIS) Manager
---------------------------
This Web site cannot be started. Another Web site may be using the same port.
Apache port:443 is being used by another application.
Port 10360 is already being used by another application
So how can we fix this error.There are two parts for this error.
You can use tcpview tool from sys internals. This shows all the connections active in the system with which process is using it .
You can also easily close the connection forcefully and make the port free just by right clicking on a particular connection.
In the above example, am going to close the connection opened by postgres on port 5432.This can be the port you are looking at where you got the error.
We combine the output of netstat with find command. We are filtering the netstat output with find .
C:\>netstat -ano |find ":80"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 4
TCP 176.6.219.84:51311 176.6.57.55:8080 ESTABLISHED 7584
TCP 176.6.219.84:51351 176.6.57.55:8080 ESTABLISHED 7584
TCP 176.6.219.84:51383 176.6.57.55:8080 ESTABLISHED 7584
TCP 176.6.219.84:51462 176.6.57.55:8080 ESTABLISHED 7584
TCP 176.6.219.84:58672 176.6.57.55:8080 ESTABLISHED 7584
TCP [::]:80 [::]:0 LISTENING 4
TCP [::]:8080 [::]:0 LISTENING 4
Interpreting the output,you can see the processid in the last column .In our case we have 4 and 7584.That is the process which is using the port.
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
TCP is the protocol we are listening on.
IP:Port combination 0.0.0.0:80 or [::] means all IP address in this machine we are LISTENING .More details here
So process id with 4 is listening on 80 and 8080 and you are seeing 4
0.0.0.0:80 , 0.0.0.0:8080 , [::]:80 ,[::]:8080
process with 4 is basically system process.
Now to find out the process ,we can run another command tasklist
C:\>tasklist |find "7584"
chrome.exe 7584 Console 1 144,272 K
process 4 represents System process.
C:\>tasklist|find " 4 "
System 4 Services 0 308 K
Now you know the process,you can go and verify it really needs to use this port or not
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in