-1

My host has given me a range of usable IP's for example (10.1.2.100 - 10.1.2.105). 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.

  • Your question is difficult to understand/it makes no sense. http://meta.serverfault.com/questions/3608/how-can-i-ask-better-questions-on-server-fault – user9517 Dec 29 '13 at 09:33

2 Answers2

1

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

TomTom
  • 51,649
  • 7
  • 54
  • 136
0

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
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47