Dedicated server with Steam is a joke

Our game got greenlit on Steam (Steam Community :: Error) just a few days ago. We then proceeded to purchase a dedicated server in order to start our business on Steam, only to be greeted by an unwelcome surprise: dedicated servers won’t work.

Allow me to elaborate: after 3 days we (as of yet) are unable to connect to our dedicated server and play the game. Logs are completely clean of any useful information so we’re completely in the dark in regards to what the hell is going on.
We’ve carefully followed all available documentation in regards to setting up servers on Steam, ports are correctly forwarded, everything appears to be in order.

This leads us to suspect UE4 is the culprit . It’s unacceptable.
We’ve had no issues connecting locally and online without Steam so it’s evidently something to do with getting the two to work together.

Server log:

Client log:


Connecting commands seem to do nothing. We cannot connect and no relevant info can be found in the game logs.
At this point we can only pray somebody helps us out of this pit of despair.
Thank you for your time.

Ok so,

i tried looking into both logs but tbh, before you don’t clean up that Clientlog, i don’t see myself trying to find every line.

59492 lines, where at least 99% of them are

“[2016.01.16-18.33.46:172][848]LogScript:Warning: Attempted to get an item from array CallFunc_SortPlayers_PlayerFragsSortedOut out of bounds [0/0]!”

You blur out the IP in the Screenshots, but the logs still have them (just telling).

Fix the “out of bounds” error, and this error:

“[2016.01.16-18.30.58:923] 0]LogSkinnedMeshComp:Warning: GetSocketByName(): No SkeletalMesh for WeaponMesh3P”

AND maybe also this error:

“[2016.01.16-18.30.59:004] 0]LogSlate:Warning: ‘Roboto’ does not provide a composite font that can be used with Slate. Slate will be forced to use the fallback font path which may be slower.”

And send in a new, fresh and clean log. Then i will try to read the log again, because the only thing i found between all those thousands of lines is that the client times out while connecting.

Thanks for the quick response. We’ve fixed most of the issues you mentioned.

We couldn’t fix the issue related to Roboto and it has come to our attention that other users have the same problem:
https://answers.unrealengine.com/questions/322861/log-spammed-with-logslatewarning-roboto-does-not-p-1.html

In any case, the logs are pretty clean now.

This is the updated server log:

Client Log:

Hope to get a work around as soon as possible so we can launch our game on Steam. Thank you for your time.

Looking at server log it looks like you are not Registering with online service`s (“Steam”) on server startup.
In your Session class override the method


virtual void AGameSession::RegisterServer();

In order for the the server to advertise a online session.
See FOnlineSessionSettigs for more info.

You want to make use of the online subsystem session interface.


CreateSession(), StartSession(), FindSession(), DestroySession()

Also make sure to bind the delegates related to the method`s above.

I can confirm that Steam works on 4.10.x am currently only using test app ID 480.
And we are able to connect over Steam, Server Is located in EU, and Users are EU, US, RU.
No hassel at all.

Also on a side note.
the console command is wrong for steam i belive it should be something like.
open steam.ServerSteamID(long number):PORT

Hope this helps and good luck with your game.

Thanks for the reply!

I did this:


void AUAGameSession::RegisterServer()
{
	const int MaxNumPlayers = 8;
	const bool bIsPresence = true;
	const bool bIsLAN = false;
	const int HostingPlayerNum = 0;
	const FString GameType = "Deathmatch";
	const FString MapName = "Hall"; //< TODO: Get actual name.
	const auto UserId = MakeShareable(new FUniqueNetIdString(FString::Printf(TEXT("%d"), HostingPlayerNum)));

	IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
	if (OnlineSub)
	{
		IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
		if (Sessions.IsValid())
		{
			FOnlineSessionSettings Settings;
			Settings.NumPublicConnections = 8;
			Settings.bShouldAdvertise = true;
			Settings.bAllowJoinInProgress = true;
			Settings.bIsLANMatch = false;
			Settings.bUsesPresence = true;
			Settings.bAllowJoinViaPresence = true;

			Sessions->CreateSession(0, GameSessionName, Settings);
		}
	}
}

And now I’m getting this when opening dedicated server:

Can also confirm steam dedicated servers work fine.

Very frustrating to be sure, however once you figure it out it’s very easy to set up… Are you sure you’re searching for servers?

Nothing can be “confirmed” since it’s still NOT working . Could someone please address the error?

I think you forgot to add all needed modules “OnlineSubsystemUtils”.


PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore", **"OnlineSubsystem","OnlineSubsystemUtils"});**

In YourProject.h


#include "Online.h"
#include "OnlineSubsystem.h"
#include "OnlineSubsystemUtils.h"

Try that first

Edit: I think your error is .



IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{ ......
// Belive it should be 
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();

// And you can check for it like so.
if (!IOnlineSubsystem::DoesInstanceExist("Steam"))
{
	UE_LOG(YourOnlineSessionLog, Log, TEXT("FAILED: To find steam module instance."));
}


Also you need to bind the delegates for CreateSession().
The task is async and will call CreateSessionCompleted Delegate when complete.
And then you must call StartSession() and bind delegates when complete the session should be available online.

Edit: Just found this on the wiki it should help you out.

Hope it helps.

Yo the Wiki post is made by me. So if something is not clear about a thing in that wiki post, ask me.

Well, we can confirm that Dedicated Server + Steam work if you do it right. So you don’t have to blame the Engine anymore like OP does in the first post.
That also tells you, that it IS possible to get Dedicated Server + Steam working. Which in fact, should make you happier.

Please post your Logs after you tried to fix it, so we can work with the updated logs after each fix attempt.

At some point it might also be helpful to post all functions and code that is used by you for Creating and Joining Sessions with Server and Client.

We are currently attempting to follow the instructions kindly posted by . Note that this is out first UE4 project and first attempt at making a game and we are only a 2 man team.

The fact is that this particular precudure seem to be underdocumentated and somewhat vague. We’re doing our very best…
Hopefully we’ll get the thing working withing the day and be able to post the details.

Thanks and for the reply.

OnlineSubsystem and OnlineSubsystemUtils are already added in our project Build.cs and in our project header file.
I tried removing const, but it still doesn’t work, and if I write


// And you can check for it like so.
if (!IOnlineSubsystem::DoesInstanceExist("Steam"))
{
	UE_LOG(LogOnlineGame, Verbose, TEXT("FAILED: To find steam module instance."));
}

(Verbose logs are enabled for LogOnlineGame)
I’m not getting anything because the if statement is false.

I saw the wiki article, but the problem is that if I download his project, it’s giving lots of errors.
For the sessions, I used the ShooterGame session system.
If I open a listen server, and Zeb89 connects to it, I see him in the logs, but he’s not loading the map, and he’s not joining the game. While in the dedicated server, I don’t see him.

Have you checked if you can find the server in the Steam Client?
In Steam > View > Servers > Select Favorites Tab > Right Click > Select Add Server by IP Adress.

I whould start there, other then that am not sure.
If you Follow Wiki on Implementing Steam and Session Wiki it will work if done correctly.

The documentation could certainly do with more work (all documentation can!), but many of us have projects that connect to dedicated servers via Steam.

Please take the time to go through these questions.

Questions:

  1. Are you running the binary build of the engine or a custom one compiled from github source?

  2. If binary, which version? If compiled, which branch?

  3. Can multiple clients interact on a dedicated server via direct IP connections? Online?

  4. Are you running Steam on the machine running the dedicated server?

  5. Have you got an app id for your game?

  6. Have you included a steam_appid.txt with the correct app ID with your dedicated server executable?

  7. Is the game name in the Steam works area been setup?

  8. Is your games DefaultEngine.ini setup to use the OnlineSubsystemSteam correctly?

  9. Does your games Build.cs include the correct modules for multiplayer & Steam?

  10. Does your games Target.cs constructor include bUseSteam=true?

For information regarding these questions:

Answer as many as you can.

It will help people help you and anyone else who has similar issues in future.

Thank you.

  1. I’m using the GitHub source
  2. I’m using the latest version from the 4.10 branch
  3. Yes without Steam
  4. Yes
  5. Yes
  6. Yes
  7. Yes
  8. Yes
  9. Yes
  10. Yes

We’ve just tried the same thing using Shooter Game by Epic Games (using our game APP ID) and it still has no intention of working with Steam. Connection seems to time out. We tried both with dedicated and listen servers.
In addition, the server doesn’t appear in the Steam master server list.

Still a brick wall.

Well said Kris and a good source of resources as well. :smiley:

I wasn’t aware ShooterGame was setup to use Steam.
Eh, ya learn something everyday I guess :slight_smile:

If the dedicated server does not show up on the Steam master server list, it may be as simple as the ports the server needs are not open to it.

Try running a dedicated server on your own machine and see if that shows up on the Steam master server list.

If not, fiddle with ports or just go wide open for a little while (DMZ FTW!).

Sounding less and less like and engine problem, but I guess time will tell.

All ports are opened, but the dedicated server is still not showing up on the master server list. I tried with my PC and with a bought VPS with all ports opened.

At Steamworks app configuration panel you must add comma separated your dedicated servers’ IP like:
xxx.xxx.xxx.xxx/7777,192.168.0.1/7777

then save and publish the app modifications or Steam won’t list any server IP for your game under your AppID.
EpicGames doesn’t explain this stuff because you’re supposed to read Steamworks docs…

I added my server IP there in this format: x.x.x.x/7777 but it’s saying that it’s not a CIDR address.

http://ip2cidr.com