RemoteApp session sent to wrong collection

I have a 2012 R2 RemoteApp environment with the following servers:

Server1 - Session host, internal web gateway, connection broker (HA configured)

Server2 - Session host, internal web gateway, connection broker (HA configured)

Server3 - Session host

Server4 - External web gateway (published to web on port 443)

Server5 - External web gateway (one should always have redundancy right?)

Servers 1,2,3 are all in a single RDSH collection, lets call it RemoteApps. All apps work properly from the inside and outside through all connection methods from desktop RDC clients to web interface to iOS and Android devices. (this still seems like magic to me)

Now let me introduce our new friend Server6. Server6 is just session host. It has been added to a new collection, lets call it AdminDesktop. Server6 has exactly the same programs installed as Servers 1,2,3 but is in a new collection so I can access the full desktop remotely from my tablet when I travel. It is also there so I can isolate it and any work done on it will not effect the production sessions on Servers 1,2,3.

Server6 rarely gets attention. Most of my connections to the published AdminDesktop service are instead directed to one of the application session servers (1,2,3). Since they are all identical I have to check every time I connect to make sure I'm not on a production server before I begin working.

The reverse situation never happens. If I launch an individual application I am always 100% of the time directed to one of the proper RemoteApps collection servers (1,2,3).

I have verified all servers are in the proper AD RDS groups, and my gateway policy has been setup (for testing purposes) to allow me to access any domain computer through the gateway. 

How can I configure this so the AdminDesktop sessions will always go to Server6 in the AdminDesktop collection?

August 26th, 2015 6:29pm

Hi,

1. On the client PC, are you using mstsc.exe 6.3.9600 (RDP 8.1) or later?  If not, please update and then test. 

2. Unrelated to your issue, do you have UDP port 3391 forwarded to your RD Gateway servers to allow UDP support?

3. Have you given your AdminDesktop RemoteApps custom names to avoid confusion?  For example, Admin Word, Admin Excel, etc.  You could put them into a separate folder, however, the non-windows clients don't support folders unless the feature has been added to some of the more recent builds.

Thanks.

-TP

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 7:24pm

The issue exists from clients with the latest mstsc.exe version including the 6.3.9600.17415 build and iOS, Mac OS X and Android clients.

The port UDP 3391 is open to the gateway servers to allow the redirected 3389 connection.

The AdminDesktop collection does not have any applications published, that way it shows up in the web interface as a remote desktop connection instead of just individual applications. Once you publish an application within a collection the full desktop option is removed as an available application. When I connect, most of the time in Server Manager my connection is listed as being on the RemoteApps collection instead.

August 26th, 2015 9:31pm

Hi,

Please download the .rdp file for the AdminDesktop collection Remote Desktop icon and a .rdp file from one of the RemoteApps.  You may do this by using a non-IE browser such as Firefox or Chrome.  Please open them and compare the loadbalanceinfo line to see if they are both pointing to the same target or not.

Thanks.

-TP

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 9:42pm

loadbalanceinfo is different

The 4 RemoteApp collection items I downloaded point to loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.RemoteApp

So terminal services then the collection name

The AdminDesktop collection item points to loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.Remote_Desktop

terminal services and then not quite the collection name. This makes me wonder though. I had this issue before and the suggestions I got were all to delete and recreate the collection with a new name. The original collection name was Remote Desktop which matches the loadbalanceinfo line, but that collection is non existant now.

August 26th, 2015 9:57pm

Hi,

Okay, that explains it.  Deleting and recreating using a different collection name would probably be the easiest fix.  Please do that and then verify that the new .rdp file contains the corrected information, and as an extra check please verify the information in the registry on all brokers is corrected.

Thanks.

-TP

  • Marked as answer by NoahBelmont Wednesday, August 26, 2015 11:09 PM
  • Unmarked as answer by NoahBelmont Thursday, August 27, 2015 11:02 PM
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:01pm

Hi,

Okay, that explains it.  Deleting and recreating using a different collection name would probably be the easiest fix.  Please do that and then verify that the new .rdp file contains the corrected information, and as an extra check please verify the information in the registry on all brokers is corrected.

Thanks.

-TP

  • Marked as answer by NoahBelmont Wednesday, August 26, 2015 11:09 PM
  • Unmarked as answer by NoahBelmont Thursday, August 27, 2015 11:02 PM
August 26th, 2015 10:01pm

Thank you TP. I'm not sure what you mean by that last bit about making sure the information in the registry is corrected on the brokers. Is there a key I have to delete or modify to accommodate the new collection name?
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:08pm

Hi,

I want you to check as a way to avoid a potential future problem. 

1. On all of your brokers, check under the following registry key:

HKLM\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Terminal Server\ CentralPublishedResources\ PublishedFarms

You should see a separate key for each one of your collections.

2. Delete the problem collection from the Active RD Connection Broker server using Server Manager.

3. Check the registry on all of your broker servers again.  The key for the problem collection should be gone.  If it is not then make a backup of the key and delete it.

4. Create a new collection from the Active broker using Server Manager, name it however you wish.

5. Check the registry on all of your broker servers again.  There should now be a new key corresponding to the new collection you just created.

6. Connect to your RDWeb servers, one at a time and download the .rdp file for your new collection.  Open it using Notepad and verify that it is correct.

7. Test by launching RemoteApps and connecting to the admin desktop to verify that everything is working.

Thanks.

-TP

  • Marked as answer by NoahBelmont Wednesday, August 26, 2015 11:09 PM
  • Unmarked as answer by NoahBelmont Thursday, August 27, 2015 11:02 PM
August 26th, 2015 10:45pm

Hi,

I want you to check as a way to avoid a potential future problem. 

1. On all of your brokers, check under the following registry key:

HKLM\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Terminal Server\ CentralPublishedResources\ PublishedFarms

You should see a separate key for each one of your collections.

2. Delete the problem collection from the Active RD Connection Broker server using Server Manager.

3. Check the registry on all of your broker servers again.  The key for the problem collection should be gone.  If it is not then make a backup of the key and delete it.

4. Create a new collection from the Active broker using Server Manager, name it however you wish.

5. Check the registry on all of your broker servers again.  There should now be a new key corresponding to the new collection you just created.

6. Connect to your RDWeb servers, one at a time and download the .rdp file for your new collection.  Open it using Notepad and verify that it is correct.

7. Test by launching RemoteApps and connecting to the admin desktop to verify that everything is working.

Thanks.

-TP

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:45pm

Thank you very much. I verified the registry key was automatically removed when I delete the collection. The new published collection shows up properly in the registry and three subsequent connections all went to the proper server, which has never happened before this.

August 26th, 2015 11:09pm

Turns out the connection is still not routed properly for internal clients. External clients going through our gateway servers are always directed to the proper collection for the full desktop and internal clients are almost always directed to the wrong collection hosts.
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 11:03pm

Hi,

Please troubleshoot from an internal client in the same way you did above by examining the contents of the .rdp file(s).

Are users making their initial connection to the brokers?  Specifically, when they see the initial prompt upon launching a connection, it should have Remote computer: on it.  The FQDN that it shows for remote computer should point to the brokers.

Thanks.

-TP

August 28th, 2015 3:40pm

Hi,

Please troubleshoot from an internal client in the same way you did above by examining the contents of the .rdp file(s).

Are users making their initial connection to the brokers?  Specifically, when they see the initial prompt upon launching a connection, it should have Remote computer: on it.  The FQDN that it shows for remote computer should point to the brokers.

Thanks.

-TP

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 7:37pm

The prompt shows the connection broker HA name which matches our certificate. I am now getting routed improperly for both internal and external clients.

The .rdp files have the following fields filled in with our RDCBHA name:

full address, gatewayhostname, alternate full address

September 9th, 2015 5:32pm

Hi,

What does each .rdp file have for loadbalanceinfo ?

On your brokers, please check the TerminalServices-SessionBroker log for the entries relating to each incoming connection.  Please verify that the correct target is logged for each connection.

Thanks.

-TP

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 1:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics