My host has given me a range of usable IP's for example ( - These did not come pre-bound to the OS, so I manually had to bind them. The only problem I am having is that when I try to bind on an additional IP with the port 25565 running on a completely different IP then try to run a server on 25565 with yet another IP, I get the cannot bind exception saying that there is a server already using that port.

I'm trying to get the port 25565 to bind to two completely different IP's which my host provided me with. These two IP's are run on Java virtual machines, and although they are running on two different IP's on the same port, I still get the Java bind exception saying the port is already in use.


Most likely answer is that the java program is NOT binding to an IP but to the same port number on ALL ip addresses.


Server A won't give an error message about a port already being in use if it's only in use on server B. It must already be in use on server A.

Probably you already have a copy of your service running on server A, and it's still listening on that port. To find out, run

sudo netstat -napW | grep :25565

Your Answer

