Unable to connect to LAN match over steam (but works over internet)

Our game is able to connect fine using OnlineSubsystemSteam when hosting over the Internet, but when it comes to a LAN match we are unable to join the listen server (either by typing "open #.#.#.# or by joining via session). The problem with LAN only happens with OnlineSubsystemSteam - LAN matches work OK with OnlineSubsystemNull.

The client can see the session (session name matches the hosts’ steam name), and it apparently joins the session successfully (the success pin on the join session node is fired):

[2016.09.11-21.40.36:292][435]LogBlueprintUserMessages: [PS_GameInstance_C_0] Join session success
[2016.09.11-21.40.36:293][435]LogBlueprintUserMessages: [PS_GameInstance_C_0] Session result - Server name = Spoondog, Ping = 9999, MaxPlayers = 8, CurrentPlayers = 1

and the server receives some bytes from the client when trying to connect:

[2016.09.11-22.49.37:599][492]LogOnline:Verbose: Received 16 bytes from #.#.#.#:14001
[2016.09.11-22.49.37:599][492]LogOnline:Verbose: Sending 86 bytes to #.#.#.#:14001
[2016.09.11-22.49.37:600][492]LogOnline:Verbose: Received 86 bytes from #.#.#.#:14001

However, even though joining is successful, it never connects / loads the map like it does with OnlineSubsystemNull - it just sits there until the connection times out:

2016.09.11-21.40.36:303][435]LogNet: Game client on port 7777, rate 10000
[2016.09.11-21.40.36:303][435]LogNetVersion: GetLocalNetworkVersion: CL: 0, ProjectName: gardenwars, ProjectVersion: 1.0.0.0, EngineNetworkVersion: 1, GameNetworkVersion: 0, NetworkChecksum: 4268932630
[2016.09.11-21.40.36:304][435]LogNet: UPendingNetGame::InitNetDriver: Sending hello. [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL
[2016.09.11-21.41.26:476][422]LogVoiceEncode:Warning: Dropping voice data due to network layer not processing fast enough
[2016.09.11-21.41.36:269][  5]LogNet:Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 60.00, Real: 59.97, Good: 59.97, DriverTime: 60.00, Threshold: 60.00, [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL
[2016.09.11-21.41.36:270][  5]LogNet:Warning: Network Failure: PendingNetDriver[ConnectionTimeout]: UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 60.00, Real: 59.97, Good: 59.97, DriverTime: 60.00, Threshold: 60.00, [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL
[2016.09.11-21.41.36:272][  5]LogNet: NetworkFailure: ConnectionTimeout, Error: 'UNetConnection::Tick: Connection TIMED OUT. Closing connection. Elapsed: 60.00, Real: 59.97, Good: 59.97, DriverTime: 60.00, Threshold: 60.00, [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL'
[2016.09.11-21.41.36:272][  5]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL, Channels: 2, Time: 2016.09.11-21.41.36
[2016.09.11-21.41.36:274][  5]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: #.#.#.#:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_1, IsServer: NO, PC: NULL, Owner: NULL
[2016.09.11-21.41.36:285][  5]LogNet: DestroyNamedNetDriver SteamNetDriver_1 [PendingNetDriver]
[2016.09.11-21.41.36:286][  5]LogExit: PendingNetDriver SteamNetDriver_1 shut down

I’ve attached the full server and client logs.

  • Testing using two machines logged into separate Steam accounts with firewalls disabled on both (and on the router)
  • Steam appears to be working OK - overlay is there (whether I’m using ID 480 or my own ID), and as I mentioned, works fine for a non-LAN game.
  • Map is launched on the server with the ?listen param
  • Ping for the LAN host (when using Steam) is 9999 (seems to be a common problem, not sure if it matters because its also 9999 on a non-LAN game where it connects OK - ping is correct using OnlineSubsystemNull)
  • GameName matches the game name on Steam
  • Have tried running both standalone/dev and with a packaged build
  • OnlineSubsystemSteam plugin is enabled and engine/project are compiled successfully with the appropriate build.cs changes
  • The session setup is the same as the MultiplayerShootout project (though it seems like sessions aren’t the problem since we can’t join even with “open #.#.#.#”).

The same happens if the project is blueprint-only, or a code project with the appropriate build.cs changes.

I’ve followed the official Epic docs for setup, and tried following various other tutorials and answerhub solutions but so far no luck.

DefaultEngine.ini:

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam
; DefaultPlatformService=Null

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

Build.cs:

public GardenWars(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

		PrivateDependencyModuleNames.Add("OnlineSubsystem");
    }

(Note that “DynamicallyLoadedModuleNames.Add(“OnlineSubsystemSteam”);” was originally in here but it appears that is no longer required with the OnlineSubsytemSteam being moved to a plugin in 4.13)

Target.cs:

public GardenWarsTarget(TargetInfo Target)
	{
		Type = TargetType.Game;
		bUsesSteam = true; 
    }

At this point I’m running out of things to try and considering just not supporting LAN multiplayer. It’s a bit baffling why it would work over the internet and not over LAN (especially since the session is joined OK).

Note I also had this problem on 4.12.5 as a blueprint-only project, before converting to a code project on 4.13 to see if that would fix things.

Full server log

Full client log

Create/Join Session Blueprint Setup

I should mention this is just using Steam SDKv132 (since that was the one that’s integrated with 4.13 release)

OK update - it connects/travels fine over the internet with Steam - so it appears it is just a LAN match which is failing to connect.

So it turns out it works over LAN with Steam if you just forget about the whole “Use LAN” option and host a normal internet session.

So my solution is just going to be to remove the “Use LAN” checkbox from the shipped game… makes things simpler anyway (keeping it there for development though because I think you still need that option if using OnlineSubsystemNull).

I have the same issue since 4.12. But LAN clients can’t find server if server created for internet session

I have checked more, and with 4.13 the same issue i have.

Also, i have the same messages in log when i am trying to connect.

Can Epic Games check this issue please and post any comments. Tnx

found solution which helped me.

but that is strange that when i create game i set steam session params to be lan match, maybe there is some bug?