Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

NetworkTransport, LLAPI: Server disconnects client during Connect()

Discussion in 'Multiplayer' started by IgorAherne, Jun 18, 2020.

  1. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    Completely stuck for almost a month! :(

    I deployed my game on GooglePlay, but people from Appstore Review Team can't connect to my server.
    Any other device (Android, Windows, Linux) connect fine, from various places in the world. Even my developer iphone works.

    I am using LLAPI with `NetworkTransport`. I have 1 server to which all Clients ask to connect (Clients always talk to the server, never among each other).

    As we see from the lines below, my server does see the connection, but looks like the client (Apple Review Team) doesn't get the acknowledgement and keeps retrying to connect every 2 seconds:

    Code (CSharp):
    1. Log: connection {4} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20112559}, last rec time {20104501} rtt {0} timeout {8000}
    2. id 4  disconnection  06/18/2020 13:00:07
    3. Log: connection {5} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20114530}, last rec time {20106471} rtt {0} timeout {8000}
    4. id 5  disconnection  06/18/2020 13:00:09
    5. Log: connection {6} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20116537}, last rec time {20108487} rtt {0} timeout {8000}
    6. id 6  disconnection  06/18/2020 13:00:11
    7. Log: connection {7} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20118520}, last rec time {20110482} rtt {0} timeout {8000}
    8. id 7  disconnection  06/18/2020 13:00:13
    9. Log: connection {8} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20120569}, last rec time {20112494} rtt {0} timeout {8000}
    10. id 8  disconnection  06/18/2020 13:00:15
    11. Log: connection {4} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20122539}, last rec time {20114492} rtt {0} timeout {8000}
    12. id 4  disconnection  06/18/2020 13:00:17
    13. Log: connection {5} has been disconnected by timeout; address {::ffff:17.235.69.75:50142} time {20124596}, last rec time {20116495} rtt {0} timeout {8000}
    14. id 5  disconnection  06/18/2020 13:00:19

    My ConnectionConfig looks as follows:

    Code (CSharp):
    1.       var cc = new ConnectionConfig();
    2.         // These are the initialization settings that worked for us:
    3.         // http://answers.unity.com/answers/1699041/view.html
    4.         cc.NetworkDropThreshold = 95; //95% packets that need to be dropped before connection is dropped
    5.         cc.OverflowDropThreshold = 30; //30% packets that need to be dropped before sendupdate timeout is increased
    6.         cc.InitialBandwidth = 0;
    7.         cc.MinUpdateTimeout = 10;
    8.         cc.ConnectTimeout = 2000; // timeout before re-connect attempt will be made
    9.  
    10.         cc.DisconnectTimeout = 8000; // with a ping of 500 a disconnectimeout of 2000 is supposed to work well
    11.         cc.PingTimeout = 160;//LARGER VALUES caused timout issues, where Moscow Linux server was disconencting UK clients.
    12.  
    13.         cc.PacketSize = 1500;
    14.         cc.SendDelay = 5;
    15.         cc.FragmentSize = 1300;
    16.         //cc.AcksType = ConnectionAcksType.Acks128;
    17.         cc.MaxSentMessageQueueSize = 256;
    18.         cc.AckDelay = 5;
    19.  
    20.         r_channel = cc.AddChannel(QosType.Reliable);
    21.         rsq_channel = cc.AddChannel(QosType.ReliableSequenced);
    22.         rsqf_channel = cc.AddChannel(QosType.ReliableFragmentedSequenced);
    23.         usq_channel = cc.AddChannel(QosType.UnreliableSequenced);
    24.         ac_channel = cc.AddChannel(QosType.AllCostDelivery);
    People, what the hell could be causing this?
     
    Last edited: Jun 18, 2020
  2. HARPGAME

    HARPGAME

    Joined:
    Oct 4, 2019
    Posts:
    2
    Did you try this ?
     
  3. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    385
    Joe-Censored likes this.
  4. Chri5topheru5

    Chri5topheru5

    Joined:
    Dec 21, 2017
    Posts:
    5
    hi,
    do you know what format the time is printed in your logs?

    Code (CSharp):
    1. time {20120569}
    I occurred the problem, that I have no way to figure out the time/date of the same connection problems.
    Thanks.