Connecting multiple clients on a Dedicated Server

Hi everyone!

I’m currently working on a Game that needs to be builded for a Multiplayer use.

I’ve followed this tutorial to setup and build correctly a Dedicated Server:

So right now I’ve a Packed Client and Dedicated Server that works very fine in lan and even over ip.

The problem is that I can’t connect more than one Client in my server. What happen is this:

The first Client Connects without any problem:

The second one fails:

Please help me to understand what’s the problem and how to fix it :slight_smile:

I do not know why but my question was pulled 5 times, and I don’t see any tool to delete the other questions,

Please refer this as the main post.

I’m sorry if I did something wrong

What appears to be happening looking at the logs, is the server received an unexpected packet while the second client was logging in. Are you doing anything out of the ordinary or using stock code here?

I absolutely didn’t anything out of the ordinary since I don’t even know where to look to manage the login access and communication data between a Server and Client. As I wrote before I just followed that tutorial to build with visual studio a dedicated server .exe and put in the packaged development game.

Hey Guys.

I’m getting the exact same error. I’m trying to move my pawn on the client and synchronizing all the clients & server but making use of a (NetMulticast) function. However the client doesn’t load and I’m using a Listen Server.

UFUNCTION(NetMulticast, Reliable)
		void MoveForward(float Value);

void ABasePlayerClass::MoveForward_Implementation(float Value)
{
	if (Controller && Value != 0.0f)
	{
		AddMovementInput(FRotationMatrix(Controller->GetControlRotation()).GetScaledAxis(EAxis::X), Value);
	}
}

Having a look at your code, I see you are also using a Multicast function, maybe there something wrong there ?

We had this exact same problem, and like the other answer here the cause was a NetMulticast RPC getting spammed by the server to a client while it was connecting. Changing the RPC to a replicated variable instead fixed the issue entirely (in our case there was no real reason for it to be an RPC anyway).

I guess that technically this is a bug in UE4, but it’s not impossible to work around it. That is, unless sending any NetMulticast RPC while a client is connecting causes the problem (rather than just spamming one), in which case it could cause some nasty seemingly random connection failures.

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes. If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar error, that is not 100% related, could you please submit a new report for it.

Thanks!