Download

Blueprint multiplayer not working via internet.

Hi, i am trying to get a basic working multiplayer system up and running in blueprints. I have watched the basic networking video series and I have trawled Answerhub and the UE forums looking for answers for days.
Most state that LAN, direct connect to IP via the internet and/or session generation and connection via the internet are possible in blueprints. I have followed two tutorials, the first is for direct ip connect via both online and LAN. The second is for session generation and connection for online and LAN.

The first will let me connect to localhost on the same computer, but will not let me connect to localhost nor direct ip on another computer, both on LAN and online.
The second, session based project, lets me find and connect to a session via LAN but not online on another computer, i have now downloaded the Multiplayershootout and it works on LAN but not online also.

I have forwarded port 7777 on my router and made incoming rules for the same port on windows firewall. Doing so changed the port scan result on whatsmyip.org from ‘timed out’ to ‘port closed’. I have tried all these things in combination to disabling both my computer firewall and the router firewall.
I am at an absolute loss as what to do and fear i can not continue my project until i figure this out. I would very much appreciate if someone could please help me with this, thank you so very much.

As far as I understand, most ISPs close incoming ports by default. Opening these ports on your computer will not allow incoming traffic if the ISP blocks them.

Unless you have an internet connection, usually classified as a business connection and much more expensive than a standard home connection, that permits incoming ports to be opened, I believe that you will not be able to host a server on your local machine.

I suspect that you will have to host your game on a commercial site in order to connect to it.

I run my dedicated server on another machine on my network and can connect to it without difficulty (as long as both client and server are built properly.) However, I connect the client directly to the server and do not use sessions.

Thank you very much for the reply.

Just to clarify, is that to say that i cannot then, open a map as a listen server on my computer and then have someone connect to that map by typing in my IP, via console command? without a dedicated server and/or outside host provider?

I am also unable to do this on two computers on the same network.

You should be able to connect via IP. Starting the Server with “?listen” and using “open IPADDRESS” should work, as long as your ports are open.
Locally, this can be tested with “open 127.0.0.1”.

You might want to check out my Network Compendium for more Multiplayer Information: http://cedric.bnslv.de/unreal-engine-4-network-compendium-released/ (:

Personally, the only way I can ever successfully host a session over IP is if the other player tries to connect to me (Does not work), and then I try to connect to them (Does not work), and then they try to connect to me once more (Does work). This has been the pattern for the last 6 months in order for me to connect over IP. Everything is opened up on my end, but for whatever reason, it acts that way.

Thank you both very much for your replies. :slight_smile:

I have run a simple test, firstly by making a thirdpersonexample project for 4.12.

Made a new blank level as default at startup.
Tried local host test in Editor, works.
Packaged project and put a copy onto my other home networked computer, successfully opened a listen server on computer no.1 and connected with the computer no.2 and vice versa.

Tried connecting computer no.2 to computer no.1s’ listen server via computer no.1s’ public IP, did not work.

Then i disconnected the second computer from the home network and tethered it to my phone network. Opened up a listen server on computer no.1 and tried to connect from computer no.2 via computer no.1s’ public IP, did not work.

I have forwarded port 7777 on my router, and put an incoming rule on windows firewall.

i have also tried do combinations of all of the above with each computers firewall turned off.
Still no result.

Yeah, that’s the mean thing about Routers, Firewalls and Ports.

I have the same problem, where sometimes it works and sometimes it doesn’t. For normal gaming (not game dev related) I often chose to join friends, cause I can’t host most of the time.
You could try it with Hamachi/Tunngle, but that, in the end, is still only LAN.

Do you have a friend, who can 100% host other games in the past and might be able to host your game, just to make sure it works over internet?

Yeah I’ve seen that these are common problems, i did get LAN up and running so that should be sufficient for the mean time to set up and test basic frameworks.

I’ve already looked at steam integration and some open source NAT punchthrough options and will consider those later down the track.

No unfortunately i don’t, but considering that everyone everywhere I’ve seen says that it does work by default within Unreal i will mark it as given, and will keep futzing with my settings to see if i can get it running.

Thanks for your reply.

As far as I am aware (and based off my recent conversations with Pirate), Unreal only provides LAN sessions finding over your network. You will have to program a master server to find games outside of your network or use steam.

This is correct. LAN is build-in, Sessions over Internet need a Master Server (which Steam, for example, provides).
When steam is active, the normal Session functions can easily be used with the same setting, just switching to Internet instead of LAN
and maybe using Presence as a ListenHost.

I have the same general issue, Lan works but not sure what the next step is to get internet working. Sounds like any option other then Steam is going to be pretty technically intensive. Is being “green lit” or having an active product available on the steam store necessary for using the steam Master Server? Or can any game with the proper online subsystem set up use their Master Server? Are there any other “Master Server” services aside from Steam? It seems like their would be a couple options on the table for that type of thing these days.

Thanks

I hope you don’t mind me asking for clarification. But first, I’ll describe my scenario as best as possible.

I have a dedicated server (OnlineSubsystemNull) set up on a home server separate from 2 PCs (on the same network but the goal is to connect from internet) and try to join the 2 clients in a session. Everything is compiled correctly and all ports/firewalls are open on port 8080. All player info is stored on the DS. Both clients can connect to the DS and they can see each other as available. Player 1 hosts a session and the goal is to have player 2 join. Other players will be looking for and joining other matches. Currently, when player 2 joins a session he/she does not see Player 1 once he/she gets to the match (this is my issue).

Are you saying this would only work if a Master Server joins them? If so, how is that method done? Should a 2nd DS be running, open to the match level and than both players move to that DS instance? Other players would join a 3rd DS for a 2nd match? I hope I am asking this correctly. In this scenario, LAN is disabled, yes? Once the match is over both players travel back to DS 1 to look for other matches. In this setup are the UE Create/Join/Find session nodes still used as well? It also sounds like game info would have to be loaded from a save game and not passed via the Game Instance.

If this is completely off track, please straighten me out. I do not wish to use Steam nor have a player be host on their machine.

Thanks so much,

Nick

A MasterServer (MS) is not an actual Gameserver. A MasterServer is a server with a Databank, that stores the IPs of running Dedicated Servers and tells everyone who needs to, which Servers are available.

It simply stores a “ServerList” and gives these to Clients. That’s normally done via HTTPRequests, with a MySQL Database.

Steam already gives you this MasterServer, but UE4 Dedicated Servers and Steam won’t work without applying a fix, which is currently only available if you PullRequest it from GitHub into
a custom Source.

Without a MasterServer, you can’t find Sessions online. There is no point at which the Server IPs are stored and no point where Clients could ask for the IPs.

So if you have SubsystenNULL and you don’t use LAN, you should not be able to find the Server.

If, however, you find the Server, it’s mostly due to you still being in the same network as your DedicatedServer.

If a Player hosts a Server, it’s not a DedicatedServer anymore. Then it’s a ListenServer, because the Client is also the Server.
This also only works with a MasterServer. Here, Steam works though, as registering a ListenServer seems to work as expected.

But again, with SubsystemNULL, you can’t find online matches until you implement your own MasterServer.

If you join another Player and you can’t see him, then you have replication problems, which are not a topic of Sessions/Servers/Steam.

eXi,
Thanks but I use Master Server plugin to locate IPs. So, is the method I described appropriate (Do they travel together to a 2nd DS instance to play the match)?
Thanks,

Nick

Weird. I just package my game with a 2nd player spawn location and create two shortcuts, one named server, and the other named client.

The server shortcut just has the ?listen command while the other has the server computer’s IP in the shortcut targets.

I don’t really get what you need the second DS for.

Both Players start their game. Somewhere on the world, someone hosted a Dedicated Server. That Server enters itself into the MasterServer IP list.

The two Players, not yet connected, go to their ServerList and retrieve the MasterServer IP list. They get the IP of the DS (and multiple other information).
They ClientTravel to it (guess just open IPADDRESS as console command is enough).

They can play.

If they can’t see each other at that point, it’s, as already said, most likely a replication error.

That is a Listen Server approach and has nothing to do with Dedicated Servers.

The “Server Shortcut with ?listen” is basically a Client who is also the Server.

I failed to mention that players connect to the DS to get their info and make changes prior to a match (this is working).
How would players 3 & 4 be able to play a separate match by themselves while 1 & 2 are playing?
Thank you for your time. I’ve spent a lot of time trying to arrive at this answer.

Every separated match needs its own Dedicated Server, as Servers in UE4 can only hold one World afaik.

If you have them connect to a Server to make changes and then have the same players play a match, you can simply call “ServerTravel NewMap”
on that first DedicatedServer. No need to switch the whole Server if you can switch the level.

A second pair of players still need their own Server though.