arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
680 stars 144 forks source link

Port listen behavior changed in new patch? #1103

Closed zokradonh closed 4 years ago

zokradonh commented 4 years ago

Am I right that this behavior changed with the last patch yesterday?

https://github.com/FezVrasta/ark-server-tools/blob/c6cbc3824da4fc473dba25a9da3e7d4b73325036/tools/arkmanager#L1100-L1105

Specified Port 7778 on command line will result in using 7778 on my server right now. No bRawSockets option used.

Though the server opens 7779 also, but this port is blocked by my firewall and I can join the game nevertheless.

And from patch notes:

v311.78 - 06/11/2020 Disabled bRawSockets as they no longer function with the new game networking code

klightspeed commented 4 years ago

Specified Port 7778 on command line will result in using 7778 on my server right now. No bRawSockets option used.

Though the server opens 7779 also, but this port is blocked by my firewall and I can join the game nevertheless.

Previous versions of the game only opened Port + 1. It sounds like the new networking code now opens both Port and Port + 1

zokradonh commented 4 years ago

Previous versions of the game only opened Port + 1.

What sounds like a bug to me which is now fixed.

ghost commented 4 years ago

So for me. My server is set to use ports 7778 and 27015, in order to reach the server I need 7777-7779 open... This doesn't seem intended. (and 27015)

klightspeed commented 4 years ago

That'd screw with anyone who puts their game ports 2 ports apart.

klightspeed commented 4 years ago

Very odd - the server also (accidentally?) daemonised itself (double-forked and exited) when it first ran, which is going to break many if not all monitors (including arkmanager).

Testing here, when ark_Port=7777, which passes Port=7776 to the server:

tcp        0      0 0.0.0.0:32330           0.0.0.0:*               LISTEN      25012/ShooterGameSe
udp        0      0 0.0.0.0:27016           0.0.0.0:*                           25012/ShooterGameSe
udp        0      0 0.0.0.0:7776            0.0.0.0:*                           25012/ShooterGameSe
udp        0      0 0.0.0.0:7777            0.0.0.0:*                           25012/ShooterGameSe
zokradonh commented 4 years ago

So for me. My server is set to use ports 7778 and 27015, in order to reach the server I need 7777-7779 open... This doesn't seem intended. (and 27015)

That does not match my observations. Only two ports are open

Very odd - the server also (accidentally?) daemonised itself (double-forked and exited) when it first ran, which is going to break many if not all monitors (including arkmanager).

arkmanager works fine now on my site.

steam     5951     1  0 00:30 ?        00:00:22 /bin/bash /home/steam/bin/arkmanager start @crystalisles
steam     5957  5951  0 00:30 ?        00:00:00 /bin/bash /home/steam/bin/arkmanager start @crystalisles
steam     5969  5951 36 00:30 ?        03:43:56 /home/steam/ARK.crystalisles/ShooterGame/Binaries/Linux/ShooterGameServer CrystalIsles?RCONEnabled=True?RCONPort=52321?SessionName=ARKLAN II - Crystal Isles?Port=8883?QueryPort=27206?Se

I just reconfigured my "firewall"(docker-proxy) to open another port and all my 13 instances run and are monitored perfectly by arkmanager.

Testing here, when ark_Port=7777, which passes Port=7776 to the server:

tcp        0      0 0.0.0.0:32330           0.0.0.0:*               LISTEN      25012/ShooterGameSe
udp        0      0 0.0.0.0:27016           0.0.0.0:*                           25012/ShooterGameSe
udp        0      0 0.0.0.0:7776            0.0.0.0:*                           25012/ShooterGameSe
udp        0      0 0.0.0.0:7777            0.0.0.0:*                           25012/ShooterGameSe

Yes similar on my machine.

udp    UNCONN     0      0         *:8883                  *:*                   users:(("ShooterGameServ",pid=5969,fd=19))
udp    UNCONN     0      0         *:8884                  *:*                   users:(("ShooterGameServ",pid=5969,fd=23))
udp    UNCONN     0      0         *:27206                 *:*                   users:(("ShooterGameServ",pid=5969,fd=11))
tcp    LISTEN     0      16        *:52321                 *:*                   users:(("ShooterGameServ",pid=5969,fd=21))

Only Port 8883 and 27206 are forwarded to the ARK container for this instance. My instance ports are widely spread between 7000 and 9000.

zokradonh commented 4 years ago

Do you plan to change ark-server-tools behavior due to this change? Do you know what this second port is for? Maybe for Epic Games version of the game?

klightspeed commented 4 years ago

Probably would need a flag that when set will use Port=$ark_Port instead of Port=$(ark_Port - 1), with the initial config having that flag set, so existing configs won't unexpectedly change their behaviour.

klightspeed commented 4 years ago

f69ba154957436dc769d594bbdcbabdfcf24bb50 adds arkNoPortDecrement, which defaults to true for new installs, and false for existing installs.

zokradonh commented 4 years ago

Perfect, thank you!