Announcement

Collapse
No announcement yet.

Instance Ports (network udp port) sometimes out of expected range

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [BUG] Instance Ports (network udp port) sometimes out of expected range

    Sometimes a hub spawns an instance with a -port parameter outside of the expected range. If I understood correctly ports should be <StartingInstancePort>+InstanceNo*InstancePortStep.
    However from time to time it happens that an instance is spawned with a higher port numer.

    Example
    Having these settings in game.ini...
    Code:
    [Script/UnrealTournament.UTLobbyGameMode]
    StartingInstancePort=8000
    InstancePortStep=1
    MaxInstances=10
    ...I would expect the used instance ports to be within 8000 to 8010.

    Unfortunately it does very rarely happen that an instance is spawned with a port of 8013 or 8031 or something else outside the expected range.

    Example UnrealTournament.log excerpt:
    Code:
    [2016.07.23-15.15.15:343][902]LogHAL: FLinuxPlatformProcess::CreateProc: '/usr/local/games/ut4/ut4-HUB/Engine/Binaries/Linux/UE4Server-Linux-Shipping UnrealTournament /Game/RestrictedAssets/Maps/WIP/DM-Eternal?Game=/Game/ALTS/Elimination_113.Elimination_113_C?MaxPlayers=8?GoalScore=10?Timelimit=30?MustBeReady=0?BalanceTeams=1?MaxReadyWait=30?MapVoteTime=120?mutator=/Game/UnrealPUGs/CompetitiveWeaponsMut-v3.CompetitiveWeaponsMut-v3_C,/Game/AbsoluteHitSounds/Mutator_AbsoluteHitSounds.Mutator_AbsoluteHitSounds_C,/Game/ALTS/Mutator_EliminationConfig.Mutator_EliminationConfig_C?BotFill=0?InstanceID=9?HostPort=14000 -server -port=8030  -log -log=Instance_1193F3AC0F071117000F0157673A3E54.log'
    This will cause problems for clients connecting to instances if you have very strict firewall rules on your servers. Had to loosen up the firewall rules for now...

    #2
    Unfortunately, The writer of this little snippet of gold was unaware that port increments are possible in 1's.

    You're actually looking at 8000-8100 there, however, the engine is actually dynamic in so far as you can set them all to the same port, and they will increment automatically on their own, even going outside of that boundary, being on random numbers (still within the range, most of the time).

    On very busy hubs like there used to be (very rare to see now) it wasn't uncommon to see nearly every instance being on odd numbers because the game wasn't (isn't?) cleaning up properly.

    TL;DR: Hub implementation is fundamentally flawed due to design.

    Comment


      #3
      Originally posted by raxxy View Post
      TL;DR: Hub implementation is fundamentally flawed due to design.
      Owled.....
      HABOUJI! Ouboudah! Batai d'va!
      BeyondUnreal - Liandri Archives [An extensive repository of Unreal lore.] - Join us on IRC [irc.utchat.com - #beyondunreal]

      Comment


        #4
        Originally posted by raxxy View Post
        Unfortunately, The writer of this little snippet of gold was unaware that port increments are possible in 1's.

        You're actually looking at 8000-8100 there, however, the engine is actually dynamic in so far as you can set them all to the same port, and they will increment automatically on their own, even going outside of that boundary, being on random numbers (still within the range, most of the time).

        On very busy hubs like there used to be (very rare to see now) it wasn't uncommon to see nearly every instance being on odd numbers because the game wasn't (isn't?) cleaning up properly.

        TL;DR: Hub implementation is fundamentally flawed due to design.
        I'm very well aware of the increments of 1. I just thought the idea was "first instance gets StartingInstancePort and every consecutive instance gets a +1 on the previous instance's port number".

        But IF the engine decided on selecting a random port out of the range 8000-8100 then what would be the point of having a StartingInstancePort setting in the first place? I agree that it is better to select the next free udp port if a previous instance failed to clean up properly so one might end up with a higher port number in some very rare cases. But I got port 8030 on multiple occasions even when no other instance was running - thus port 8000 should have been used. Programming should be a deterministic process and not chaos theory

        Imo still a bug - though not very high priority as a workaround (opening udp port range 8000 to 8100 in your server's firewall) exists...

        Comment

        Working...
        X