Broker redirect to a RDSH in Drain Mode - TS Farm 2019

Michael Schulte 1 Reputation point
2020-09-28T13:30:51.187+00:00

We have a Farm with 3 Collections (2 Sessions Hosts per Collection)
We have a dedicated Connection Broker (not HA)
All Clients connect with the the correct Load Balancing Info(TSV Value) in the RDP File to the broker

Internaly all works fine.
Load Balancing works and redirect new connection over both hosts in a collection.
If we put Server A in Drain Mode (New connections disabled) all new connection will be redirected to the other Host B.
We can see in the Logfiles, that Server A is in Drain mode
Also we can see in Logfiles, that a new connection is redirected to Host B

Same procedure from remote:
We use a SSL VPN with a rdp Bookmark configured with the loadbalancing info to the broker
All works fine if no Host is in Drain Mode
Load Balancing works and redirect new connection over both hosts in a collection.

Problem Example:
User is connected to Host A.
Logout the user
If we put Host A in Drain Mode now (New connections disabled), a new connection will still be redirected to Host A.
The connection will not be connected.
We can see in the Logfiles, that Server A is in Drain mode
We can see in the Logfiles, that the Client connected with the the right LoadBalancingInfo (TSV)
In logfiles you can see that no existing session was found, so that is not the Problem for a connection to HostA.
Also we can see in Logfiles, that this new connection is still redirected to Host A.
Also, after 5 Minutes we can see in the logfile that a connection was not successfull - but no more Errors for troubleshooting

Why is the broker redirecting to Host A (Host A is in Drain Mode !)
How can we troubleshoot this deeper ?
What is the detailed process ?
I think, user will connect to a selection, user calls the broker. Broker searches for disconnected sessions - if nothing found, broker uses redirection to send client to a RDSH for a new session.
And where in this process is the search for drained RDSH ????

thank you very much

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,240 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Karlie Weng 14,031 Reputation points Microsoft Vendor
    2020-09-29T06:57:01.977+00:00

    Hey @Michael Schulte

    May I know the user mstsc to RDSH DNS farm name or RDCB name ?

    29016-image.png

    How about using Set-RDSessionHost to change allow new connections, in an admin powershell prompt:

    Import-Module RemoteDesktop
    Set-RDSessionHost -SessionHost "rdsh01.domain.com" -NewConnectionAllowed No -ConnectionBroker "broker.domain.com"
    Set-RDSessionHost -SessionHost "rdsh02.domain.com" -NewConnectionAllowed Yes -ConnectionBroker "broker.domain.com"

    Please check is there any more event logs related to the problem:
    29053-image.png

    Also if the issue is with connection broke, please find more details from the event viewer on CB:
    29017-image.png

    A similar thread for your reference:
    https://social.technet.microsoft.com/Forums/ie/en-US/dd6b8053-812a-456e-8d19-61099aa84d22/rd-session-host-redirection-in-drain-mode?forum=winserverTS

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards
    Karlie

    0 comments No comments

  2. Michael Schulte 1 Reputation point
    2020-09-30T12:37:10.093+00:00

    user use mstsc with RDCB name

    Set-RDSessionHost to change allow new connections, in an admin powershell prompt will have same results

    in logfiles there is all normal, you can see the request and you can see that RDCB will redirect to the host that is in drain mode - no errors there

    best regards
    Michael