R
R
Rafail Bektemirov2018-07-21 10:16:14
RDP
Rafail Bektemirov, 2018-07-21 10:16:14

Who and how forcefully terminates terminal user sessions?

Good day.
In stock Windows 2012 server running remotely under the Proxmox virtualization environment.
Lately, I've encountered the problem of forcibly closing user sessions.
I use the script:
query session >session.txt
for /f "skip=1 tokens=2" %%i in (session.txt) DO logoff %%i
del session.txt Faithfully
worked for a long time, but the last 1-2 weeks the problems started.
Windows crashes with an error:
AFD
16002
"Closing a TCP socket with local port number 3389 in process 3316 is taking longer than expected. The local port number may not be available until the close operation is complete. This is usually due to network drivers not working properly. Make sure you have the latest Windows updates and third-party network software installed software, including network adapter drivers, firewalls, or other security tools."
And after that it is impossible to connect to the server via RDP. Rebooting the system helps.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2018-07-21
@SuNbka

In the RDP user settings, it is possible to specify after what period of time the session will be forced to end when idle. You can also force it in the RDP server settings for all users if different modes are not required.
Or welcome to habr

K
kisaa, 2018-07-22
@kisaa

One of the updates (major monthly), just on the 10th, was with an issue regarding network operation. His fix arrived on Thursday.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question