How to run 2 servers on one machine?

Discussion in 'Bukkit Help' started by SpaZMonKeY777, Jun 18, 2012.

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

    SpaZMonKeY777

    So I currently am renting a nice dedicated server, and my hosting company gives me up to 5 IP addresses to use with my server. So currently I run a PVE Survival server, but my community really wants a seperate Hunger Games server. My server runs on CentOS 5, so I made a different directory in my /root put in the newest Craftbukkit and a shell script, and launched. I got the "Failed to bind on port" error, which is what I expected to get. So I went into the server.properties, and changed the IP address line to one of my other IP's, and tried to relaunch, but it is still giving me the same error... Here's the exact error:

    Code:
    182 recipes
    27 achievements
    2012-06-18 00:33:57 [INFO] Starting minecraft server version 1.2.5
    2012-06-18 00:33:57 [INFO] Loading properties
    2012-06-18 00:33:57 [INFO] Starting Minecraft server on hg.awnw.net:25565
    2012-06-18 00:33:57 [WARNING] **** FAILED TO BIND TO PORT!
    2012-06-18 00:33:57 [WARNING] The exception was: java.net.BindException: Cannot assign requested address
    2012-06-18 00:33:57 [WARNING] Perhaps a server is already running on that port?
    
    Here's the IP addresses I am trying to use:
    My main server runs on: 70.34.205.42 (mc.awnw.net)
    What I want my other server to run on: 70.34.205.43 (hg.awnw.net)

    Any help would be appreciated. Thanks!

    Figured it out! For anyone wanting to know how to setup multiple IP Addresses on the same dedicated machine under Linux:

    http://www.xenocafe.com/tutorials/linux/redhat/bind_multiple_ip_addresses_to_single_nic/index.php

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

    Bertware

    Change the port in your server-properties.
    e.g. server 1 runs on port 25565 and server 2 runs on port 25566, so
    server-port=25565 for server 1
    server-port=25565 for server 2

    I use this to keep the server for my friends running while testing stuff on a test server.
    not: you'll need to forward the other port, too.
     
  3. Offline

    Rytis

    Use the IP instead the Domain!
     
  4. Offline

    jacklin213

    @SpaZMonKeY777 the reason y it says
    2012-06-18 00:33:57 [WARNING] **** FAILED TO BIND TO PORT!
    and it still wouldnt work after you changed the ip address is because you cant run 2 servers on a same port
    u need to port forward another port for minecraft and do the port as 25566
    then it should work out fine
     
  5. Offline

    SpaZMonKeY777

    Not sure why anyone else is answering this for me....

    I already figured it out on my own, and it has NOTHING to do with changing ports. My hosting company supplies me with multiple IP Addresses, in which I can setup on my server manually by editing system files and assigning aliases to each IP on my network files. I posted the link above in my second post.

    Please close this thread, thanks!
     
  6. Offline

    Bertware

    Just mark it as solved in the title
     
Thread Status:
Not open for further replies.

Share This Page