Ask a questionAsk a question
 

QuestionConnection hangs

  • Friday, October 23, 2009 10:32 AMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    We have a 2008 gateway and are experiencing connection intermittent but regular connection hangs.

    These hangs will usually reconnect after quite considerable time.  Or a user can close their connection (if they can), or just log off local machine, and reconnect ok.  The server and remote desktops experience no problems when accessed from the local subnet.

    There are no event log messages or any other clues why this is happening.  The firewall logs appear ok (although we do have another campus firewall between us and the internet.

    This is so frustrating, especially as access has been fine for months.  The only thing that we have done a few weeks ago is a domain rename, but that appears to have gone fine.

    We are now at the stage when our remote working users are getting extremely fed up (and I don't blame them as I also work from home quite a bit).  I have asked the campus firewall administrators to check whether there are any issues.

    The only other thing I can think to do is to rebuild the server!

    Anybody else got an idea as to what could be causing the problem?

    Regards

     

    Ian

All Replies

  • Friday, October 23, 2009 10:33 AMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I should state that the hangs are when connected to the remote terminal server or some of the other servers that have remote desktop apps set up for them.
  • Tuesday, October 27, 2009 8:15 PMKristin L. GriffinMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ian,

    Lets paint the picture:

    So, you have TS gateway, and remote users connect to the gateway, and then run a full desktop session, or to a remoteapp.  Is that right?

    What exactly does the client experience? 
    Do they get a disconnect message, or are they completely dropped, and have to re-initiate the connection through TS Gateway too?

    In other words, when the hangs occur, I assume the sessions show up as disconnected in TS? do you still see the user connected to TS Gateway? Or did the user's connection get dropped there?

    Could this be after a specific amount of time? That would be easy to test with two users.

    Just curious, what GPO's do you have set for session limits?

    Do you have logging turned on in TS Gateway?


    Hope this helps,

    Kristin L. Griffin

    Co-Author of the Windows Server 2008 Terminal Services Resource Kit (and a SUPER BIG fan of the Microsoft RDV Team!!!) 
  • Tuesday, October 27, 2009 8:39 PMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Kristin

    I've just posted some additional information on the previous thread, but regarding your specific questions.

    Users logon on to the gateway and run a full desktop session which is advertised in the remoteapps pane.  I have also created some additional mstsc.exe remoteapps to other servers too.

    Quite simply, the cliet's experience is that they can no longer do anything in the remote desktop.  The whole desktop hangs, no keyboard or mouse inputs are accepted.  Ctrl, Alt and End produces no response.  If you leave this for a while, it does reconnect, and this reconection can take anything from a few seconds to maybe 5 - 10 minutes.  However, if I minimise the desktop using the - in the remote desktop status bar at the top of the screen, and then right click the icon in the status bar for the local machine once minimised and select close, then it kills the connection.  I can then click the remote desktop in the web gateway, which then connects fine and access to the desktop is where it left off before the hang.

    If I look in TS Manager, I'm sure the connections are still there.

    I have a separate GPO which controls the TS.....Idle Session limit - 1 day, End a disconnected session - 1 day (and a few others...I can list all if required.

    Not sure whether I have logging turned on or not....where is that set and how do I get to the logs?

    Regards

    Ian

     

  • Tuesday, October 27, 2009 10:29 PMKristin L. GriffinMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    TS Gateway auditing is what I meant.  Its in the Properties of TS Gateway Manager, Auditing Tab. But I dont think it will show you much for this issue. But good to turn it on to make sure!

    Also, in event viewer, you can look here for more info: event viewer > App and Serivces Log > Microsoft > Windows > Terminal Services Gateway

    I would definitely look at the firewall. 

    Are the remote users coming from all over? I assume so...so user common pipe problems cannot be it...

    What about the connection from your facility.....are you getting any bounces in the router, any errors there too?

    Oh, and are your users set to have only one session per user?






    Hope this helps,

    Kristin L. Griffin

    Co-Author of the Windows Server 2008 Terminal Services Resource Kit (and a SUPER BIG fan of the Microsoft RDV Team!!!) 
  • Wednesday, October 28, 2009 6:54 AMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Everything is checked for auditing anyway.

    Only the events indicated in other thread.  Plus noticed one for VSS this morning, would that be relevant?

    I have checked our firewall and nothing logged at all

    Campus firewall I have to rely on the University staff to look at!!!!

    Not seen any issues or had anything notified re the router.

    I have set it to one session per user....having said that I'm not sure it is being applied properly as I have noticed more than 1 session per user occasionally.

    Would the registry leak have caused any of the issues as indicated from event logs in previous thread?

    (Note for other people reading this, other thread mentioned is http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/9bf9aefe-a1f0-46c6-91be-7cdbdda29060/ )

    I'm hopefully going to upgrade the TS to R2 today to see if that repairs any potential issues in the server since the domain rename.
  • Wednesday, October 28, 2009 4:33 PMKristin L. GriffinMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ian,

    First, go back in your logs and determine when all this started to happen.  If it correlates to your domain rename timeframe, then at least you know it and can work it from that angle. If this turns out to be the case, then I would open a support case with Microsoft and get it solved.

    Look at this thread to possibly help you with the licensing error: http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/a8bd1444-e5db-4158-acba-cecfcd13aff6/?ffpr=0

    There have been threads about TS Gateway "dropping" sessions, and it turned out to be a firewall setting.  Sound VERY similar to your situation.  I would make this top on my list to check, both at your firewall and the one you are still waiting on:  http://social.technet.microsoft.com/Forums/en/winserverTS/thread/8ec5c33d-7b13-4e89-b117-b9f919771483
    '

    Hope this helps,

    Kristin L. Griffin

    Co-Author of the Windows Server 2008 Terminal Services Resource Kit (and a SUPER BIG fan of the Microsoft RDV Team!!!) 
  • Wednesday, October 28, 2009 5:25 PMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Kristin

    I've upgraded to R2 today, but unfortunately had to leave work before the process had completed.

    I have connected through to the gateway from home, and can get the Web page with my remoteapps etc, but cannot finish the connection to the remoteapps.  Looks like there is a problem with the TS Cap, so I will have to investigate further.

    I will post back further tomorrow once the TS is back up.

    In the meantime I will catch up with your links above.

    Cheers

    Ian
  • Friday, November 06, 2009 12:02 PMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    And that was where the fun really started!

    I opened (still open) a support case with MS regarding these issues.  The authentication issue that occurred only after the upgrade to R2 was solved eventually by adding the Terminal Server (or as is now known in R2 Remote Desktop etc) machine name to the RAS and IAS Servers AD group.

    The next problem that occurred is that we were getting (and still are, MS still working on this) registry leaks when logging off from the RD server.  This manifested itself as a black screen with the RD status bar showing at the top.  The leaks are logged immediately, and connection eventually times out.

    In addition we are still getting some issues with Terminal Services - Licensing : Event id 4105.  This is still occurring for some users even though the licensing is all setup and working correctly (Could there be some legacy issue here in AD concerning certain accounts?)  Some ASP.net warnings are occurring too, not sure how important these are at the moment.

    Concerning the freezing of the RD server by clients accessing it, this is still happening but does not seem as bad.  For example, I have had a couple of instances today where the connection froze for a few seconds one time and about 30 seconds another.  A colleague has reported yesterday that he had similar problems.  Sometimes the little blue "attempting to reconnect" appears. 

    There is no real correlation of any events that I can see in the Event logs, and nothing in the Firewall logs.  I have reported times and events to the campus firewall administrator and he says there is nothing untoward happening with regard to the destination address of our RD server.

    So at present, things appear to be better but not resolved.

    I will post any more information as and when I get it.  In the meantime, if anyone has any suggestions please let me know.

    Cheers

    Ian
  • Friday, November 06, 2009 12:26 PMMauruthi G - MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Ian,

    Regarding the mstsc connection freeze:
    Could you please check if you are seeing symptoms similar to the ones mentioned in http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/f71551fb-9376-42b9-9695-8458ed0ea555

    For example, if you open a Notepad window in the remote session and type into it, do you see a lag or freeze.

    Thanks,
    Mauruthi. G
  • Friday, November 06, 2009 3:05 PMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Nope, no lag or freeze.  Having said that, that is not to say coincidentally I wouldn't get a situation when it would hang.  These hangs are not application dependent.  It can happen anytime.

    Cheers

    Ian
  • Friday, November 06, 2009 5:18 PMTP [] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Ian,

    Have you enabled TS Keep-alives on your server?  Since you have users connecting from outside of your local LAN I would recommend it.  Here are the steps to enable TS Keep-alives:

    1. On your R2 server, start--run--gpedit.msc
    2. Navigate to the following location and enable the setting below:

    Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections

    Configure keep-alive connection interval     Enabled

    Keep-Alive interval: 1

    Restart your server after making the above change.

    ---------------
    Do the hangs occur when users are actively using an application (by active, I mean they are typing into an app, or clicking a button in the app, etc.), and then suddenly it hangs mid-sentence, -or- have they not done anything in the app for a minute or more, or perhaps had it minimized for a minute or more, and then when they click on it to resume work they find it unresponsive?

    Thanks.

    -TP

  • Friday, November 06, 2009 9:03 PMIan cope Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I've seen this setting before but had decided not to use it as it didn't seem relevant to my particular situation.  I have set it as part of the group policy for this server.  Fingers crossed.

    The hangs tend to happen in the middle of doing something, eg it hung twice a few minutes ago when I was trying to scroll down this particular thread to read and respond!  It can hang in the middle of composing an email, in fact almost anytime.  But then it may be ok for hours on end. 

    Very very frustrating.

    Thanks for your help

    Ian