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"

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

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! Ryan

Product Version: Not Selected
more ▼

asked May 07 '14 at 04:49 PM in Using UE4

avatar image

21 5 9 13

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

1 answer: sort voted first

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, its actually listening by default on the local lan IP address.. or least thats the current state where I am at :)

more ▼

answered May 10 '14 at 06:49 PM

avatar image

106 3 6 10

avatar image SpaceBearDev May 10 '14 at 07:34 PM

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

"also when the server starts it doesn't listen on, 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?

avatar image SteeleDriver May 10 '14 at 07:42 PM

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 ( 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...

avatar image SpaceBearDev May 10 '14 at 08:24 PM

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 (

[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

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

[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

avatar image SteeleDriver May 10 '14 at 08:35 PM

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.

avatar image SteeleDriver May 10 '14 at 09:12 PM

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

avatar image SpaceBearDev May 10 '14 at 10:56 PM

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.

avatar image SteeleDriver May 10 '14 at 10:59 PM

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.

avatar image SpaceBearDev May 10 '14 at 11:00 PM

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.

avatar image SteeleDriver May 10 '14 at 11:10 PM

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.

avatar image SpaceBearDev May 10 '14 at 11:12 PM

ok thanks for trying!

avatar image SpaceBearDev May 12 '14 at 12:23 PM

Damn, well thanks for trying anyway.

(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