Error connecting to existing session when logging on to remote desktop

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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Dhiraj MuthaLevel DCommented:
Delete the MSLincensing key from registry. Also check the HDD free space.
jcwalkerAuthor Commented:
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.

IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jcwalkerAuthor Commented:
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.
Dhiraj MuthaLevel DCommented:
Have you deleted the MSLicensing key?
jcwalkerAuthor Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.