# Connecting multiple clients on a Dedicated Server

**URL:** <https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, dedicated-server, client, Replication, connection, unreal-engine, question\
**Created:** [June 3, 2014, 11:12am UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857 "2014-06-03T11:12:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_eaca42a0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eaca42a0](https://forums.unrealengine.com/u/anonymous_user_eaca42a0)\
**Post date:** [June 3, 2014, 11:12am UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/1 "2014-06-03T11:12:19Z")

</div>

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:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

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:

![](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

The second one fails:

 ![7621-client2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/5/ef56965cf900b4cb9596bd93be692d4a8635746f.jpeg)

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eaca42a0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eaca42a0](https://forums.unrealengine.com/u/anonymous_user_eaca42a0)\
**Post date:** [June 3, 2014, 11:15am UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/2 "2014-06-03T11:15:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_53648559](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_53648559](https://forums.unrealengine.com/u/anonymous_user_53648559)\
**Post date:** [June 5, 2014, 11:00pm UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/3 "2014-06-05T23:00:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eaca42a0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eaca42a0](https://forums.unrealengine.com/u/anonymous_user_eaca42a0)\
**Post date:** [June 5, 2014, 11:30pm UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/4 "2014-06-05T23:30:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ad3ViLl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ad3ViLl](https://forums.unrealengine.com/u/Ad3ViLl)\
**Post date:** [June 16, 2014, 4:26pm UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/5 "2014-06-16T16:26:12Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0eab2342](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0eab2342](https://forums.unrealengine.com/u/anonymous_user_0eab2342)\
**Post date:** [July 7, 2014, 4:48pm UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/6 "2014-07-07T16:48:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AlwysAnrchy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlwysAnrchy](https://forums.unrealengine.com/u/AlwysAnrchy)\
**Post date:** [April 3, 2015, 6:27pm UTC](https://forums.unrealengine.com/t/connecting-multiple-clients-on-a-dedicated-server/284857/7 "2015-04-03T18:27:18Z")

</div>

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!
