# The listen server works fine but why is my dedicated server not working right?

**URL:** <https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746>\
**Category:** Character & Animation\
**Tags:** launch, Server, dedicated, unreal-engine, question\
**Created:** [May 7, 2014, 4:49pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746 "2014-05-07T16:49:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 7, 2014, 4:49pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/1 "2014-05-07T16:49:08Z")

</div>

Hey everyone,

I’m trying to launch a dedicated server of my game from a desktop shortcut but its not quite working how I think it should. I setup the listen server fine with the target in my shortcut as:

“…/gamestuff/game.uproject” MyMap?listen -game -log

at the end of the target box in the shortcut I made, which works perfectly.

However to setup a dedicated server I tried switching to:

“…/gamestuff/game.uproject” MyMap -server -log

When I launch it, it launches the log like it should but when I connect there is no custom game mode like when I launch the listen server. I’m just a spectator camera flying around.

Am I missing something simple here? I can’t seem to figure out why it isn’t launching my custom game mode class.

Thanks!

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 6:49pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/2 "2014-05-10T18:49:51Z")

</div>

Check your Default settings for Game modes including default server setting  
If they don’t all match properly (also depending on how your menus start), that could be part of it.  
This is found in project settings for maps & modes, also when the server starts it doesn’t listen on  
127.0.0.1, its actually listening by default on the local lan IP address…  
or least thats the current state where I am at 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 10, 2014, 7:34pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/3 "2014-05-10T19:34:46Z")

</div>

Yes all those settings are set but I still load as a spectator.

“also when the server starts it doesn’t listen on 127.0.0.1, its actually listening by default on the local lan IP address” Can you expand on that? should I change the client target to something besides local host?

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 7:42pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/4 "2014-05-10T19:42:25Z")

</div>

what is your server log showing? When I set mine to ?listen, then its local lan, when its set to just (game.exe) [gamemap] -server it shows in the logs: [2014.05.10-19.12.09:114][0]LogInit: WinSock: I am DevelopII (192.168.0.4:0)  
and doesn’t (listen) on localhost… Still digging into this and so just getting the Socket part sorted out myself. So yeah, try open (your machines Lan IP)  
As for the reason for spectator, try opening the console and typing (reconnect), otherwise it maybe that it isn’t finding the Start point for your player to spawn at, or there maybe something in the way where it is trying to spawn. I have additional code to test around the spawn point by +/-10 to find a valid spawn point. That may be your real problem…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 10, 2014, 8:24pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/5 "2014-05-10T20:24:02Z")

</div>

I’m not launching from an exe I’m launching from .uproject as I showed above, could that have something to do with it?

This is what the server log shows:

[2014.05.10-19.46.48:346][0]LogWorld: Game class is ‘GameMode’

[2014.05.10-19.46.48:347][0]LogSockets:Warning: Failed to create socket SessionSocket [Unreal]

[2014.05.10-19.46.48:348][0]LogInit: WinSock: Socket queue 131072 / 131072

[2014.05.10-19.46.48:350][0]LogInit: WinSock: I am God (192.168.1.143:0)

[2014.05.10-19.46.48:350][0]LogNet: GameNetDriver IpNetDriver\_0 IpNetDriver listening on port 7777

[2014.05.10-19.46.48:351][0]LogWorld: Bringing World /Game/Disabled\_Comodo\_Int.Disabled\_Comodo\_Int up for play (max tick rate 30) at 2014.05.10-20.46.48

[2014.05.10-19.46.48:352][0]LogInit:Display: Game Engine Initialized.

[2014.05.10-19.46.48:356][0]LogLoad: Full Startup: 2.46 seconds (BP compile: 0.12 seconds)

[2014.05.10-19.46.56:957][256]LogNet: NotifyAcceptingConnection: Server Disabled\_Comodo\_Int accept

[2014.05.10-19.46.56:957][256]LogNet: Open Disabled\_Comodo\_Int 05/10/14 20:46:56 127.0.0.1

[2014.05.10-19.46.56:957][256]LogNet: Added client connection. Remote address = 127.0.0.1:52682

[2014.05.10-19.46.56:957][256]LogNet: NotifyAcceptingChannel Control 0 server World /Game/Disabled\_Comodo\_Int.Disabled\_Comodo\_Int: Accepted

[2014.05.10-19.46.56:957][256]LogNet: Remote platform little endian=1

[2014.05.10-19.46.56:957][256]LogNet: This platform little endian=1

[2014.05.10-19.46.57:226][264]LogNet: Login request: /Game/Disabled\_Comodo\_Int?Name=Player userId: Invalid

[2014.05.10-19.46.57:226][264]LogNet: Client netspeed is 10000

[2014.05.10-19.46.57:497][272]LogNet: Join request: /Game/Disabled\_Comodo\_Int?Name=Player?SplitscreenCount=1

[2014.05.10-19.46.57:497][272]LogGameMode: RestartPlayer Player

[2014.05.10-19.46.57:498][272]LogNet: Join succeeded: Player

[2014.05.10-19.46.58:069][289]LogPlayerController: ServerAcknowledgePossession\_Implementation DefaultPawn\_0

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 8:35pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/6 "2014-05-10T20:35:09Z")

</div>

nope, that shouldn’t be the problem… Not sure where your problem is coming from there. It looks like the spawn implemenation isn’t continuing after getting control of it and it is sitting at spectator mode. Can’t tell where it fails. Best bet is to debug it from the point it is suppose to spawn the player and work backwards.

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 9:12pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/7 "2014-05-10T21:12:48Z")

</div>

heres a thought… If you don’t have the game mode initializing properly by default you coud try forcing it on the server with: …/gamestuff/game.uproject" MyMap?game=MyGameMode -server -log It might be you don’t have your initgame() setup right for the server to start in that mode, this should force it. Altho it does look like the log says it is starting in that mode… unless GameMode is not the one you want…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 10, 2014, 10:56pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/8 "2014-05-10T22:56:24Z")

</div>

I forced it with the line of code you gave but still the same problem. Spawns for a second in the floor and then goes to spectator mode. reconnect in console command doesn’t fix it.

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 10:59pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/9 "2014-05-10T22:59:03Z")

</div>

That sounds like the spawn setup is incorrect, try moving the Spawn game object up higher in the editor. Better to drop a little bit to floor then to try spawning in the floor as that would cause it to fail usually.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 10, 2014, 11:00pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/10 "2014-05-10T23:00:11Z")

</div>

Ya I have it setup pretty high in the air. It spawns in the floor first then way up in the air with just the camera.

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 10, 2014, 11:10pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/11 "2014-05-10T23:10:05Z")

</div>

aahh, yeah, thats normal, thinking about it, the spawn starts with zero point position then gets the correct location on spawn setup. At this point its gonna take debuging, not the easy way but necessary. As it spawns the spectator you can do a break at that point and back trace to where it decides wether to spawn a player or the spectator and see what is failing. Not much more I can do from here.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 10, 2014, 11:12pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/12 "2014-05-10T23:12:01Z")

</div>

ok thanks for trying!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f66a33d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f66a33d5](https://forums.unrealengine.com/u/anonymous_user_f66a33d5)\
**Post date:** [May 12, 2014, 12:23pm UTC](https://forums.unrealengine.com/t/the-listen-server-works-fine-but-why-is-my-dedicated-server-not-working-right/282746/13 "2014-05-12T12:23:59Z")

</div>

■■■■, well thanks for trying anyway.
