x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't find LAN session (using steam SDK)

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): https://wiki.unrealengine.com/Steam,_Using_the_Steam_SDK_During_Development 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. 1. Opened a version of my project before the steam integration. 2. Ran 2 players in PIE, I can create a server, find and join that server no problems. 3. I checked the port being used by the server and it is 7777. 4. 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.

  1. Opened a version of my project that had steam integration based on Rama's guide.

  2. Ran 2 player in PIE, I can create a server, find and join that server no problems.

  3. I checked the port being used by the server and it is 7777 still.

  4. 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): [URL] GameName=SandBox

 [/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=1.0.0.0
 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: alt text

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. alt text

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! :D

UPDATE: 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. 1. I started a server on Computer A. 2. On Computer B I made sure steam was running and tried to find server, with success (HOORAY!). 3. 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.

Product Version: UE 4.9
Tags:
more ▼

asked Oct 02 '15 at 02:27 AM in Bug Reports

avatar image

Otreum
239 18 26 38

avatar image Shadowriver Oct 02 '15 at 03:25 AM

Check if you not getting errors in logs, go to Window->Devlopers Tools->Output Log, set it up as a part of your layout. it's very useful tab

avatar image Otreum Oct 02 '15 at 03:36 AM

I always have the Output log open for that reason :)

However it works perfectly fine inside of the editor.

Also, I just updated the main post with this:

UPDATE: 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. 1. I started a server on Computer A. 2. On Computer B I made sure steam was running and tried to find server, with success (HOORAY!). 3. 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.

I'm just taking a look at log produced to see where the error might be occurring. I have a feeling it is timing out for whatever reason.

avatar image CriErr Oct 02 '15 at 04:24 AM

im think thats might be problem in actual setup, i had SDK enabled with files and config working for it, but mine menus wasnt ready, so ive tried to test it via Lan but same as you, server was found, connect fails and ping is 9999. But when i change line DefaultPlatformService=Steam to DefaultPlatformService=Null Lan start working. So there are might be some problem with that.

avatar image Otreum Oct 02 '15 at 04:38 AM

When I do that, I can't create a server at all unfortunately.

Also, I just checked out the log on the client side and it's spitting out a bunch of the same line: LogNet:Warning: Incoming ip address doesn't match expected server address: Actual: 0.0.0.0:0 Expected: 192.168.1.3:7777

Then it fails with a time out.

avatar image CriErr Oct 02 '15 at 05:06 AM

try on clean project, just make easy setup, its not gonna take more than 10 min and check it on the standalone test, i think there are no much difference between that and actual packaged game in tearms of behaviour. Also, when you make clean new project, if thats fails, package project to zip and post, i would try it and if thats work, we could assume thats not a unreal problem, but your router.

avatar image Otreum Oct 02 '15 at 05:39 AM

I haven't tried a clean project just yet, but did try Multiplayer shootout and had the exact same problem. So I'm thinking I might need to undo the steam integration completely until the LAN is over, then work at it later. Still doesn't really resolve the problem though :(

avatar image Otreum Oct 05 '15 at 03:17 AM

Ok, so tried a clean project, on a fresh, clean re-downloaded version of 4.9.2, and the project worked.

This helped me narrow it down to the fact that something in my project was broken after the steam integration stuff.

So I removed all the steam integration stuff, but still couldn't get it to work, as I was getting this error: Invalid or uninitialized OnlineSubsystem Cannot map local player to unique net ID

In my log file.

I jumped online, did a bit of investigating, found a solution that didn't really go into detail about adding a dependency.

After just fiddling around, I added "OnlineSubsystemNull" into the *.Build.cs file as was vaguely suggested (but not explained), and now it works. Bare in mind, this still doesn't solve the main issue of this post on answerhub, but it at least brings me back to having working multiplayer across LAN again.

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;

public class SandBox : ModuleRules { public SandBox(TargetInfo Target) { PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystemNull" });

     PrivateDependencyModuleNames.AddRange(new string[] {  });

avatar image Ben Halliday STAFF Oct 08 '15 at 04:34 PM

Hi Otreum,

Can you include a link to the information you found that suggested the .Build.cs file fix?

Also, you mention using Rama's tutorial for setting this up. Did you set it up exactly as written? That information is not up to date. For example, 4.9 uses SDK version 1.32, not 1.29.

While this information is not completely updated either, aside from the SDK version the information should be accurate:

https://docs.unrealengine.com/latest/INT/Programming/Online/Steam/index.html

avatar image Otreum Oct 08 '15 at 11:48 PM

Certainly Ben.

However note that the main issue was not resolved with that fix, just the issue I had as a result of trying to undo the steam integration. ;)

This was the AnswerHub thread where Ryan Gerleve suggests adding the dependency (I had no idea how to add a dependency though). https://answers.unrealengine.com/questions/141764/46-preview-and-create-session.html

He wrote:

If your project is a code project with a *.Build.cs file, you'll need a dependency on the "OnlineSubsystemNull" module.

There is this link, which was what gave me the light bulb moment of where to put the "OnlineSubsystemNull" in the *.Build.cs file. https://answers.unrealengine.com/questions/172707/invalid-or-uninitialized-onlinesubsystem.html

I know for some, this is not rocket science, but just something ridiculously simple, but for me, it got me back to a point where local multiplayer was working again.

As for the steam integration and Rama's tutorial. I followed it exactly. But it could very well be that I missed one tiny little thing too, so best I try again.

If it doesn't work again, I'm going to reset my router back to factory default settings and re-add ports to it as a last resort.

avatar image Ben Halliday STAFF Oct 12 '15 at 09:30 PM

It's possible your steam integration isn't correct if you followed Rama's instructions, since it's out of date. I'd check this link from the official documentation:

https://answers.unrealengine.com/questions/317131/crash-on-loading-a-project.html

That's a bit out of date as well, but other than the SDK version (4.9 uses Steam SDK 1.32) it should work. Are you building your engine version from source, or is this occurring in the binary build of 4.9?

So if Local Multiplayer is working again, is the problem just the LAN connection? Let me know what happens after following the Steam integration steps in the post above.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi Otreum,

Is this still an issue for you? Were you able to get everything working? I'm going to resolve this issue for tracking purposes, but please feel free to respond to the questions I asked above and we'll continue investigating. Thanks!

more ▼

answered Oct 19 '15 at 03:42 PM

avatar image Otreum Oct 19 '15 at 08:45 PM

Hi Ben, Sorry for not responding, I haven't had much of a chance to try the steam integration out again. I will definitely post again if it's working.

I have a feeling it may be due to my router needing a full factory reset. Or at least it'll be a good idea.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello!

A few months later, in our Project we are having exactly the same problem raised in this Post.

With the integration of Steamworks, the game is unable to find Listen Server across the LAN, both Standalone Game mode (PIE) and Packaged Game. Inside of the editor (PIE), with the number of players set to 2, the Server can host the game (creates the session) and the Client can join to the Session without problems.

Development Environment

  • Unreal Engine: 4.10.1

  • Steamworks SDK: Steam v135

  • Packaged Games: Winx64 (Debug & Development mode)

I read in other Post that it perfectly works in UE 4.9

I'll wait attentive any information on the subject

Thanks in advance for your attention!

more ▼

answered Jan 22 '16 at 04:06 PM

avatar image

anderson.rubio
31 7 2

avatar image Ben Halliday STAFF Jan 22 '16 at 05:10 PM

Hi anderson,

As mentioned here, I'd like you to make a new post if you're still having trouble connecting two separate machines and Steamworks v132. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Collected. cannot remember where:

The checkbox for "Use LAN" will cause Steam to not behave correctly even if your two computers are on a LAN. This is because the Steam protocol for connecting players into multiplayer games relies on different methods than what the OnlineSubsystemNULL (or others) might do.

If you are creating multiplayer games and want to use Steam, you need to make sure that the "Use LAN" check boxes are set to false, through whatever method you deem fit. As in, a checkbox in a UI element, condition to see if the player is connected to Steam, etc...

more ▼

answered Nov 04 '16 at 06:08 AM

avatar image

Muzaheed
240 18 24 31

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question