Scan Your Ports

There comes a time in a developer’s life that the he needs to scan his own ports. I recently had to do this because some process, other than my JBoss Application Server was hogging the port 1099. I kept getting a JVM_Bind error when I started the application server because the port was in use but I couldn’t figure out what process was using that port. Usually when I have a JVM_Bind error I just kill all Java processes, but in this case I didn’t have any Java programs running. In the end, after scanning my ports, I found out that Skype had port 1099 in use.

To scan your which ports are in use in you development machine you can use TCPView from Microsoft. TCPView is part of Microsoft’s Windows Sysinternals utilities.

If you are a prompt type of of person and you have MKS NT or Cygwin you can use the following command to find out what process is using port 1099.

netstat -ao | grep 1099

Technorati Tags: , , , , , , , , ,

2 Responses to “Scan Your Ports”

  • piyo Says:

    If you don’t want to install something extra, Windows XP has netstat.exe which is a default command line tool. No grep though, ha ha. The parameters above can be used in the same way.

    For reference, read the manual (at the Run dialog box: hh ntcmds.chm::/netstat.htm) and also the services/ports that Windows resolves to names: %SystemRoot%\System32\drivers\etc\services.

  • Matt Says:

    You could also use nmap. You could scan our own machine or others.

Leave a Reply