Welcome to Microsoft Q&A Forum!
Based on your description, the behavior you described strongly suggests that the server is running as a Remote Desktop Session Host (RDSH) without a properly configured and licensed Remote Desktop Licensing Server.
When the Remote Desktop Session Host role is installed, Windows Server provides a 120-day licensing grace period. During this period, users can connect without RDS CALs. After the grace period expires, the Session Host must contact a valid RD Licensing Server and obtain the appropriate RDS CALs. If licensing is not configured correctly, new RDP connections may fail with various client-side errors, including generic messages such as: "RDP negotiate connection failed. Please check Service port or server config."
Restarting the server or the Remote Desktop Services service may temporarily restore connectivity, but it does not resolve the underlying licensing issue, causing the problem to reappear later. I would like to share some useful information to help you understand.
1.Verify whether this is an RDS licensing issue
On the affected server:
- Open Server Manager > Tools > Remote Desktop Licensing Diagnoser.
- Check for licensing-related warnings or errors.
Then, please kindly check the below:
- An RD Licensing Server is configured.
- The server can contact the licensing server.
- The licensing mode (Per User or Per Device) matches the installed CAL type.
- The licensing grace period has not expired.
Moreover, you can also run by PowerShell to verify the configured license server and licensing mode.
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()
$obj.LicensingType
Reference__:__ Guidance for troubleshooting RDS Licensing - Windows Server | Microsoft Learn
2.Other permanent solution
Configure a valid RD Licensing Server and install the required RDS CALs:
- Install the Remote Desktop Licensing role.
- Activate the RD Licensing Server.
- Purchase and install the appropriate Windows Server 2019 RDS CALs (Per User or Per Device).
- Configure the Session Host to use the license server.
- Set the licensing mode to match the installed CAL type
Reference: Activate the Remote Desktop Services license server | Microsoft Learn
3.How to acquire Remote Desktop CALs
RDS CALs are purchased separately from Windows Server licenses. They can be obtained through:
- Microsoft Volume Licensing
- CSP (Cloud Solution Provider) partners
- Authorized Microsoft resellers
After purchase, install the CALs using Remote Desktop Licensing Manager and the license code or agreement number provided by your licensing provider.
Reference: Install Remote Desktop Services client access licenses | Microsoft Learn
License Remote Desktop Services with Client Access Licenses (CALs) | Microsoft Learn
Additional note: If the server is being used only for administrative purposes (the default two concurrent Remote Administration sessions) and the Remote Desktop Session Host role is not installed, RDS CALs are not required. In that case, further investigation of Event Viewer logs and RDP configuration would be needed because the issue is unlikely to be related to RDS licensing.
I hope this information is helpful and thank you for choosing Microsoft Q&A to raise your concern.