Retrieving IP of Dedicated Server through Zeus

Options
bigd
bigd
edited January 2016 in Photon Bolt
I'm trying to connect to my dedicated server through a lobby GUI I made, but I'm having difficulties.
  • Server 1 contains an instance of the game server.
  • Server 2 contains the Zeus master server.
  • Client 1 contains an instance of the lobby.
The general scenario is Client 1 connects automatically to Server 2 (master server), retrieves a sessions list of game servers, and connects to the game server of their choosing.

The issue I'm having is the game servers register into Zeus properly (from what I can tell) and they show up in the lobby, but the IP that Zeus returns to the Client is 0.0.0.0, which disables my clients from connecting.

Some code...

Server 1 (game server) creates Bolt Server.
int serverPort = 27000;
BoltLauncher.StartServer(new UdpEndPoint(UdpIPv4Address.Any, (ushort)serverPort));
Client 1 populates server list within lobby.
foreach(var item in BoltNetwork.SessionList){
serversession = item.Value;
}
Client tries to connect to passed server session
public UdpSession serversession;
int serverPort = 27000;
    public void ConnectToServer()
    {
UdpEndPoint serverAddr = new UdpEndPoint(serversession, (ushort)27000);
BoltNetwork.Connect(serverAddr);
    }
Doing Debug print statements shows me the WAN and LAN IP that is returned from the UdpSession is 0.0.0.0. How do I make it return the IP address of the Game server?




Comments

  • bigd
    bigd
    edited January 2016
    Options
    I should mention, connecting to the server directly works fine by hardcoding the IP into the Connect() function.
  • stanchion
    Options
    Is your problem connecting or just getting the ip? Here's an example http://hastebin.com/kugiyavejo.avrasm
  • stanchion
    Options
    This is probably what you want

    Debug.Log(session.Value.WanEndPoint);
  • bigd
    Options
    I was able to play around with this over the weekend. It seems like my code works fine when I use the community Zeus Master Server, but when I host my own, it fails to pass along the IP to the client. So I've narrowed it down to it being a Zeus configuration problem.

    Zeus Master Server is on an AWS EC2 server. I've been looking through some of the old forum and chat logs, but nothing I do seems to work. Here's what I've tried:
    • Opened all the firewall and security group settings. (pinged server just to double check it's open)
    • Created an Elastic IP.
    • Here's my Zeus Configuration. (it seems to only startup properly if I put 0.0.0.0 into the fields or the private IP)
    
    <?xml version="1.0" encoding="utf-8" ?>
    <Zeus>
      <LanNetmask Netmask="255.255.240.0" />
      <Timeouts Host="180000" Client="60000" />
      <Master Ip="0.0.0.0">
    <NatProbe Ip2="0.0.0.0" Ip1="0.0.0.0" Ip0="0.0.0.0"/>
      </Master>
    </Zeus>
    I've tried putting my public IP into all or any of the IP spots and it fails to start up.
  • stanchion
    Options
    Its possible that Zeus will not work 100% on ec2 due to their network configuration. There are many private linux servers online for $5-10 a month that will work better.
  • bigd
    Options
    Thanks for the input stanchion! Hmmm, for some reason I had thought folks had been able to get this working.

    Reading through the zeus documentation, this line might be the key to my problems, but I'm not sure how one binds sockets on an EC2 server...

    You need to be able to bind a socket on the server to each of the 4 WAN IP addresses you are going to be using, this means the server can't be behind a NAT. Also, as far as we know, this rules out Microsoft Azure VMs, as you cannot bind to the public IP on the VM.
  • stanchion said:

    Its possible that Zeus will not work 100% on ec2 due to their network configuration. There are many private linux servers online for $5-10 a month that will work better.

    Hey man my friend and i are making a game using bolt but we dont know where to buy a server for bolt and should it be a vps or root server ?? please help as no one else can awnser us
  • stanchion
    Options

    stanchion said:

    Its possible that Zeus will not work 100% on ec2 due to their network configuration. There are many private linux servers online for $5-10 a month that will work better.

    Hey man my friend and i are making a game using bolt but we dont know where to buy a server for bolt and should it be a vps or root server ?? please help as no one else can awnser us
    VPS may not work if Zeus can't bind to an ip adress and port. Try www.linode.com or https://www.digitalocean.com
  • morten2808
    edited February 2016
    Options
    stanchion said:

    stanchion said:

    Its possible that Zeus will not work 100% on ec2 due to their network configuration. There are many private linux servers online for $5-10 a month that will work better.

    Hey man my friend and i are making a game using bolt but we dont know where to buy a server for bolt and should it be a vps or root server ?? please help as no one else can awnser us
    VPS may not work if Zeus can't bind to an ip adress and port. Try www.linode.com or https://www.digitalocean.com
    Thanks man :D but what do we do about the 4 WAN ips is that just normal ips like the one on my pc or is it an other adresse for ip ?? and if it is normal ips do we then just buy 4 ips ??

    And the sites you posted is that 100% sure we can use them?

    Edit : and when seleceting a server OS on https://www.digitalocean.com what do we need to select ? like ubuntu or the other ones ?
    more like saying what is best