1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Server host has left the game - Dedicated server issue

Discussion in 'Groups & Dedicated Servers' started by Lord Byte, May 30, 2014.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Lord Byte

    Lord Byte Trainee Engineer

    Messages:
    50
    Started a dedicated server on my own pc which ran fine for the first 10 minutes or so (I joined and chased some NPC ships). Then I got "Server host has left the game" and the server didn't show up in the server browser. Service was still running according to the tool, so I restarted it, it shows up again but it after downloading it ends loading with "Server host has left the game"

    After waiting for several more minutes and trying again to reproduce.... It works again (without restart). Maybe it has something to do with the auto-save?
     
  2. Lord Byte

    Lord Byte Trainee Engineer

    Messages:
    50
    Doesn't seem to have happened again, I'll keep you posted.
     
  3. Drexic

    Drexic Trainee Engineer

    Messages:
    18
    If you are using a save from before this update, you will eventually notice an extra "Space Engineer" somewhere in the world this is the active character that is hosting the server. When he dies your server will disconnect.
    Why this happens I dont know. The way I got around it was by saving while sitting in my station. then loading the server up with the new save.
     
  4. Lord Byte

    Lord Byte Trainee Engineer

    Messages:
    50
    Yeah I started to suspect as much. Hasn't happened again, then again I haven't played long enough to get him to die again, I think. Does it keep happening or only once? (To be certain I placed him in a control station).
     
  5. TodesRitter

    TodesRitter Moderator

    Messages:
    2,127
    Did you Check your Firewall ?
     
  6. dsoden

    dsoden Trainee Engineer

    Messages:
    21
    I'm having this happen due to cutting out a particular block in a small ship which results in a free floating small thruster. This causes the "host has left the game" disconnect and the log file contains "Exception occured: System.NullReferenceException: Object reference not set to an instance of an object.".

    Although the server instance still says it's running, only a restart will make it show back up in the server list. I'd guess that the host leaving message simply means an error has occurred on the server and is probably caused by many different things.
     
  7. Lord Byte

    Lord Byte Trainee Engineer

    Messages:
    50
    @TodesRitter The firewall, if I had one enabled, would've have caused an issue from the first moment.

    Before the patch I've had it happen again and even waiting or restarting the server didn't fix it. After the patch we could play again for several hours without issue, but just now it happened again. I wasn't near my pc when it happened but could reconnect when I noticed it.
     
  8. Father Time

    Father Time Trainee Engineer

    Messages:
    2
    Good afternoon all,
    First time poster, long time follower... Keen software house, you are truly an awe inspiring development team that is setting a great example of how to handle public alpha game development. As a programmer I am impressed with your development schedule combined with your duel approach of offering new game mechanics and tackling critical game issues. With that said, I would like to offer the community some information that may be helpful as it was causing our dedicated server community a crippling issue.
    As anyone who is using an old world save file may know, as we've moved from player hosted servers to dedicated servers the world save file now contains a "Character" entity object that is a representation of the old host player. It happens that if this player object dies the entire server crashes... a major issue.
    In search for a solution to this issue I tried to delete the character from the save file using the Space Engineers toolbox, but sadly the tool will not allow that character object to be deleted! But, knowing that the game refers to it as a "character" entity I loaded up the save file ( SANDBOX_0_0_0_.sbs ) and did a search for character and sure enough I found the following code:
    Code:
     <!--
        <MyObjectBuilder_EntityBase xsi:type="MyObjectBuilder_Character">
          <EntityId>-8816863444227027531</EntityId>
          <PersistentFlags>CastShadows InScene</PersistentFlags>
          <PositionAndOrientation>
            <Position x="642.7304" y="1698.127" z="-97.91839" />
            <Forward x="-0.7523967" y="-0.6279611" z="-0.198907048" />
            <Up x="0.0178931057" y="-0.321336925" z="0.9467959" />
          </PositionAndOrientation>
          <CharacterModel>Soldier</CharacterModel>
          <Inventory>
            <Items>
              <MyObjectBuilder_InventoryItem>
                <AmountDecimal>1</AmountDecimal>
                <PhysicalContent xsi:type="MyObjectBuilder_PhysicalGunObject">
                  <SubtypeName>AngleGrinderItem</SubtypeName>
                </PhysicalContent>
                <ItemId>0</ItemId>
              </MyObjectBuilder_InventoryItem>
              <MyObjectBuilder_InventoryItem>
                <AmountDecimal>1</AmountDecimal>
                <PhysicalContent xsi:type="MyObjectBuilder_PhysicalGunObject">
                  <SubtypeName>HandDrillItem</SubtypeName>
                </PhysicalContent>
                <ItemId>1</ItemId>
              </MyObjectBuilder_InventoryItem>
              <MyObjectBuilder_InventoryItem>
                <AmountDecimal>1</AmountDecimal>
                <PhysicalContent xsi:type="MyObjectBuilder_PhysicalGunObject">
                  <SubtypeName>WelderItem</SubtypeName>
                  <GunEntity xsi:type="MyObjectBuilder_Welder">
                    <EntityId>0</EntityId>
                    <PersistentFlags>None</PersistentFlags>
                  </GunEntity>
                </PhysicalContent>
                <ItemId>2</ItemId>
              </MyObjectBuilder_InventoryItem>
            </Items>
            <nextItemId>3</nextItemId>
          </Inventory>
          <HandWeapon xsi:type="MyObjectBuilder_Welder">
            <EntityId>4539527639258039855</EntityId>
            <PersistentFlags>CastShadows InScene</PersistentFlags>
            <PositionAndOrientation>
              <Position x="642.350647" y="1697.4552" z="-96.62977" />
              <Forward x="-0.751962543" y="-0.605649352" z="-0.2602715" />
              <Up x="-0.0312476326" y="-0.3616334" z="0.9317965" />
            </PositionAndOrientation>
          </HandWeapon>
          <Battery>
            <CurrentCapacity>5.41893132E-06</CurrentCapacity>
          </Battery>
          <LightEnabled>false</LightEnabled>
          <UsingLadder xsi:nil="true" />
          <HeadAngle x="-0.0877499953" y="0" />
          <LinearVelocity x="0" y="0" z="0" />
          <AutoenableJetpackDelay>0</AutoenableJetpackDelay>
          <JetpackEnabled>false</JetpackEnabled>
          <Health xsi:nil="true" />
        </MyObjectBuilder_EntityBase>
    -->
    So I simply added the comment lines (the <!-- and --> and the beginning and end) and loaded the world back up; and sure enough in my instance the green astronaut was not inside my repair ship cockpit anymore and the server has not crashed since.
    I would like to point something out as a side note, until now we have had horrible issues with anything with a rotor vibrating horribly until it breaks itself or flings itself off into space; however, since I removed the green astronaut this hasn't happened. I'm not sure if the two are related, but I felt that I would make the information public just in case someone else experiences the same correlation.
    Thank you all for your time and attention to this post, have a wonderful evening.
    p.s. Keep up the amazing work Keen Software House!
     
    • Like Like x 1
  9. shockr

    shockr Trainee Engineer

    Messages:
    31
    Thanks for this feedback Father Time. This was exactly what I was looking for.

    I'll give it a go and see if it works on my server :)
     
  10. Ash87

    Ash87 Senior Engineer

    Messages:
    1,977
    I had this exact same issue, Fathertime's solution worked perfectly, fixed the problem and since we implemented that fix, we have had 3 uninterrupted hours of SE Server.
     
  11. Lord Byte

    Lord Byte Trainee Engineer

    Messages:
    50
    I've had more than a day without doing that fix, then the issue returned, usually when we grind something away (various things have been causing it). Then I tried the fix and the issue still remained. It's still linked with grinding something. Running the game as a local game with multiplayer solves all issues and it runs for days without crashing.
     
  12. Drexic

    Drexic Trainee Engineer

    Messages:
    18
    I can verify this, Father Times fix does take out the extraneous original "character" but the grinder issue happens to me whenever I make a new ship/station out of an existing one. I was grinding a Mining Hauler and it crashed, second time I split my station in half and it caused the same crash. Where are the logs I can poke at?


    *Edit*
    I should also note that the objects being grinded were still on. When I grinded things that were off this issue did not happen
     
  13. BigDaddy

    BigDaddy Trainee Engineer

    Messages:
    82
    I had this issue on our server. I made a map with 30 asteroids spanning over 200k meters with at one time over 40 players. It worked for a day and a half straight no problems with some SE toolbox cleaning to fix beacons and clear out starter ships.

    Then suddenly "Host has left the server" popped up for everyone. The dedicated server just says everyone left and no error message, no server on the server list.

    Tried bringing it back up 3 times and about 10 minutes in it would crash when someone would grind something.

    I could not figure out what the problem was and almost deleted the world and star over but I decided to do a thorough cleaning one more time with SE toolbox. One player suggested that the problem might be "ghosted" players glitching out in their cockpits. So I looked in SE Toolbox and I did see 3 spawnships that I could not delete because players were in the cockpits (which normally wouldnt happen). I think that the server usually clears out players from cockpits when the server closes. I deleted the players and deleted the spawn ships and the server ran great another whole night and running fine now.
     
  14. garisat

    garisat Trainee Engineer

    Messages:
    31
    is your world a Import from Singleplayer ?

    use the SETool and delete all Players/Astronauts
     
  15. Drexic

    Drexic Trainee Engineer

    Messages:
    18
    There was another post from a user (cant find name right now will edit later) regarding the deletion of users.

    Do not delete the original map creator/(player that saved) it messes up the save somehow using the SE tools. The method to take out the original user is via Father Times fix.
     
  16. uberlinuxguy

    uberlinuxguy Trainee Engineer

    Messages:
    2
    I also have seen the "grinder" issue on a world that was an imported save. I have a salvage basin of large ship grinders and if I grind too many things with it, boom! It crashes.

    I have a couple of logs that both show the same error:

    " Exception occured: System.NullReferenceException: Object reference not set to an instance of an object."

    and the same back trace of nifty obfuscated functions. I can post the whole trace if anyone is curious, but unless you are Keen, you might not know what it's doing. It's also a bit large so I didn't really want to blast it all into a post right away.
     
  17. Drexic

    Drexic Trainee Engineer

    Messages:
    18
    @uberlinuxguy

    That issue is currently in the Bugs forum and I think they stated the next patch should fix it.
     
  18. Wabbiit

    Wabbiit Trainee Engineer

    Messages:
    1
    Going to resurrect this thread as i still have issues.

    I have the issue with the server booting a player with the "server host has left the game". New world, Lone Survivor. Started to drill some ore with the handheld ones, on the same asteroid as the platform and maybe 5 mins later he gets booted, while me and another friend can just play on. We toyed a bit with the landing gears and no issues there. Maybe it has something to do with his client?


    Dedicated Server running as service... what info do you need to troubleshoot? What can you recommend? I know a patch went out, but as the problem still persists... :confused:

    EDIT: Best to add that I've spent an hour trying to find something about it, but as usual the search function hates me... >.<
     
  19. Zephyris13

    Zephyris13 Trainee Engineer

    Messages:
    39
    Hi there,

    Wish to add to this -

    Pre 01.035 - Server was up for a whole week with players on it everyday - No crash.
    Post 01.035 - Server was up for a day (till the hotfix) - No crash.
    Post 01.035 + Hotfix - Server couldn't keep up even 1 hour without crashing. Not even without players.
    Post 01.036 - Server was up for a day (till the hotfix) - No crash.
    Post 01.036 + Hotfix (current) - Server goes around 2 hours at most without crashing. Having players or not doesn't make a difference.

    Also noticed recently medbays are spawning players in random spots...something even halfway through blocks, killing them instantly on respawn.
     
  20. Grigori

    Grigori Trainee Engineer

    Messages:
    4
    A friend and I purchased the game a day ago and are encountering the same issue. We get the Error: Server's host has disconnected" error on dedicated, public servers we join, or if we host a server ourselves. It seems to happen around the time an auto-save would occur (I think), but can't confirm for sure.

    I tried hosting and having my friend join, same problem.
    I had my friend host and joined his server, same problem.

    I tried joining an empty, public, dedicated server, same problem.

    Any ideas? Excited to keep playing, so I hope a fix can be found for this.
     
  21. Napalm

    Napalm Trainee Engineer

    Messages:
    9
    The server we have been running (through Nitrado) has been also having this issue, after spending a while examining the logs after the most recent "Host has left the server" event I found that the recent occurrence is due to the Crash after picking up an object.

    Not sure if that helps but that is the most recent problem we have on our server and also others are having.
     
  22. dunka

    dunka Trainee Engineer

    Messages:
    39
    So last night I was playing on DWP and it was running great, no lag, no issues. Did some mining, deep in an asteroid so hopped out and made sure I didn't break any of the drills etc.

    While out there a piece of ore floated by, I hit t on it by reflex. Instant the host has left the game. Watching the server in the steam browser I could tell it crashed and restarted.

    I can confirm some correlation with crash on picking up objects.
     
  23. Grigori

    Grigori Trainee Engineer

    Messages:
    4
    Thanks for the info.
     
  24. sectoid

    sectoid Trainee Engineer

    Messages:
    60
    Seems like this is random; I had the same problem on load but a simle server restart fixed it. Weird.
     
  25. sectoid

    sectoid Trainee Engineer

    Messages:
    60
    Guess I was wrong, I ran into problem again and this time can't seem to get past it with a server restart.

    The uncommenting player entity-thingy did not fix it for me. Is it worth a try to create a new world, and paste all the stuff from the old world to new one? Its my experience that if map has been saved with SE tools, its going to get corrupted.
     
  26. Ded1

    Ded1 Trainee Engineer

    Messages:
    29
    So i have this happening to me, however i do not have that bunch of code in the save file. Any ideas?
     
  27. slippery pete

    slippery pete Trainee Engineer

    Messages:
    22
    Actually ran into this last night, hosting ingame (not dedicated).
    Everyone but me got booted with 'server host has left the game'.
     
Thread Status:
This last post in this thread was made more than 31 days old.