Master Server Table not found during query or row removal

Hello,

I have a problem, i finally was able to build the Master Server and Nat Facilitator in VC2008.
But now when i try to connect i get on my master server:

Now, this worked when i used the unity master servers

this is the code i am using:

  • IS replaced in my code with my servers IP
    using UnityEngine;
    using System.Collections;
    using UnityEngine.Rendering;
    using UnityEngine.Networking;
    public class ServerSetup : NetworkBehaviour{
        bool IsHeadless()
        {
            return SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null;
        }
        void Awake()
        {
            MasterServer.ipAddress = "*";
            MasterServer.port = 23466;
            Network.natFacilitatorIP = "*";
            Network.natFacilitatorPort = 50005;
            if (IsHeadless())
            {
                print("headless mode detected");
                Debug.Log("I am headless (server)");
                StartServer();
            }
            if (!IsHeadless())
            {
                GetServers();
                Debug.Log("I am a client!");
            }
        }
        void StartServer () {
            Network.InitializeServer(32, 7777, !Network.HavePublicAddress());
            MasterServer.RegisterHost("_TEST_SERVER_2K16_YAY_WOO", "MultiShot", "l33t game for all");
        }
  
        void GetServers()
        {
            MasterServer.RequestHostList("_TEST_SERVER_2K16_YAY_WOO");
            Debug.Log("Trying to get servers");
        }
  
        void OnServerInitialized()
        {
            Debug.Log("Server initialized and ready");
        }
  
        void OnGUI()
        {
            HostData[] data = MasterServer.PollHostList();
            foreach (var element in data)
            {
                GUILayout.BeginHorizontal();
                var name = element.gameName + " " + element.connectedPlayers + " / " + element.playerLimit;
                GUILayout.Label(name);
                GUILayout.Space(5);
                string hostInfo;
                hostInfo = "[";
                foreach (var host in element.ip)
                    hostInfo = hostInfo + host + ":" + element.port + " ";
                hostInfo = hostInfo + "]";
                GUILayout.Label(hostInfo);
                GUILayout.Space(5);
                GUILayout.Label(element.comment);
                GUILayout.Space(5);
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Connect"))
                {
                    Network.Connect(element);
                    MasterServer.ClearHostList();
                }
                GUILayout.EndHorizontal();
            }
        }
    }

Im using a headless client that uses this script too, as you can see on the top.
When i start the headless client i see connections being send to/from my Master Server, but when i start the game it gives me the above error IN the master server.

Thanks!

i kind of fixed it by doing it in 2 scenes, the only problem is, when i try the host and serverlist on my own pc, it works. But when i upload the server to the actual host it does not even register it, it just keeps saying sent bytes to 8888…
Scene 1:
HOST SCENE to be runned on the server

using UnityEngine;
using System.Collections;

public class ServerHost : MonoBehaviour {

    // Use this for initialization
    void Start () {
        MasterServer.ipAddress = "0.0.0.0";
        MasterServer.port = 23466;
        Network.natFacilitatorIP = "0.0.0.0";
        Network.natFacilitatorPort = 50005;
    }
  
    void OnGUI()
    {
        if(GUILayout.Button("Start Server"))
        {
            Network.InitializeServer(32, 8888, !Network.HavePublicAddress());
        }
        if(GUILayout.Button("Register Server"))
        {
            MasterServer.RegisterHost("TESTGINGEDEVIL", "Multischat", "Lol!");
        }
        if (GUILayout.Button("Disconnect"))
        {
            Network.Disconnect();
        }
    }
}

and then the server list scene:

using UnityEngine;
using System.Collections;

public class ServerList : MonoBehaviour {

    private Rect windowRect = new Rect(100, 0, 400, 400);
    void Start()
    {
        MasterServer.ipAddress = "0.0.0.0";
        MasterServer.port = 23466;
        Network.natFacilitatorIP = "0.0.0.0";
        Network.natFacilitatorPort = 50005;
    }
    void OnGUI()
    {

        windowRect = GUI.Window(0, windowRect, windowServers, "Servers");
    }

    void windowServers(int id)
    {

        if (GUILayout.Button("Refresh"))
        {
            MasterServer.RequestHostList("TESTGINGEDEVIL");
        }
        GUILayout.BeginHorizontal();

        GUILayout.Box("Server Name");

        GUILayout.EndHorizontal();

        if (MasterServer.PollHostList().Length != 0)
        {
            HostData[] data = MasterServer.PollHostList();
            foreach (HostData c in data)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Box(c.gameName);
                if (GUILayout.Button("Connect"))
                {
                    Network.Connect(c);
                    Debug.Log(c.gameName + c.ip);
                }
                GUILayout.EndHorizontal();
            }
        }

    }

}

*0.0.0.0 is changed in my script :slight_smile: