Error connecting to existing session when logging on to remote desktop

Posted on 2008-11-19
Last Modified: 2012-08-14
We have a windows 2003 server being used in terminal server mode.  We have several users logging on to this box and using it each day.  Sometimes when one user logs on from another workstation and they have a disconected session, he/she will gets the following dialogue

Logon connect failed  
Error connecting to existing session for username (Id x)
The operation completed successfully
A new session will be created

This dialogue is attached.

Normally users can disconnect and log on from other locations such as home, without a problem and all their programs, etc appear on the screen just as they left them.

If that user does log on and creat a new session and then they go to task manager, users, and try to connect to their session then they get the following error:

Windows Task Manager
Unhandeled error occurred while connecting
#31 A device attached to the system is not functioning

We also tried using tscon to connect from the command line:
C:\WINDOWS>tscon 2
Could not connect sessionID 2 to this session, Error code 31
Error [31]:A device attached to the system is not functioning.

We have noticed that if we use task manager and end a few large apps such as outlook, iexplore etc from this users session, then they can log in and grab their session again. However Outlook and iexplore.exe dont always work and sometimes we have to end other applications.

Rebooting the server fixes the problem and all users can logon normally and then sucessfully attach to their disconnected sessions in the future. However sooner or later this problem will reappear for one or more users. It usually starts with one user. We noticed this on a previous server and after we got the session errors often the whole server would totally crash when someone logged on.

The current server is not running anything particularly unusual as far as apps goes; office 2007 & mcafee antivirus enterprise.

We have noticed occasional "out of resources "  errors very occasionally with one or two apps such as wingrep.  Not sure if this is related.  We also have 1GB of ram and plenty of free ram always.

Would really appreciate any ideas anyone might have.

Question by:jcwalker
    LVL 1

    Expert Comment

    dear sir
     your main problem as  you say that your system  require much more resources
    add much more ram to hold your disconnected sessin and your applications as well
    LVL 14

    Expert Comment

    by:Dhiraj Mutha
    Delete the MSLincensing key from registry. Also check the HDD free space.

    Author Comment

    We have plenty of free hard drive space and we just checked by simulating low disk space (much lower than we would normally have ) and the error still came up.

    mtzmind, we always have plenty of free RAM, so I dont think this is the problem.

    pspglb, is the MSLicencing key not important?  Is it safe to delete this?  I noticed this same error came up in relation to Kerberos problems, so it does seem to be related to security of some sort.   Hopefully it will happen again soon so I can try your sugestion of deleting this key.

    LVL 14

    Accepted Solution

    Its safe to delete the MSLicensing Key. I have faced this issue before. Try doing it.

    Author Comment

    pspglb thankyou.  Sorry for the late reply.  I have been away.  The problem hasnt happened again yet, but I will try your solutions as soon as it does happen again.
    LVL 14

    Expert Comment

    by:Dhiraj Mutha
    Have you deleted the MSLicensing key?

    Author Closing Comment

    Hi, the problem hasnt happened again yet.  Prob because there are a whole heap of apps which I decided to temporarily disable untill I figure this out.  I suspect it may be Mcafee Antivirus corporate, but could be wingrep also.   I will award the points to you, since it is a very good sugestion.  When I figure some more out, I will post here.  Thanks for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
    Learn about cloud computing and its benefits for small business owners.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now