none
Server 2012 R2 RDS sessions keep disconnecting RRS feed

  • Question

  • Hi there

    Having issues with an RDS connection to a new 2012 R2 Server, fully updated, issue occurs to all Clients simultaneously. Sometimes brief disconnection (2 - 3 seconds) sometimes a lot longer.

    Already performed the "keep alive=1" group policy hack but still happening.

    Event ID40 reason codes 0 and 5 mainly - yet my licensing all checks out OK? I have 50 RDS cals but only 7 users - Ive split them into 25 per device and 25 per user to see if it makes any difference (No)

    However The License diagnoser  states that ZERO licenses have been issued? Is this a problem? Too much of a Noob to know myself.

    many thanks

    Friday, December 6, 2019 12:58 AM

All replies

  • HI
    1.Event ID40 yet my licensing all checks out OK?
    Event ID 40 — Terminal Services License Server Activation
    https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc775211(v=ws.10)?redirectedfrom=MSDN

    2."However The License diagnoser  states that ZERO licenses have been issued?"
    2.1can we go to RD licensing manager then look the total licenses ,available license ,issued license data for both rds per deive cal and rds per user cal?
    could you post a picture without private information(include domain name ,password etc)

    2.2are you using RDS W2012r2 in workgroup environment or domain environment ?

    2.3are your session host server and RDlicensing server in the same AD domain ?

    3.did you install RDsession host role and RDLicensing role on the same  W2012R2 ?

    4.is there other session host connected RDLS server can work fine  ?

    5.if you try to disable firewall temporarily on both RDSH and RDLS ,will the problem persist ?
     




    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Friday, December 6, 2019 10:00 AM
    Moderator
  • Thanks for the reply Andy and sorry for the delay in responding

    This was because I had thought I had resolved this - There was a small yellow exclamation mark in the licensing manager stating that the licensing server hadn't been added as a use in group policy - I ran through the wizard it gave and I now have a green "tick" and its now issuing licenses to the RDP users.

    However I'm still getting disconnects - actually longer gaps between disconnects (that's why I thought id cured it!)

    This is from the event log

    

    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> 

    - <System> 

    <Provider Name="Microsoft-Windows-TerminalServices-LocalSessionManager" Guid="{5D896912-022D-40AA-A3A8-XXXXXXXXXXXX}" /> 

    <EventID>40</EventID> 

    <Version>0</Version> 

    <Level>4</Level> 

    <Task>0</Task> 

    <Opcode>0</Opcode> 

    <Keywords>0x1000000000000000</Keywords> 

    <TimeCreated SystemTime="2019-12-09T10:36:46.198099300Z" /> 

    <EventRecordID>4940</EventRecordID> 

    <Correlation ActivityID="{F420E840-1B2A-4052-B6DC-XXXXXXXXXXXX}" /> 

    <Execution ProcessID="692" ThreadID="12932" /> 

    <Channel>Microsoft-Windows-TerminalServices-LocalSessionManager/Operational</Channel> 

    <Computer>WIN-SERVERXXXXXXXXXXXXXXXX</Computer> 

    <Security UserID="S-1-5-18" /> 

    </System> 

    - <UserData> 

    - <EventXML xmlns="Event_NS"> 

    <Session>3</Session> 

    <Reason>5</Reason> 

    </EventXML> 

    </UserData> 

    </Event>

    XXXXX's for security!

    Using AD with domain but all on same Server (cost restriction).

    I can't understand why this still points to licensing when Licensing Diagnoser states no issues?

    many thanks

    Monday, December 9, 2019 10:51 AM
  • Hi Andy

    I followed your guide in Step 1 above - as although it was issuing licenses ok now it was still disconnecting with the same error.

    After removing and re-installing RD Licensing - re-activating the server, and using the retail CALS to re-activate the license keys and re-build the database I now have:

    2 sets of per user and per device listings per server, 1 for the original CALS and one set for the new CALS. And its no longer issuing licenses?

    Tuesday, December 10, 2019 12:51 AM
  • HI
    5."Using AD with domain but all on same Server (cost restriction)."
    Do you mean you install RD Session host role ,RDlicensing role and ADDS role on this AD Domain control server ?

    6."2 sets of per user and per device listings per server, 1 for the original CALS and one set for the new CALS. And its no longer issuing licenses?"
    do you mean there are rds per user cal and rds per device cal install RDLS server ?
    6.1could you please detail explain your rds environment ?
    (it will help me to know your environment)
    6.2how many session host servers in your environment ?
    6.3 did you use below local policy to specify your rdls server and  specify per device cal or per user cal
    but on one RDSH server ,we can only specify either 
    per device cal or per user cal.

    Computer Configuration - Policies - Administrative Templates - Windows Components - Remote Desktop Services - Remote Desktop Session Host - Licensing

    use the specified remote desktoop license servers  enable specify your rdls server

    set the remote desktop licensing mode              enable per device


    7.we can use below link method to verify your technet forum account so that we can post picture and website link.
    https://social.technet.microsoft.com/Forums/en-US/5c00b9a9-3afe-4ee9-bbf0-34157716b92a/verify-my-account?forum=reportabug


    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, December 10, 2019 9:19 AM
    Moderator
  • Hi Andy - this is a fairly simple setup only 7 RDS users (external) everything on one physical Server

    1. YES 

    RD Session host role ,RDlicensing role and ADDS role on this AD Domain control server

    6. see image - my "old" CALS (40+10) still showing after removing licensing role and re-adding?

    6.1 6.2 yes just one instance of everything on 1 server

    6.3 I tried using local policy to specify per user/per device yes made no difference

    basically before I did this:

    https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc775211(v=ws.10)?redirectedfrom=MSDN

    It WAS issuing CALS but it was still randomly disconnecting which was my initial problems now its doing both

    Thanks Richard

    Tuesday, December 10, 2019 10:43 AM
  • HI
    8.have you done below things?
    The computer account for the license server must be a member of the Terminal Server License Servers group in AD DS. If the license server is installed on a domain controller, the Network Service account must also be a member of the Terminal Server License Servers group"
    https://support.microsoft.com/en-us/help/2473823/best-practices-for-setting-up-remote-desktop-licensing-terminal-server

    9."see image - my "old" CALS (40+10) still showing after removing licensing role and re-adding?"
    yes.I see.do you mean there are only total 50 w2012 rds cals on w2012 DC? are all orignial 50 rds cals per user or per device ? 
     although you have split 50 rds cals to 25 per user rds cals and 25 per deive cals .
    we can only use one rds cal mode per device or per user.for your rd license diagnoser,you are using rds per user mode.so if the user remote access this Domain Control(rdsh),it will only comsume rds per user cals.

    10."
    Sometimes brief disconnection (2 - 3 seconds) sometimes a lot longer "
    10.1if you enable below policy on session host server ,will the problem persist ?
    Computer Configuration - Policies - Administrative Templates - Windows Components - Remote Desktop Services - Remote Desktop Session Host - connections automatic reconnection
    10.2 did this issue happen when end user remote access DC in internal network ?


    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wednesday, December 11, 2019 6:06 AM
    Moderator
  • Hi Andy

    8. seems to be ok?

    9. I managed to remove the instance of the OLD cals and start afresh - now with just the 50 per users as attached

    10. This wasn't set, so I have set this, but the connections do reconnect before I did tis?

    10.2 only internal network exists for set up purposes - everyone connects via internet - but when I go and connect via LAN never seenm to have any issues

    It seems issue now is it will not issue CALS to users. many thanks

    Wednesday, December 11, 2019 7:26 AM
  • HI
    11.is this DC with full FSMO ?
    12.did end user run vpn then remote access this RDSH(domain control) ?

    13.can you check if RDSH port and RDLS port is open and listening ?

    https://social.technet.microsoft.com/wiki/contents/articles/16164.rds-2012-which-ports-are-used-during-deployment.aspx

    14.if we reset grace period on this domain control,will RDLS issue cal to end domain account rds cal  ?
    How To Reset 120 Day Grace Period on 2012 R2 Server RDS – The Steps
    https://www.vladan.fr/how-to-reset-120-day-rds-grace-period-on-2012-r2-server/


    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 11, 2019 11:33 AM
    Moderator
  • Hi again Andy

    11. sorry my knowledge is limited I don't know what this is - I googled it however, and I THINK it has full FSMO

    12 end users did not run VPN first, just straight in RDP

    13. again I don't really know what I'm looking for but I have researched and believe the ports needed are listening - I have a text copy but do not want to post it of course.

    14. done this makes no difference

    many thanks for your continued help Andy

    Thursday, December 12, 2019 12:10 AM
  • HI
    15.i review above posted information,now we have 2 issue:(1)rdls not issue license (2)session keep disconnect
    have you set below policy
    Computer Configuration - Policies - Administrative Templates - Windows Components - Remote Desktop Services - Remote Desktop Session Host - Licensing
    use the specified remote desktoop license servers  enable specify your rdls server(ip address of this rdlicense server)
    set the remote desktop licensing mode              enable per user
      
    16.run below command in command prompt on both rdsh server and rdls server ,I think we can run it on DC ,because rdls and rdsh installed on the same Domain controller server.then check if connection is established .

    netstart -ano |find "135"
    10.209.13.3 is rdls and is also rdsh.


    17.if we create a new domain user account then use this new domain account to remote access from internal win10 computer to this issue RDSH(domain controller server),will rds per user cal issue to this new AD account.

    18."10.2 only internal network exists for set up purposes - everyone connects via internet - but when I go and connect via LAN never seem to have any issues"
    do you mean (1)when end user's computer and session host in the same interal network ,there are no session disconnect issue.(2)when end user's computer in external network and session host in interal network ,there is session disconnect issue.

    19.what's your hardware 
    parameter of DC server ?


    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Monday, December 16, 2019 6:58 AM
    Moderator
  • HI
    Is there any progress on your question?

    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 25, 2019 9:49 AM
    Moderator
  • HI
    Is there anything to help you?

    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, December 30, 2019 9:02 AM
    Moderator
  • HI
    Happy New Year!
    Have you solved your issue?

    Best Regards
    Andy YOU
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Tuesday, January 7, 2020 1:58 AM
    Moderator