# Dedicated Server Default Map Not Working

**URL:** <https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527>\
**Category:** Multiplayer & Networking\
**Tags:** dedicated-server, Server, Map, unreal-engine, Multiplayer, UE4, question\
**Created:** [June 12, 2016, 2:55pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527 "2016-06-12T14:55:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 12, 2016, 2:55pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/1 "2016-06-12T14:55:06Z")

</div>

For some reason my dedicated server is starting up with the Entry map instead of the map that I have defined.

I am packaing with **RunUAT** via

```
"D:\UnrealEngine4.11\Engine\Build\BatchFiles\RunUAT" BuildCookRun -project="%WORKSPACE%\FPSGame\FPSGame.uproject" -noP4 -platform=Linux -serverplatform=Linux -server -serverconfig=DebugGame -cook -allmaps -build -stage -targetplatform=Linux -archive -archivedirectory="D:\UE4Builds\Omniwar"

```

I removed the -pak flag because I wanted to verify that my maps were actually being packaged.

I have set the ServerDefaultMap in **DefaultEngine.ini**

```
[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Game/Maps/MainMenu.MainMenu
EditorStartupMap=/Game/Maps/Foo
GameInstanceClass=/Script/FPSGame.FPSGameInstance
GlobalDefaultGameMode=/Script/FPSGame.FPSGameModeTDM
ServerDefaultMap=/Game/Maps/Foo

```

I have also set AllMaps in **DefaultEditor.ini** since I am building with the -allmaps flag

```
[AllMaps]
+Map=/Game/Maps/MainMenu
+Map=/Game/Maps/Foo

```

I have verified that my maps are being packaged.

 ![94309-maps.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/f/63f5927b270d55bdbc1f99c67dee724f1989eb73.png)

But for some reason my dedicated server is still starting up with the Entry map.

 ![94310-entry.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/0/2400848ceb1a37d2e726db711e8ae433d0db41f6.png)

I have looked through the entire server log and there are no errors saying that it can’t find the map. It just acts like it is supposed to start with Entry and it loads that.

It’s like it is ignoring my ServerDefaultMap settings.

I am running my server with no flags via a systemd

```
./FPSGameServer-Linux-DebugGame
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [June 13, 2016, 4:25pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/2 "2016-06-13T16:25:31Z")

</div>

Hey erebel55-

In the Project Settings-\>Maps&Modes window, do you have your server default map set in the “Game Default Map” drop down? If not, does setting this option to the correct map affect your package? If this is all setup and you are still not getting the starting map that you intend, can you provide additional steps to help me reproduce this issue locally?

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 13, 2016, 5:41pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/3 "2016-06-13T17:41:31Z")

</div>

, yes that is essentially what the DefaultEngine.ini settings are.  
But here is the view from the editor as well.

 ![94450-psettings.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/8/d18470093228bc16de9b5b7cd3dda117676078e4.png)

I have modified the source to log the default map that it is using within GameInstance::StartGameInstance.

 ![94471-log.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/9/cd9bbd15811fdb7abe452fff0fee0a3bf8c57835.png)

It is spitting out the Entry map. So I am digging into that function to have a look.

 ![94472-entry.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/6/dc6ac81fbb39761713548b23f22e4f24c56530e6.png)

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 13, 2016, 8:37pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/4 "2016-06-13T20:37:57Z")

</div>

I added the following to GetGameDefaultMap() and it is returning /Engine/Maps/Entry too…

I have tried specifying the map via cmd line

```
./FPSGameServer-Linux-DebugGame /Game/Maps/Foo

./FPSGameServer-Linux-DebugGame DEFAULTMAP=/Game/Maps/Foo

```

But neither of them help.

 ![94492-defaultmap.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/d/00dd19da05f0d98979f9d591e18e63efe190a438.png)

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 13, 2016, 8:39pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/5 "2016-06-13T20:39:51Z")

</div>

Looking through the source code, the only place that I see the default map set is here [https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp#L801](https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp#L801)

And that is surrounded by an if clause that looks at command line arguments. How does this work for anyone using ini settings?

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 14, 2016, 12:59pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/6 "2016-06-14T12:59:16Z")

</div>

So while I’m cooking the correct map is logged (Foo)

 ![94591-cook.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/5/b7535059e38f0084b4992636a3e409c8fbcca663.png)

However, when I run the dedicated server it is using Entry

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/e/4efb6894665834eb023f23f8412dccab061f5c95.png) ](https://i.imgur.com/hp6uqWr.png)

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 14, 2016, 3:56pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/7 "2016-06-14T15:56:02Z")

</div>

I tested my RunUAT build command against MultiplayerShootout and it works fine. The correct map is loaded in that project. With my project I tried changing the map from Foo to a different one and it still loads Entry. So it’s not my map file. I’m running out of ideas ☹

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 14, 2016, 5:29pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/8 "2016-06-14T17:29:15Z")

</div>

As a test I updated my DefaultEngine.ini to look like the following (based off of MultiplayerShootout)

```
[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Maps/Foo
TransitionMap=
GameInstanceClass=/Script/FPSGame.FPSGameInstance
GameDefaultMap=/Engine/Maps/Entry
GameDefaultMap=/Game/Maps/Foo
GlobalDefaultServerGameMode=/Script/FPSGame.FPSGameModeTDM
GlobalDefaultGameMode=/Script/FPSGame.FPSGameModeTDM
ServerDefaultMap=/Game/Maps/Foo

```

I am still getting this when I run my dedicated server…

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/6/e6785a1b295d8be8abf8b2bbe9fd5907759f53dd.png) ](https://i.imgur.com/wpG3Vz8.png)

So it’s not updating my GameDefaultMap or my ServerDefaultMap…

I have verified that the correct ini settings are being cooked

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 14, 2016, 7:40pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/9 "2016-06-14T19:40:30Z")

</div>

Even deleting the GameMapsSettings section from my DefaultEngine.ini doesn’t change anything. Is there something that has to happen for these changes to take effect?

---

<div class="post-metadata">

**Author:** ![erebel55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@erebel55](https://forums.unrealengine.com/u/erebel55)\
**Post date:** [June 16, 2016, 3:34pm UTC](https://forums.unrealengine.com/t/dedicated-server-default-map-not-working/360527/10 "2016-06-16T15:34:24Z")

</div>

I was finally able to resolve this nightmare of an issue.

There was a DefaultEngine.ini file under Saved/Temp that I _think_ for some reason was being loaded and prioritized ahead of my real one. At least that is what I’m telling myself.

Regardless I resolved the issue by doing the following

1. Deleted Saved, Binaries, and Intermediate from my local project
2. Deleted the contents of my jenkins project from the file system
3. Deleted the contents of UE4Builds\Omniwar (the archived directory specified in my RunUAT command)
4. Rebuilt
5. Deleted my LinuxServer directory from my linux machine
6. Did a rsync of the LinuxServer back to my linux machine

Now everything works fine.  
When I update my ini file the changes that effect.  
No more issues.

Thanks!
