Dedicated server hasn't worked for me since 4.3

Hey all,

I’m able to compile and run a dedicated server (see image here) http://i.imgur.com/sjjahk0.png in any version. however since version 4.3 i’ve been unable to connect to it from external sources. I can connect locally (open 192.168.0.1), and i can see the connection happening in the server log.

I’m at a bit of a loss as to what to do now. So i’ve uploaded my source code and config to a zip attached to this post, in case anyone wants to take a look. It’s all incredibly basic. I stopped working on my project and started over, wanting to make everything as basic as possible, making sure that there were as few things that could cause problems as i could make it.

This is really beginning to do my head in now. I can’t make any meaningful progress until i can get this working.

Checklist of things i’ve done/am doing:

  • used official documentation to create my server.target.cs file.
  • made sure that both the server and the editor/game are created using the same compile type (development server/editor).
  • made sure i have my ports open on my router.
  • make sure my firewall is disabled when trying to test.
  • banged head against wall repeatedly trying to think of solution.

Another thing i’ve tried:

  • Having a friend run the dedicated server and have me connect to them.

How are you handling the networking portion of your game?

It is not just a matter of creating a dedicated server and then taking your game and connecting to it … it requires more work then that. I have been using a dedicated server since 4.7.6. and my clients can connect every time … the game was built with network replication from the start and I do not use the “Get Player Index” call at all anywhere in my code.

Running the dedicated server and connecting to it is a different thing, if your network code is not written accordingly then I highly doubt you will be able to successfully connect to the server in question.

Also make sure your server is using the right map to start and that you have network spawn points on the map.

My issue is, the way i’ve done the networking side of it (with regards to compiling and connecting in the most basic sense) has not changed at all. it stopped working as soon as 4.3 hit. during 4.2 i was able to connect to the dedicated server with no problems at all.

So i want to know what was changed, so i can update what i’ve got.

Also, you’re implying that some kind of special spawn point is needed now, one that doesn’t exist in the standard set of actors that the engine compiles with (and so is custom written?), this again wasn’t the case during 4.2.

Ah okay … never used 4.2 or 4.3 so I am about as much use to you as a chocolate teaspoon. 8-}

Nope, not implying that at all. It is definitely not custom written … it is a standard player start … sorry should have been more specific.

Well then yes, my level has a player spawn point.

Chocolate teaspoons are yummy.

This issue is still baffling me.

So the problem is that you can connect to your server locally - ie, from another instance on the same computer, but someone can’t connect to your server using your public IP address? If so it sounds like a firewall/antivirus/port forwarding issue to me.

I’ve opened specific ports on my router, i’ve asked friends helping me test to do the same on theirs. I’ve set up a DMZ to test with as well and that doesn’t work. I’m not sure how i can explain this any more clearly… nothing about my pc, my firewall, my router settings have changed at all. This worked during versions 4.0, 4.1, and 4.2. It stopped working once 4.3 hit and has never worked since.

To be honest I’m not sure what exactly is causing your issue. If you can connect locally then it doesn’t sound like it’s UE4 causing the problem. The only things that spring to mind are:

  1. Maybe the package that the non-local user is using doesn’t have the correct maps or is missing something else? Ie, it’s a packaging issue on the non-local computer

  2. Even though your router/firewall setup is the same, if you’ve changed versions maybe your setup doesn’t recognise the new program as being the same as the old one and is blocking it?

If you have another computer setup on the same local network it would be interesting to see if that one could connect to your server. If so then it would strongly suggest a router/firewall issue as the underlying cause. I know that nothing has changed on your router setup, but that doesn’t mean that it’s not causing the issue.

For my own piece of mind then, here’s the compiled game + server. If you can get a connection to work, then you’re probably correct and it’s something up with my firewall and/or router.

If not, then maybe you can see something in the logs that i’m missing.

http://crazyferretstudios.com/public/PVPGame.zip

It worked for me … I ran the server checked that it was bound to my IP …


[2015.06.24-02.38.23:655]  0]LogInit: WinSock: Socket queue 131072 / 131072
[2015.06.24-02.38.23:657]  0]LogInit: WinSock: I am qwd-gg-pc0 (172.16.1.104:0)
[2015.06.24-02.38.23:657]  0]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777

I then made two copies of the client and connected them each to the server by entering “open 172.16.1.104” … screen shot is below.

http://puu.sh/iAvZu/ebd97b2329.PNG

You can see that the clients are connected because I have two “Login Request” entries on the dedicated server that I ran with the “- log” option.

http://puu.sh/iAwd5/2a7f73e577.PNG

So your code seems to be working as intended.

Hmmm interesting. thanks for taking the time to test this!

I notice one difference that i guess is the killer here. your says:
I am qwd-gg-pc0 (172.16.1.104:0)

mine says:
I am EpicRaid (192.168.0.2:0)

doesn’t this mean that for some reason my server (when running on my machine) is only listening for local connections?

Nope … my network at home is set up to use the 172...* network range … yours is set up to the more common 192.168.. range. Everything will work as normal, I could change my network to the same address as yours and the game would still work.

So then you have only connected locally, but not via your actual public IP.

I have connected via the IP Address that the server is bound to … if the server had a public IP address it would have been bound to that and I would have been able to connect to that.

Hi,

Have you tried to connect on the dedicated server with the port number added to the IP?

Locallly, you need to be sure to put the port otherwise you can’t connect whereas on listen server you are not :D. It was an issue for me when connecting on 127.0.0.1.

Ah okay this makes sense. I can’t find anything in the documentation on binding the server to a public IP though.

Join the club … I can’t find anything either.

So are we saying that nobody runs a dedicated server using Unreal Engines built in tech? That’s incredibly difficult to swallow.

I had a dedicated server build that ran just fine in 4.7 across the net (public IP). I’m a bit confused about the IP issue - your server will have a local address on the LAN. I thought the idea of port forwarding was to expose that local IP to the public IP - is that the binding that you are referring to?

All I had to do was to compile the server and package it with everything else. I then just port-forwarded to the local machine I had the server on, and people could connect.

Either way, I can guess your frustration level must be extreme at this point. I’ve had so many of these moments with UE4 I now regard them as normal :slight_smile:

PM me your Skype name and I’ll see if I can help you over the weekend (if you still need it at that point).