Link to home
Start Free TrialLog in
Avatar of Malli Boppe
Malli BoppeFlag for Australia

asked on

Unable to logoff, disconnect, or reset RDS user

We use remote apps on windows 2008 r2 RDS farm.One of the user session is struck where I can't logoff, disconnect, or reset  the session.
I tried as suggested in the below article but nothing worked.

http://www.questionhub.com/ServerFault/151144
Avatar of KennethBlok
KennethBlok

The most violent way of killing a session is using comand line: tskill (session). That would take care of business.
Try using the "logoff" command.

Logoff [sessionID] /server:servername.
e.g. logoff 1 /server:EXCHANGE001

You'll need to run this with an account that has local admin rights on the server with the hung session.
You can use an RDC and try to connect to the console.

or if you are logged on there is a terminal Services Manager that you should be able to make use of.

Another alternative is through the task manager.
Avatar of Malli Boppe

ASKER

Guys

I have tried all the above options but none of them worked.
In Server 2003,  TS is intimately connected to the core Windows functionality, and you cannot restart the service. However in Server 2008 it appears you can. If you restart the Remote Desktop Services service, that will dispose of all connections. Othersise it looks like your next option is a reboot of the box.
I would usually run this to enter into the server:

qwinsta /server:xx.xx.xx.xx

Where xx.xx.xx.xx is the IP address or name of the non-accessible machine.

This will display something like this:

qwinsta /server:xx.xx.xx.xx
SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
console                                                   0  Conn        wdcon
rdp-tcp                                            65536  Listen    rdpwd
rdp-tcp#470       user1                1       Active  rdpwd
rdp-tcp#471       user2                 3       Active  rdpwd


Now I know that user1 & user2 are the two users logged in

To disconnect user1 session,  I would type this:

rwinsta /server:xx.xx.xx.xx 1

Notice the 1 which is the session ID I found from using qwinsta above


The commands qwinsta and rwinsta stands for:

qwinsta = Query WINdows STAtion
rwinsta = Reset WINdows STAtion

Also you need to start command prompt using "run using different user" or "run as" which has admin privilege on the server from the desktop you are connecting
Please be more specific: what error are you getting, or does the server return nothing? Did you check the logiles for a secondary program interfering? Please also tell us about the configuration (right) of the user stuck in RDS...
Chev_PCN

I can't restart the RDS service as its in production and would disconnect all the logged on users.

Shanibasha

I have tried those command its run but it doesn't reset the session.

KennethBlok

I am not getting error.What log files can I check.All the users are published app RDP files copied onto their desktop.
So when ever a user wants to access the app, he fires it up.I don't know what he did yesterday the no matter what I do I can't reset or logoff his session.When he tries to open the app.It say connecting and says timed out.
I have users in the same site who  don't have problems accessing the app.
Ok, first in the RDS Installdirectory you'll find a subdirectory called logs. Check the  logfiles for the particular session and see what caused the error if reported. In the meantie I would announce to all RDS users that you will have to reboot teh server (which will take you 15 minutes) on day x on time y. Don't allow user to logon during reboot time. Check if your problem persists and definitely monitor that user to see if this problem occurs again. RDS logfiles should be able to tell you more about what happened. Check for date time events in server logs. A Microsoft Update Automatic) might have caused an error of some kind (that usually happens - but is solved after a reboot)...
I just re-read again what I wrote: I meant to say that you should be able to get the eror time and date from the RDS Logfiles. Use that exact time to check for any other reported error in all server logs. Another program (like an update) might have cuased this...
I can't find the RDS logs where would that be.Is it under windows/system32?
I checked the event viewer logs but nothing in their.
I have restarted the server its all good and this is what I have been doing in the past as well.Want to know if this can be resolved with out restarting the server.
Sorry below are errors int he event viewer

Event ID 56
Source TermDD
Type Error
Description The Terminal Server security layer detected an error in the protocol stream and has disconnected the client


Event ID 50
Source TermDD
Type Error
Description The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the client.
ASKER CERTIFIED SOLUTION
Avatar of Chev_PCN
Chev_PCN
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Chev

I will close the ticket. I don't think its due to heavy traffic.I have seen this happening when the load is below normal.I know the remote app gets time out, its trying to conencting to a disconencted session but can't so uts getting time out.The problem is we can't reset or logoff that session.
Don't think its to do with the heavy traffic.