port free on windows 10

gudii9
gudii9 used Ask the Experts™
on
while executing spring boot soap example keep getting error like below

Description:

The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8081, or configure this application to listen on another port.


I tried 8080 as well in application.properties even that did not work


how to find what ports are free on my windows 10 laptop to use that ?

please advise
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
From a CMD prompt:
netstat -a

Pay specific attention to the ones with a state of "LISTENING".  Those are programs listening on those ports.  The others are programs currently ujsing those ports.
Commented:
Netminder is correct, but we can do a little more.  First we can add the o flag so that we can find the owning process id and then we can find the specific port entries by piping the results through the find command; e.g. -
netstat -ao | find ":8081"

Open in new window

-saige-

Author

Commented:
not specific port.

How to see all open ports out of 1000 ports there?
i do not want to search to see whether each one of them is open or not?
please advise

Commented:
There may be a utility that does this but, natively, most operating systems tell you which ports are in use.  Since there are a limited number of ports (65535), you can find the ports that are currently in use and use an unused one.

-saige-
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
>>How to see all open ports out of 1000 ports there?

An "open" port is one that is NOT currently being used.  There is no way to see if a program that isn't running might have a reserved port.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial