Port is occupied question

Today appeared Address already in use: JVM_Bind: 8080 question, I'm really speechless, went to see a bit process that is not occupied, ah, then go directly to modify the tomcat configuration files, modify the start or later Address already in use: JVM_Bind this error, I think definitely changed the port will be able to easily solve the problem, then, with the command to check and see what happens in the end is who I occupied port of the server.

 

 
 
  1. netstat -anob|findstr "8080" 

For more information on this command clearly listed, occupied port 8080 process, as shown below
 

see it? The first line of the 0.0.0.0, the first time to see, paused for a moment, what is the address, Google had the following explanation after

 

 
 
  1. 0.0.0.0 for the default route, that is, to reach the packet routing table inside the network no longer have to go to this rule 0.0.0.0 

He says something is popular then: 0.0.0.0 for the description of all windows unknown ip address pppoe including the address of the network card to obtain the ip dhcp and other non-native to specify ip.0.0.0.0 is all zeros network, on behalf of the default network, help router sends the packet routing table can not be queried. If you set all zeros route network, packet routing table will not query to the route network to all zeros.

No matter what address it, taking up my port where you are wrong, to make it let go of my 8080

 

 
 
  1. tasklist|findstr "4516" 

Who to see



Turned out to be the Oracle Listener, I was speechless, alas, to let go of it, directly to the process inside to find it turned off, you can also use the following command

 

 
 
  1. taskkill /im TNSLSNR.EXE 

If I run across has the same name with the following command

 

 
 
  1. taskkill /PID 4516 

Well, the world quiet, go start my cat triangle, ah ~ ~ ~, all OK.



But it is used on mac:

 1. Check with a port number of a program is occupied, the terminal input: lsof -i tcp: port into the port of the port is occupied (eg: 8080)


 2. After the program will get PID, can be used to kill the process kill pid


Guess you like

Origin blog.csdn.net/baibaichenchen/article/details/75050374