random RDS licensing issues

oikjn

Ars Scholae Palatinae
1,015
Subscriptor++
I'm setting up an RDS platform and have run into some strange issues I cannot resolve and could use some help.

My setup includes one server that is acting as RD-web access, RD Gateway, RD Licensing, and RD Connection Broker and is running Windows 2022. Lets call it rds.internal.contoso.com

I have setup one other server that is Windows 2019 and acting as an RD Session Host and is publishing a specific remoteApp program. lets call this rds-host.internal.contoso.com


Everything appears to be working normal, but at random, I (or another person testing the system) will see a popup on the app saying "Remote Desktop License Issue... you will be disconnected in 60 minutes.". After 60 minutes, the disconnection does happen. The only error I see is on the rds-host server and it is 50283 - "The Remote Desktop Session Host server could not contact the remote desktop license server rds.intneral.contoso.com. Ensure that the remote Desktop Licensing service is running on the license server, that the license servicer is accepting network requrest, and that the license server is registered in WINS and DNS."

I don't have WINS setup, but the rds.internal.contoso.com name resolves correctly and hasn't changed. I verified that the service is running on the rds.internal.contoso.com computer and that rds-host can ping it. The licensing diagnostics app doesn't show any issue and shows the correct licenses available and checked out when viewed through the rds-host computer even as a user is experiencing the issue.


The only thing I've noticed is that the one person who seems to have more of an issue with this is trying to run the application over a VPN connection, but I wouldn't think that matters since I thought the licensing is only talking rds-host to rds.internal.contoso.com and I've maintained open remoteapps and kept them alive without warnings for days at the same time the other user gets kicked out.
 

oikjn

Ars Scholae Palatinae
1,015
Subscriptor++
I was thinking something with the VPN too for a bit. Forgot to update that at least one of the problem users that I've been able to find with a licensing issue on login is local.


restarting the licensing server or gateway server didn't help with resolving it with that local user, but I didn't want to restart the rds-host computer with someone else on and potentially doing their own testing work.
 

JakeS1

Smack-Fu Master, in training
2
@oikjn Did you ever get this resolved? I have the same issue with a similar setup. I have 2 RDWeb/RDGw servers load-balanced via NLB, RDCB and RD Licensing is on one of those servers. Then I have an RD Session host separately. We use User Profile Disks

I never had this issue until I migrated the session host behind a Palo Alto firewall. I have 0 denies in the firewall, it works the vast majority of the time but periodically has the issue and it seems to plague one specific user the most (small test environment, 3 normal users over 3 weeks and 1 user has had it 1x, user 2 0x, and this one at least 10x but has gone 8 days without the issue).

TerminalServices-RemoteConnectionManager\Admin
Warning, Event ID 50283
The Remote Desktop Session Host server could not contact the Remote Desktop license server WS01.XNI.local. Ensure that the Remote Desktop Licensing service is running on the license server, that the license server is accepting network requests, and that the license server is registered in WINS and DNS.

I've also noticed that the above message coincides with this message in teh same section but operational log (however, this comes up with a blank user and domain at other times too):

TerminalServices-RemoteConnectionManager\Operational
Warning, Event ID 1149
Remote Desktop Services: User authentication succeeded:

User:
Domain:
Source Network Address: <GatewayIP>


Changes today I'm waiting on results for:
Right now I'm testing with a ton of extra allows in the firewall as catches to see if it helps. The main rule was only allowing the app ms-rpc. Now I've expanded catch rules to allow netbios apps and smb, then rules to include just ports (no app-id). As another shot in the dark I reset the user's profile, the fact it is only consistent with her, I figured it was worth a shot.

Additional unique item for this user is that they are not part of an Azure AD that the session host is setup with SSO to using PRTs. So their logon has a timeout delay for the second factor auth to start. This just occurred to me as what might be my bigger issue (granted this never happened until it was moved behind the firewall)
 

oikjn

Ars Scholae Palatinae
1,015
Subscriptor++
Well... its "fixed" in that I don't have people complaining about it and haven't personally noticed it hit my in a long time. I can't say what changed that solved the issue :unsure: . We have a full fabric Fortinet solution here and inter-VLAN traffic all goes through the firewall and I'm ultimately chalking it up to something Fortinet was doing, but I can't say what I specifically changed that resolved the issue other than I feel like Fortinet firmware updates between the firewall and the switches are constantly simultaneously breaking and fixing things.
 

Paladin

Ars Legatus Legionis
33,854
Subscriptor
Yikes, with a setup where you have a complex firewall (intervlan filtering) I would generally stay away from firmware updating unless it mentions a specific fix you want/need like a security issue or a problem you have actually experienced. It's easy enough to revert... sometimes... but then sometimes it also isn't. :(

Glad you got it seemingly fixed though.

For switches, I would just never update them unless I know it addresses an issue I am concerned about, but then my switches are almost all very basic Cisco Catalyst and Nexus switches with nothing much going on that would need updates (isolated management network, limited features in use, etc.). I update switch firmware maybe once a year at most.
 

JakeS1

Smack-Fu Master, in training
2
@oikjn Thanks for the reply. The things I tried, mentioned above, did not help. My next step is syncing her user to the Azure domain for the sole purpose of getting rid of the Duo prompt delay. I'm wondering if the delay on secondary auth is the cause of her issue. If I could re-produce it at will, a simple capture would likely save me but unfortunately, like with your situation, it's just random seeming.

@Paladin I'd be careful not segmenting internally with a firewall and holding off on firmware updates. There are zero day bugs seemingly all the time these days. I've worked with a lot of companies that have been pen tested and it's scary how a small foothold can easily expand. On your Nexus switches, check your firmware as they had a nasty zero day in the last year or so.
 

Paladin

Ars Legatus Legionis
33,854
Subscriptor
Yeah there was the Nexus Dashboard vulnerability and a Nexus API vulnerability (crash DDoS I think) but I don't use either of those for my stuff and like I said, the management network where that stuff might ever be accessible is isolated so if a bad actor has access there, a crash on a switch is not my first concern. ;) But yeah, like I said, if there is a big security concern like the ASA and FTD things that were released recently or the PulseSecure VPN thing and some other recent big news updates/patches, I would definitely update, but not enough to where I would 'constantly feel like things were breaking due to updates'. There is a pretty clear line between updating because you know it addresses an issue you have experienced or you know you don't want to experience, vs. updating just because the release number went up again. ;)
 

oikjn

Ars Scholae Palatinae
1,015
Subscriptor++
@JakeS1 Mine was happening to all users when it was going on. Presumably, if you have one specific user that is "the problem", I assume you are looking at what is different about that user. If user2 never has a problem, can the problem user account log in from that same computer and see if the problem follows the user account or if it follows the hardware/connection location?

@Paladin We are generally try and join the latest release for feature capabilities, but wait to join until it is on patch 3+ of that major release. We aren't "that" big... a touch shy of 400 devices. The single pane of glass to see firewall + switch devices and traffic is really nice when it is working. Unfortunately, Fortinet QA appears to consistently try and model itself off of Mid-2000's Microsoft. I won't go into the full rant on that subject here other to say that it is oh so nice when it is working, but such a nightmare when it breaks. For us, the man thing keeping us in is the vision and insight it is capable of and ease of network management, but if I can ever get radius+automatic VLAN assignment working, I'll be more comfortable losing that single pane view we have [most of the time] right now.