Used port not showing up in netstat -a result

2019-04-07 02:28发布

问题:

This issues started recently when I am trying to start active-mq (which by default starts on port 61616). But suddenly it stopped coming up with JVM_BIND issue on that port. The problem did not go away even after restarting the computer.

Main problem is that netstat -a command on Windows 7, does not show that 61616 is consumed. But when I wrote a simple Java program to bind a socket to that port, I wasn't certainly able to!

I eventually started active-mq by moving to a different port. But, can anybody please help me find why all the ports are not showing up in netstat -a result? Thanks.

回答1:

Don't use ephemeral ports: http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html

What is the largest TCP/IP network port number allowable for IPv4?