Download

Creating a Dedicated Server for our Game | Server not Listening

Hello everyone!

I am trying for 4 days straight now to get a dedicated server running for our game and it starts getting frustrating since it won’t work.
I followed this Tutorial: https://www.youtube.com/watch?v=zSA8zUo8oCg
Also, this one (which is also featured in the video): A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

The Problem: The dedicated Server is not listening

So, summarized, I downloaded the UE4.9 Source, builded it, changed the Engine Version of our project to the SourceBuild of 4.9 and recompiled it. Then I cooked content and packaged the project. I created the Server.Target.cs file and build our gameproject with the configuration Development Server. Then I copied the Server.exe into the cooked-folder and runned it with …exe -log.

This is what appears in the server log: 8e7fb3aab445bb538399c34195b29b3a10a73757.png
Here is my Server.Target.cs:


// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class BallistiqServerTarget : TargetRules
{
    public BallistiqServerTarget(TargetInfo Target)
    {
        Type = TargetType.Server;
    }

    //
    // TargetRules interface.
    //
    public override void SetupBinaries(
        TargetInfo Target,
        ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
        ref List<string> OutExtraModuleNames
        )
    {
        base.SetupBinaries(Target, ref OutBuildBinaryConfigurations, ref OutExtraModuleNames);
        OutExtraModuleNames.Add("Ballistiq");
    }

    public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
    {
        // It is valid for only server platforms
        return UnrealBuildTool.UnrealBuildTool.GetAllServerPlatforms(ref OutPlatforms, false);
    }

    public override List<UnrealTargetPlatform> GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform)
    {
        if (HostPlatform == UnrealTargetPlatform.Mac)
        {
            return new List<UnrealTargetPlatform>();
        }
        return new List<UnrealTargetPlatform> { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.Linux };
    }

    public override List<UnrealTargetConfiguration> GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
    {
        return new List<UnrealTargetConfiguration> { UnrealTargetConfiguration.Development };
    }
}

But as you see in the log of the dedicated server, it is not listening. I can’t connect to it via “open 127.0.0.1:7777”.
I have a pretty close deadline, I would appreciate every help I can get, really.

If you need any additional information about the project, let me know, I will provide everything you need to may be able to help us in this problem!
Thank you very much in advance.

Mykon (OmaManfred)

Okay guys, I got it. For learning purpose I copied the GameInstance class from the ShooterExample into my project, just for testing something back then (but without actually using it at this stage anymore). I commented the whole Init() Function and thought this would be it, along with switching back to use the default GameInstance (selecting it under Maps&Modes in the ProjectSettings), but then I discovered that in the DefaultEngine.ini

[/Script/EngineSettings.GameMapsSettings]
GameInstanceClass=/Script/Ballistiq.BallistiqGameInstance

still existed. I changed it back to the default one, and tadaaa: It worked.