I’m currently trying to setup a client connection to a running dedicated server.
It’ll works perfectly, when I play in the editor. The clients connect to the dedicated server just fine, replication works fine, I see all actors, great. However, when I select to play in a different process, the clients try to connect to the server and time out after a short amount of time.
From the log of the server I can see, the server successfully loaded the map, but either the (I think automated) attempted connection, when clicking “Play” in the editor (with using single process unticked) nor calling APlayerController->ClientTravel seems to work.
I’ve setup my game and main menu to be similar to the one MultiplayerShootout example project, but instead of working with listen servers I want to connect to a single dedicated server. (I’m not worrying about multiple dedicated server or anything fancy right now)
Any ideas? Hints? Tutorials on this topic available?
You sure it not something system related? firewall? right ports?
Check connection statuses via “netstat -a” in windows console (type in “cmd” in start menu search), check if server really is listening
Everything is done on my local machine, no firewall should prevent that, though.
Ok, I did a few tests.
- It seems starting with “-server” doesn’t work.
- I started a server with “Play as Stanalone Game”, it was listening on 7777 (saw it in the log). I couldn’t see it through “netstat -a | grep 7777” in the windows cmd, however I could connect to it just fine. Which is good.
This changes my question a little, how to start a server correctly (C++ project, with engine from github)? How can I define which map should be the one to start?
Why doesn’t I see it via netstat?
Here you have docs:
Local machine or remote machine does not matter, networking layer works the same regardless if lower and hardware layer it uses and any firewall can lock it too, aspecially if you trying to connect using LAN IP.
Try searching based of PID, add “-o” option in netstat, you can see PIDs of specific process using “tasklist” command