Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity3D UNET connecting to dedicated server issue

Discussion in 'UNet' started by IMAN_SH, Aug 1, 2018.

  1. IMAN_SH

    IMAN_SH

    Joined:
    Mar 8, 2016
    Posts:
    16
    I maid a multiplayer online game with unity3d 2017 UNET.

    The servers are run on a windows dedicated server in
    batchmode
    .

    My big problem is after a some hours of running servers , no body can not connect to servers. And Connection Timeout error shows up !

    But at the moment the servers are set up, everything goes well and players can join the game and play.

    Does anyone know where the problem is?

    What I only have in the servers is :

    1- An empty scene.

    2- Two scripts : my custom
    networkmanager 
    script and another script for controlling game and send and receive
    syncvars 
    and commands and some
    coroutines 
    for controlling the game. i have no update function or some huge code !

    Why is this happening?
     
  2. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Have you checked the log file, and checked memory/cpu usage for the dedicated server? I'm running dedicated unity servers without any issues. Have had them running for months at a time. I don't use the HLAPI though. I use networkclient and networkserversimple classes.
     
    IMAN_SH likes this.
  3. IMAN_SH

    IMAN_SH

    Joined:
    Mar 8, 2016
    Posts:
    16
    I use UNET HLAPI and for early hours after i run EXE files as server it works fine but after 10 or 12 hours nobody can not connect to them and i a have to shout down and restart servers.

    After a while, log file size will increase , i open it and i see this errors :
    Code (CSharp):
    1. recv filed for host {0}, error {1232}. Host will be closed
    2. host id {0} invoked wrong io operation and will be deleted
    3.  
    4. host id {0} invoked wrong io operation and will be deleted
    5. (Filename:  Line: 548)
    6.  
    7. host id {0} out of bound or host has been already removed
    8. (Filename:  Line: 514)
    I add that I use vps for my servers an its not a physical dedicated .
     
    Last edited: Aug 2, 2018
  4. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I seem to recall there are serious issues with the HLAPI, which is why it's been dumped by Unity. There is a community built HLAPI replacement on github. Hope that helps.
     
    IMAN_SH likes this.
  5. IMAN_SH

    IMAN_SH

    Joined:
    Mar 8, 2016
    Posts:
    16
    Thanks
     
  6. IMAN_SH

    IMAN_SH

    Joined:
    Mar 8, 2016
    Posts:
    16
    I have another question .
    I'm actually working on a first person shooter (room based) multiplayer online game.
    And According to your statements, I decided to use LLAPI .
    for now that i use HLAPI, i didn't find a way to make a room based game and i made rooms with multiple EXE files running and players get servers port and IP from database and then connect to servers.
    In LLAPI is there a way to make multiple rooms with running only one EXE file ?

    I mean is there any facilities to make virtual rooms in one server and players join to rooms or something like that ?
     
  7. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Actually I use my own lobby server that spawns match servers as needed with the Process() class.The match server is given it's ip address, port, and matchid in the command line. I know I'll have to change this once I'm running on multiple hosts, but it does me for now whilst testing.
     
    IMAN_SH likes this.
  8. IMAN_SH

    IMAN_SH

    Joined:
    Mar 8, 2016
    Posts:
    16
    1 - So you are run EXE files as server with Process() ?

    2 - Is it matter we run servers on a VPS (virtual) server or a physical dedicated server ?
    Because I run my servers on a VPS ...
    If i run on a physical dedicated server will there be any changes in its quality?
     
  9. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Mine is a VM with a dedicated IP address from ToggleBox - seems to be doing the job right now
     
    IMAN_SH likes this.