• 2

    posted a message on Does your server not work? - The list of possible solutions
    While hanging out in the Minecraft IRC channel it's hard not to notice how many people need help with hosting their own server, so I figured with the new forum and all, why not make a list of possible solutions to try. If you think it's a good idea, feel free to add things to the list and I'll edit them into the first post.

    1. Using a router? Then you probably need to forward the correct ports for the Minecraft server to work, see Port Forwarding section further down.

    2. Trying to connect to your own server but it won't work? Try using this url: http://www.minecraft.net/play.jsp?ip=127.0.0.1&port=25565. Note however that if you've altered the port settings in server.properties, you'll have to replace 25565 with the port in your server.properties file.

    3. Getting an Illegal name error, or are people getting kicked just as they enter the server? Try setting the verify-names option in server.properties to "false", or add the players you want on your server to players.txt

    4. Other people still having trouble connecting to your server? If you're running a firewall (Yes, this includes the Windows Firewall that is on by default) you'll have to configure it accordingly or disable it. How to do it all depends on the firewall though, so start by checking if disabling the firewall fixes your problem, if it does, start diving into the configuration and trying different things, don't forget to post your solution here.

    5. When trying to start the server, do you get an error saying something like "'java' is not a recognized command"? If so, the most probable reason is that the installation of Java didn't install the path variable. Solutions can be found further down, in the "Path Variable" section.

    6. Running Skype? Sometimes Skype can interfere with the Minecraft Server, if you've tried the other options already, try shutting off Skype.


    Port Forwarding
    Depending on what router you use, the interface might look different. However, http://www.portforward.com/ has guides for most kinds of routers. Find your router model in the list, and follow the instructions. If you haven't edited the port option in server.properties, the default port is 25565.


    Path Variable
    Quote from Wikipedia »
    PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.

    In short, if Java hasn't installed the path variable, you won't be able to call java by using the command "java", which is why you get the error "'java' is not a recognized command". There are two solutions to this, A) Supply the path to java yourself or :cool.gif: Add the path variable manually. Option B is a bit trickier (but not hard), and if you're not careful things could go very wrong, but it also ensures you won't have this problem with other Java apps, and option A is completely safe, but means it's a one app solution.

    A) Supplying the path to Java yourself

    First you'll have to find java.exe. The path to this varies, but usually it hangs out in something like C:\Program Files\Java\jre6\bin\java.exe. If you still can't find it, try doing a file search for "java.exe". If you still can't find java.exe, it most probably means your java installation is incomplete or faulty, I recommend a Java reinstall.

    Once you've found Java.exe, write down the path to the file, like such:
    C:\Program Files\Java\jre6\bin\java.exe

    Now open up your "start server.bat" (the file which you start the server with) with notepad (If you right click it, there's usually an option to Edit it), and find the second line, it should look something like this:
    Quote from name=start server.bat »
    java -Xms512M -Xmx512M -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer

    Replace the bolded out part ("java") with the path you wrote down to java.exe, so that the second line looks something like this:
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms512M -Xmx512M -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer

    Important: If the path to your java.exe contains spaces, you have to enclose it with quotation marks as I have done in the example above, or it won't recognize it as a complete path.

    Now the whole start server.bat should look like this:
    @echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms512M -Xmx512M -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer
    pause

    If everything looks right, save it and start it up.

    If your server still isn't starting, copy the contents of the console window and make a thread about it.


    :cool.gif: Adding the path variable manually

    I'd like to cover how to do this, but atm I'm too tired, and the guide would need a few images to be 100% accurate. I might edit this in later, option A will always work, so it's alright. If anyone feels like writing it, just make a reply with it and I'll edit it in.
    Posted in: Server Support and Administration
  • To post a comment, please .