Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by sudoman281 · Sep 04, 2016 at 09:05 AM · c#pluginmasterservermaster server

Own MasterServer prblem

Hello, I setted up my own Unity Master Server, but I am still getting this problem:

  Internal error while connecting tomaster server. Too many connected peers.

After player created the server I get this error:

 The connection request to 81.201.63.53:50005 failed. Are you sure the server can be connected to?

BTW. I am sure that this is my ip :D. Here is my console log:

 Sent 1464 bytes to port 25001
 Sent 15 bytes to port 25001
 Sent 91 bytes to port 25001
 Sent 1464 bytes to port 61651
 Sent 15 bytes to port 25001
 Sent 15 bytes to port 61651
 Sent 91 bytes to port 61651
 Sent 44 bytes to port 25001
 Sent 24 bytes to port 25001
 04-09-2016 11:01:03     INFO    New connection established to 81.201.63.53:25001
 Sent 15 bytes to port 25001
 04-09-2016 11:01:03     INFO    Update row request from 81.201.63.53:25001
 Sent 32 bytes to port 25001
 04-09-2016 11:01:03     DEBUG   Version 2.0.0 connected
 04-09-2016 11:01:03     DEBUG   Table QZJBMU created.
 04-09-2016 11:01:03     INFO    Sent row ID 0 in QZJBMU to host at 81.201.63.53:25001
 04-09-2016 11:01:03     DEBUG   Updating, inserting 0 at column 1072693248
 04-09-2016 11:01:03     DEBUG   Updating, inserting test at column 5
 04-09-2016 11:01:03     DEBUG   Updating, inserting 0 at column 1072693248
 Sent 27 bytes to port 25001
 04-09-2016 11:01:03     DEBUG   Updating, inserting 0 at column 1077215232
 04-09-2016 11:01:03     DEBUG   Updating, inserting 0 at column 0
 04-09-2016 11:01:03     DEBUG   Updating, injecting 81.201.63.53 at column 9
 04-09-2016 11:01:03     DEBUG   Updating, injecting 25001 at column 10
 04-09-2016 11:01:03     DEBUG   Updating, inserting This is a test game at column 11
 04-09-2016 11:01:03     DEBUG   Updating, inserting 36028966409499968 at column 12
 04-09-2016 11:01:03     DEBUG   Internal port is 25001 IPs set as 192.168.1.136 
 Sent 15 bytes to port 25001
 Sent 15 bytes to port 61651
 Sent 64 bytes to port 61651
 Sent 24 bytes to port 61651
 04-09-2016 11:01:03     INFO    New connection established to 81.201.63.53:61651
 04-09-2016 11:01:03     INFO    Query request from 81.201.63.53:61651
 04-09-2016 11:01:03     DEBUG   Version 2.0.0 connected
 04-09-2016 11:01:03     INFO    Fetching existing table QZJBMU
 04-09-2016 11:01:03     DEBUG   Injecting 1 internal IPs: 04-09-2016 11:01:03
 DEBUG   Injecting -1178533435 internal IPs: 1 192.168.1.136
 Sent 15 bytes to port 61651
 Sent 436 bytes to port 61651
 Sent 15 bytes to port 25001
 Sent 32 bytes to port 25001
 Sent 15 bytes to port 25001
 Sent 32 bytes to port 25001
 Sent 15 bytes to port 61651
 Sent 32 bytes to port 61651
 Sent 15 bytes to port 61651
 Sent 15 bytes to port 25001
 04-09-2016 11:01:13     ERROR   No table name defined, during query/removal.
 04-09-2016 11:01:13     ERROR   Malformed packet from 81.201.63.53:25001, packet size 146 bits.
 04-09-2016 11:01:13     INFO    Failed to remove row for 81.201.63.53:25001 because table lookup failed
 04-09-2016 11:01:13     INFO    Connection with 81.201.63.53:61651 closed
 04-09-2016 11:01:13     INFO    Removing rows for IP 81.201.63.53:61651
 04-09-2016 11:01:13     INFO    81.201.63.53:61651 has diconnected
 Sent 15 bytes to port 25001
 04-09-2016 11:01:13     INFO    Connection with 81.201.63.53:25001 closed
 04-09-2016 11:01:13     INFO    Removing rows for IP 81.201.63.53:25001
 04-09-2016 11:01:13     DEBUG   Found row ID 1
 04-09-2016 11:01:13     INFO    Force removing row 1
 04-09-2016 11:01:13     DEBUG   Current address map count 0
 04-09-2016 11:01:13     INFO    Deleting unused table for QZJBMU
 04-09-2016 11:01:13     INFO    81.201.63.53:25001 has diconnected

My network manager code:

 using UnityEngine;
 using System;
 using System.Collections;
 using UnityEngine.UI;
 using Assets.Own.Util;
 
 public class NetworkManagerStart : MonoBehaviour {
 
     private System.Random random = new System.Random();
     private const string _chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     private bool refreshing;
     public InputField gameNameInput;
     private string gameNameInputted;
 
     // Use this for initialization
 
     void Start () {
         MasterServer.ipAddress = "81.201.63.53";
         MasterServer.port = 23466;
         Network.natFacilitatorIP = "81.201.63.53";
         Network.natFacilitatorPort = 50005;
     }
 
     // Update is called once per frame
     void Update()
     {
         if (MasterServer.PollHostList().Length != 0)
         {
             Debug.Log("!=0");
             Preferences.hostData = MasterServer.PollHostList();
             int i = 0;
             while (i < Preferences.hostData.Length)
             {
                 Debug.Log("Game name: " + Preferences.hostData[i].gameName);
                 i++;
                 Preferences.GameName = gameNameInputted;
                 Network.Connect(Preferences.hostData[0]);
             }
             MasterServer.ClearHostList();
         }
     }
 
     public void joinServer()
     {
         gameNameInputted = gameNameInput.text;
         MasterServer.ClearHostList();
         MasterServer.RequestHostList(gameNameInputted);
     }
 
     public void startServer()
     {
         Preferences.GameName = RandomString(6);
         Network.InitializeServer(20, 25001, !Network.HavePublicAddress());
         MasterServer.RegisterHost(Preferences.GameName, "test", "This is a test game");
     }
 
     private string RandomString(int size)
     {
         char[] buffer = new char[size];
 
         for (int i = 0; i < size; i++)
         {
             buffer[i] = _chars[random.Next(_chars.Length)];
         }
         return new string(buffer);
     }
 
     //Messages
 
     void OnServerInitialized()
     {
         Debug.Log("Server initialized successfully");
         MasterServer.ClearHostList();
         Application.LoadLevel("lobby");
     }
 
     void OnConnectedToServer()
     {
         Debug.Log("Connected");
         Application.LoadLevel("lobby");
     }
 }
 



Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

231 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it possible to access rig joints in C#? 0 Answers

OnAdRewarded not called after video completed 0 Answers

3 Questions about master server 0 Answers

Finding and editing private objects with plugins in c# 0 Answers

Which is the easiest way to access google play games services from our game ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges