[Dedicated Server] Can't bind port with GMod Server running

Dunno if I should call it bug but TU really wants to use port 27015 eventhough @Zak tells us to open ports 27015-27050. However the socket clearly wants to initialise 27015 as a QueryPort

CreateBoundSocket: ::bind couldn’t find an open port between 27015 and 27015

Is there a simple workaround for this or do I really have to give up my Gmod Server for Tower Unite? Of course TU works when I stop my Gmod Server

Ok I tried running TU first and I discovered that GMod automatically starts using port 27016 without any complains. You should set the bind range to 27015-27050 to achieve a similar behaviour.

It’s common server hosting knowledge that if you are using that port already, you can’t run another server on that same port.

In the future you can use -port for GMod to manually set the port to 27016. I don’t know if we have an equivalent for Tower Unite, but we should definitely down the road.

Yup. But the nice thing about the SRDCS is that it automatically detects that the port is used. And it changes it accordingly.
I haven’t found a method for that in any forum post. Also there is no option in the config files. There is still some “standard” and comfortable stuff missing in the server. But I’m patient and I know that you will do all the small details later on :yum:

That’s generally a bad practice for hosting. You should always explicitly define the port you want to use for the application, not have the software just pick an open one. Zak is gonna post details on how to do that for our dedicated server.

1 Like

@anon68632391

try this:
open Tower/Config/DefaultEngine.ini and locate the section [OnlineSubsystemSteam].
in that section of the config you should see the line GameServerQueryPort=27015.

Change that to your desired port.
This is the port steamworks uses for the server browser.

1 Like

@Zak @macdguy thank you guys, you really helped me out. I’m working on not sucking at hosting a server. :grin: keep it up!