As the title suggests, I cannot find my Listen server across the LAN after steam integration.
I’m not sure if this is a bug, or something I am missing, but just seems to be out of my control right now, which to me, seems more like a bug. So apologies in advance if it is not a bug and it really is just user error
To go into a bit more detail, if I am inside of the editor, and I set number of players to 2. I can get one player to host the server, and the other player to join the server, absolutely no problems.
But if I compile the game, and run 2 instances of it on the same machine, one can create the server, but the other simply cannot find the server at all.
I have a feeling it is to do with integration of Steam into my project, since I never had problems with this before.
I followed this guide posted by Rama (I found the official documentation to be skimpy on details):
And the steam overlay shows up, no problem, that works fine, but cannot find any servers on LAN.
So I did some digging to find a solution and for the last few days, I have been searching for one, to no avail.
I decided to check my ports by typing netstat -ab -p UDP into the Command Prompt in Windows to see where the fault might be, and to see what ports I may need to open.
So this is what I did.
Opened a version of my project before the steam integration.
Ran 2 players in PIE, I can create a server, find and join that server no problems.
I checked the port being used by the server and it is 7777.
I packaged the project and ran 2 instances on the same machine, once again, no problem creating, finding and joining the server, even from other machines across the LAN. Port being used is still 7777.
Opened a version of my project that had steam integration based on Rama’s guide.
Ran 2 player in PIE, I can create a server, find and join that server no problems.
I checked the port being used by the server and it is 7777 still.
I packaged the project and ran 2 instances on the same machine, the server creation works, but I cannot find the server from the 2nd game instance.
Port being used? I have no idea, but 7777 is not being used. I assume it is 27015 since this is the GameServerQueryPort inside of DefaultEngine.ini after steam integration.
This has me incredibly confused, and I’m honestly not sure which direction to go, other than to completely remove Steam integration from the project until I really NEED to add it. This sort of interferes with me wanting to learn how it all works though, and I would really love to have steam integration as early as possible and learn how it works.
Below are some things I noticed were strange with the ports being used (I’m hoping the more information I give, the better the chances of being helped).
These are the relevant ports before creating a server with steam integration:
svchost.exe UDP 0.0.0.0:27036 Steam.exe UDP 0.0.0.0:51846
After creating the server:
svchost.exe UDP 0.0.0.0:14001 (NEW) SandBox.exe UDP 0.0.0.0: 27015 (NEW: I presume this is the port used instead of 7777?) SandBox.exe UDP 0.0.0.0:27036 (Note: this is the same as svchost.exe before starting server) Steam.exe UDP 0.0.0.0:41765 (NEW) SandBox.exe UDP 0.0.0.0:51846 (Note: this is the same as Steam.exe before starting server)
So I opened up the new ports on my router to see if that would work, but it didn’t work unfortunately.
I then went into my DefaultEngine.ini settings and changed the DefaultPlatformService to Null (since it is set to “Steam” right now).
But after doing this, I can’t create a server at all.
Here is what my DefaultEngine.ini looks like (At least the only parts I have changed for steam integration):
[/Script/HardwareTargeting.HardwareTargetingSettings] TargetedHardwareClass=Desktop AppliedTargetedHardwareClass=Desktop DefaultGraphicsPerformance=Maximum AppliedDefaultGraphicsPerformance=Maximum [/Script/Engine.GameEngine] !NetDriverDefinitions=ClearArray +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver") [OnlineSubsystem] DefaultPlatformService=Steam PollingIntervalInMs=20 [OnlineSubsystemSteam] bEnabled=true SteamDevAppId=480 GameServerQueryPort=27015 bRelaunchInSteam=false GameVersion=22.214.171.124 bVACEnabled=1 bAllowP2PPacketRelay=true P2PConnectionTimeout=90 [/Script/OnlineSubsystemSteam.SteamNetDriver] NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
I see the GameServerQueryPort is equal to 27015 so figured that opening 27015 should work, but it does not.
Here is a description of my blueprint set up, and some pictures.
I have a main menu blueprint, player can click on Host Server button which takes them to a server creation screen where they can click on a “Create Server” button which will create a new session:
On the client side, player clicks the “Join Game” button in Main Menu, and it looks for sessions, iterates through them, and attempts to join. Pretty basic, simple stuff really.
I have to wonder if because of the steam integration, I should have UseLAN unticked…
I honestly really don’t know.
I think I will probably just try and remove steam integration by end of day if I can’t get this working. Since I am having people over for a LAN and it’d be a great opportunity to give my game a whirl and see how it goes.
Any help on the matter will be greatly, greatly appreciated.
I am happy to help with providing more information. However I will only share my project with Epic Games staff if necessary.
Thank you in advance!
After a bit of reading I decided to try something else. Because when I tested on 2 seperate machines previously, I don’t think steam was open on the other machine at all.
- I started a server on Computer A.
- On Computer B I made sure steam was running and tried to find server, with success (HOORAY!).
- It also tells me that Computer B successfully joined the server (HOORAY)…but the player does not appear in game, the level does not load on Computer B, instead, Computer B just remains on the Main Menu.
One last thing to note while testing. I actually have a server browser, which lists the servers, the name, player count and ping. I noticed the ping was 9999 when the server was found…if this helps.