Solved Server not connecting to ip when run with "Run.bat"

Discussion in 'Bukkit Help' started by Dadab, Aug 6, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hey everyone! I've tried just about everything that I can think to do with this one.
    Here's my problem:
    I downloaded Craftbukkit 1.10.2 and attempted to set up a server. When I ran the initial provided .jar file, my buddy was able to connect to it. Then I decided to add a "Run.bat" script as follows:

    java -Xmx1024M -jar craftbukkit.jar -o true

    After running the .bat file, the server console appears with:
    C:\Users\Grant\Desktop\mc server>java -Xmx1024M -jar craftbukkit.jar -o true
    Loading libraries, please wait...
    [17:38:54 INFO]: Starting minecraft server version 1.10.2
    [17:38:54 INFO]: Loading properties
    [17:38:54 INFO]: Default game type: SURVIVAL
    [17:38:54 INFO]: Generating keypair
    [17:38:54 INFO]: Starting Minecraft server on *:25565
    [17:38:54 INFO]: Using default channel type
    [17:38:55 INFO]: This server is running CraftBukkit version git-Bukkit-0ebb9c7 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)
    [17:38:55 INFO]: Preparing level "world"
    [17:38:55 INFO]: Preparing start region for level 0 (Seed: 6487800366566399056)
    [17:38:56 INFO]: Preparing spawn area: 85%
    [17:38:56 INFO]: Preparing start region for level 1 (Seed: 6487800366566399056)
    [17:38:56 INFO]: Preparing start region for level 2 (Seed: 6487800366566399056)
    [17:38:57 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [17:38:57 INFO]: Done (1.867s)! For help, type "help" or "?"

    While the server is running with this command, I can connect via localhost, but neither my friend nor I can connect via external ip as we could before the .bat file was run.

    Any thoughts? Help would be very much appreciated!
    Thanks for taking the time!

  2. Offline


    The .bat file does not make the server run on your IP, it just starts the jar and provides a console. Please copy the contents of your file so we can tell you what's wrong
  3. @Dadab
    If you try the previous way again, and join with the external IP, does it still work?
  4. Offline


    Right, and it usually wouldn't affect whether or not people are able to connect via ip either I would think... Here is the current file:

    #Minecraft server properties
    #Sun Aug 07 15:00:26 PDT 2016
    motd=A Minecraft Server

    Thanks so much for taking the time to look into it!

    Yes, it does. If I just launch the .jar file without using the "Run.bat" file, it will launch the server normally and the server will allow connection via external IP. However, launching it this way does not provide me with a console, so aside from OP'ing my character in game, I have no control over the server.

    Thanks a ton for looking into this!
  5. Offline


    Your first error: server-ip should be set to your PC's IPv4 address (ex:, so the server is pointed to a host.

    Second: Your server-port is 25565. You are probably aware of that, but make sure that your server is port forwarded. You can do this through a regular router that your PC is always connected to. However, if it is a router, you would have to connect to that router for your server to work. A Firewall like Untangle is preferred, as it applies to your entire network.

    > Your server is in online mode. It doesn't need to be, but it provides proper authentication to prevent hackers like me ;], It's good to have. Don't doubt it for a second.

    Fourth: For god sake,
    is a good thing to have. Use it please!

    Fifth: ALWAYS use a .bat file to run your server jar. It makes it easier to manage. Don't click on the jar and run your server. You can't see stack traces outputted in your console if you're developing a plugin!
  6. Offline


    Thank you for the tips, they will go to good use! However, my problem lies in your fifth point:
    My problem is that when I run the server using the .bat file, no one (including myself, aside from localhost) is able to connect. However, when I run the server by launching just the .jar file, the server allows people to connect, but does not give me a console.

    I need a console, so I need to run the server with a .bat file, but I can't.

    I called my isp because I noticed that port 25565 was closed upon checking even with disabled firewall, dmz, port forwarding, you name it. They reset my modem and the server now runs with the .bat file. Thank you very much for all of your support!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Aug 7, 2016
  7. Offline


    A tip @Dadab ,Your servers' console is from 'Run.bat'. If you're like me, you'd want to rename your console. You can, but it's just like any batch file. It would go in the same directory as your jar:
    -o overrides the setting in the and makes the server go into online mode.
  8. No, you do not need to set the server ip in the file. If you don't specify an ip, it will automatically find it for you.
  9. Offline


    Thats the issue with your statement: If it finds one automatically for you, you don't know what it's set to until the server has started. My PC is dumb like that, and I have to set it.
  10. @HeartandSoul
    I'm sorry, but I'm entirely confused as to what you mean. Leaving that field blank has worked for me and everyone I know for 5 years..
  11. Offline


    My server does not want the server-ip line to be empty. Otherwise, it would set itself to
  12. Offline


    AlvinB, HeartandSoul, I thank you guys once again for your help with this issue! Marking this thread as solved! Cheers!
  13. @HeartandSoul
    Well, does mean "listening on all ips of this machine".. Have a read here.
Thread Status:
Not open for further replies.

Share This Page