[SOLVED] Help me open a port for my Minecraft server
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
It seems like everything should work fine, but the server spits this out at me:
Code:
$ java -jar craftbukkit.jar
174 recipes
27 achievements
23:01:44 [INFO] Starting minecraft server version 1.1
23:01:44 [INFO] Loading properties
23:01:44 [INFO] Starting Minecraft server on *:25565
23:01:50 [WARNING] **** FAILED TO BIND TO PORT!
23:01:50 [WARNING] The exception was: java.lang.NoSuchMethodError: method java.net.ServerSocket.setPerformancePreferences with signature (III)V was not found.
23:01:50 [WARNING] Perhaps a server is already running on that port?
It seems like everything should work fine, but the server spits this out at me:
Code:
$ java -jar craftbukkit.jar
174 recipes
27 achievements
23:01:44 [INFO] Starting minecraft server version 1.1
23:01:44 [INFO] Loading properties
23:01:44 [INFO] Starting Minecraft server on *:25565
23:01:50 [WARNING] **** FAILED TO BIND TO PORT!
23:01:50 [WARNING] The exception was: java.lang.NoSuchMethodError: method java.net.ServerSocket.setPerformancePreferences with signature (III)V was not found.
23:01:50 [WARNING] Perhaps a server is already running on that port?
Port 22 appears to be open.
Port 80 seems to be closed.
Port 8080 seems to be closed.
Port 25565 seems to be closed.
What gives?
I run a minecraft server myself on a ubuntu server (Based on debian) The error your getting "Failed to bind port" means that that port is in use for another application, if its a shared server edit your "server.properties" file with a different port...Otherwise you might have a zombie process roaming around keeping that port locked... restart the server and try again? XD
There are commands to find the program keeping that port open but off the top of my head i can't remember... and some one will post it below? \/
Last edited by hallucinative; 02-15-2012 at 11:56 PM.
Debian and Ubuntu are practically the same, so it's good to hear from another user. One problem is I cannot restart the server because I'm rsyncing two local drives, and every time I restart it transfers everything over again. (see this thread: http://www.linuxquestions.org/questi....php?p=4603827)
I tried changing the port to a random 25784, and I get the same issue. I've also tried forwarding the used port in my router. Here's the output of # netstat -anltp:
This isn't a router \ firewall issue right now... first we must remove the "FAILED TO BIND PORT" issue since even if the router and firewall are setup correctly it'll still fail
ok the port isn't in use, look in your 'server.properties' file, perhaps your binding to your external ip address... make sure you have nothing in "server-ip=" unless your using multiple network interface cards XD
Also your config for your iptables shows accepting of all connections...so you don't need to open that up any further XD
Last edited by hallucinative; 02-16-2012 at 05:02 AM.
This could be as well a problem with java itself.
Make shure to have a java > 1.6
or, if more than one java is installed, use your "update-alternatives" to choose the proper one.
I dont know the name of "update-alternatives" on a debian box.
Albeit that I use Debian on some servers, I refuse to bother myself with java crap.
SCNR
If you managed to get the server running, make sure your router does proper port forwarding.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.