Search Unity

Client Connections Timeout Immediately

Discussion in 'Multiplayer' started by bethomas, Jan 3, 2017.

  1. bethomas

    bethomas

    Joined:
    Jun 20, 2013
    Posts:
    2
    I'm having problems establishing client connections to a headless linux server (CentOS 7.3). I'm using NetworkManager out-of-the-box in a very simple test project. The clients reach the server then immediately time out: OnServerConnect and OnServerError are never called. The server logs the timeouts but nothing else:

    Code (csharp):
    1. Log: connection {1} has been disconnected by timeout; address {::ffff:xx.xxx.xx.xxx:61652}
    2. Log: connection {2} has been disconnected by timeout; address {::ffff:xx.xxx.xx.xxx:61652}
    The same code works fine when the server is started from a Windows build (including when the Windows server hosted outside the local network). My first instinct was firewall configuration, but even when disabling the server firewall I get the same issue.

    Any advice on solutions or potential debugging paths would be appreciated!
     
    Last edited: Jan 3, 2017
    alucard9000 likes this.
  2. bethomas

    bethomas

    Joined:
    Jun 20, 2013
    Posts:
    2
    I found a solution to this. The server I was running on has multiple IP addresses. Once I set "Server Bind to IP" the connections succeeded.
     
    alucard9000 likes this.
  3. MohammadAlizadeh

    MohammadAlizadeh

    Joined:
    Apr 16, 2015
    Posts:
    26
    did you guys fixed it? i have the same problem on linux ubuntu 14 @bethomas
     
  4. alucard9000

    alucard9000

    Joined:
    Aug 15, 2018
    Posts:
    1
    I can confirm this solves the issue. We were having the same problem with a server that has two IP address (external facing, internal facing). What made matters worse was that the client (before the fix) randomly connected consistently for hours and then would just randomly disconnect immediately on connect for another couple hours.

    Checking "Server Bind to IP" and hardcoding the IP address we wanted to use fixed the issue.
     
    MohammadAlizadeh likes this.
  5. GunLengend

    GunLengend

    Joined:
    Sep 24, 2014
    Posts:
    54
    Sorry for bump the topic, but I get same issue, what Server Bind To IP meaning, I think you just set the static IP ( that was I googled )