We usually install third party software like Skype, TeamViewer etc. in the windows OS, then they will default take some port numbers available. Then there are chances they will create some problem as explained below. [This is why we need to take care of installing software on the servers or production machines. We should install if and only if we really need them. :)] Below is the complete scenario.
- I have service 1 which is not running right now and I have assigned port number 80 for the service.
- I have installed the third party software and assigned port number 80 or by default it has taken port number 80 without knowing me.
- Now, there is a need to start service 1 in my system and use it.
- But, it never starts. Because the same port number is already allocated to something else process... So, in this situation we can't find the problem very easily.
Finding which process is using which port number:
- Open command prompt by going to Windows --> Run or [Start + R].
- Type cmd in there and hit enter.
- Now, you came up with command prompt window.
- Type the syntax exactly as shown. netstat -aon | findstr 0.0:80
Below is the sample output I got when I used the command.
The result order is, TCP protocol, port, listening status, process id. The last column is the process id.
Find out what is the process from process id:
Now, it is the time to find out what is the process which has the ID 4?
To know the process and their ids we have two options. Either go to the windows task manager --> services tab and you can see all the processes with their process ids or from command prompt.
Use the command tasklist | findstr 4. It will list all the processes which has 4 in it as shown below. See all and check everything and find out what you need.
Hope this post helps to solve the problems. Enjoy the nice series of posts.
It's a netstat -ano not aon.
ReplyDeleteThanks for the comment. That really not matters. They are just options. It's not command. We can give any order.
ReplyDelete-Praveen
Does it affect the registry? If so, in which way?
ReplyDeleteGreat Post
ReplyDeleteThank you very much praveen...
Thanks buddy
ReplyDeletethanks buddy
ReplyDeleteThanks, it was helpful
ReplyDelete