The windows logon process has unexpectedly terminated 4005

We have this issue on many 2012 RDS session hosts. The issue has been seen at different clients with different set ups, some have a simple 1 session host RDS server, some have 4 or 5 session hosts in a load balanced farm with RD gateway, connection brokers, RDWeb, ect. The problem in simplest explanation:

A user will call the help desk saying they cannot access the server. They will get an error when RDP is trying to connect. 

We check the session hosts, and will find many errors:

«Event ID 4005 — The Windows logon process has unexpectedly terminated»

At that point in time, users who are currently logged in may be able to still work, or their session may lock up (it is not consistent). 

Regardless of the current users logged; after the logon process crashes, it continues to crash upon every user attempt to log on. It will happen indefinitely until the server is rebooted. We can not log in, not even via console until the server is rebooted.

Then, everything works fine for some amount of time (not consistent) it may be a couple of days, or it may be weeks, or a month even.

We have had the case open with Microsoft for about two months and they cannot determine what is wrong. 

I believe I may have found a possible cause; Webroot Secure Anywhere antivirus. Since we have tried everything from moving from roaming profiles to local profiles, removing all printers, blocking inheritance of GP, fresh server builds with minimal software, ect — it has to be something that is consistent across the board on all servers. 

The only thing I can find consistent across the board is the Antivirus; Webroot. 

I am curious if anyone else is having this issue? I would like to pin point this to something but it is so intermittent and we cannot force replicate the problem. 

The Windows logon process has unexpectedly terminated. Event ID 4005

Searching Google for that returns a number of links, most of which have troubleshooting and/or resolution suggestions. That EventID even has its own page on Technet, all official from from Microsoft itself.


Event ID 4005 — Windows Logon Availability

[…]

Diagnose

This error might be caused by one of the following conditions:

  • System resources are inadequate or unavailable.
  • The Windows registry is corrupted.
  • A service failed to start.

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

[…]


Start there, do some troubleshooting, and see if you don’t end up arriving at a solution.

Related videos on Youtube

Solved - Remote Desktop Can´t Connect to The Remote Computer for one of These Reasons - Windows 10

07 : 17

Solved — Remote Desktop Can´t Connect to The Remote Computer for one of These Reasons — Windows 10

How to enable Remote Desktop  in Windows Server 2008 R2

02 : 59

How to enable Remote Desktop in Windows Server 2008 R2

Server 2008 R2 - How to configure Remote Desktop using group policy in Windows Server 2008 R2

12 : 04

Server 2008 R2 — How to configure Remote Desktop using group policy in Windows Server 2008 R2

27 Shutdown Window Server 2008

03 : 23

27 Shutdown Window Server 2008

DevOps & SysAdmins: RDP into Windows 2008 R2 server just stopped responding

01 : 51

DevOps & SysAdmins: RDP into Windows 2008 R2 server just stopped responding

Comments

  • Have a weird situation. I am running a windows 2008 R2 box that has 128 gigs ram and 2 6 core processorss. Box runs like a champ, however, it seems like every week orweek and a half, I can’t RDP into it anymore. The handshake is immediate. Username and password start the configuring remote session but it just hangs and hangs and hangs until RDC times out. No other uses but me. No firewall appliance except for Windows firewall. And the box still serves up pages just fine. Any ideas?

    Also should be noted if I type a bad password it lets me know so, its connecting… just not enough to get the desktop… Lastly one more thing… when I went to data center and hooked monitor mouse and keyboard I couldn’t log in as neither responded.

    • No cant log in and the server log showed Winlogon errors but its vague…

    • I lowered the amount of RAM SQL uses but realistically the system had about 8 gigs on standby and 2-3 gigs totally free… dunno if that’s gonna fix anything

    • Trust me, you’re being more vague than the event logs are. Retrieve the errors, and post them in your question.

    • The Windows logon process has unexpectedly terminated. That is the exact error. Event ID 4005

    • Have you installed all recent updates?

    • @MichelZ reminds me that MS did issue an update that broke RDP a while back, specifically KB2667402. There are a bunch of fixes (or suggestions) online, though I believe that installing newer updates will successfully correct the issue (or has done so for me, so… anecdotal evidence).

    • Yes I always install any of the updates that are required or recommended. I’m checking to see if that KB MichelZ is installed.

    • Yep… it’s installed :/

    • Ok so as per the articles I’ve uninstalled it, but cant reboot until the traffic is down later tonight… then I’ll reinstall it. Thank you everyone who assisted me and fingers crossed and I’ll keep everyone update :-)

    • And thank you HopelessN00b for the suggestion!!!!!

  • Thanks.. will do and will post my findings. This is a clean install too :/

  • What server log? Where was it located? How did you clear it?

Recents

  • Microsoft // Winlogon 4005 (The Windows logon process has unexpectedly terminated) on one Windows Server 2012 VM with working RDS roles installed

    Hello experts,
    I have deployed all essential RDS roles and features on one Windows Server 2012 Virtual Machine
    a few months ago and I recently ran into issues with users not being able to access it through RDP all of a sudden after entering credentials successfully.
    Every time that happens I get an event ID Winlogon 4005 (The Windows logon process has unexpectedly
    terminated). I am also receiving but not all the time event ID 6000 and 6003 referring to being unable to handle critical or normal events from AUinstallAgent.
    Any help on this problem would be greatly appreciated.
    Thank you in advance for your support.
    Massimiliano

    Hello experts,
    I have deployed all essential RDS roles and features on one Windows Server 2012 Virtual Machine
    a few months ago and I recently ran into issues with users not being able to access it through RDP all of a sudden after entering credentials successfully.
    Every time that happens I get an event ID Winlogon 4005 (The Windows logon process has unexpectedly
    terminated). I am also receiving but not all the time event ID 6000 and 6003 referring to being unable to handle critical or normal events from AUinstallAgent.
    Any help on this problem would be greatly appreciated.
    Thank you in advance for your support.
    Massimiliano

  • What will i do when i received the message of an error is that «your server has unexpectedly termina

    What will I do when I received the messages about the errors?    Here the information was given away :
    «Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Subject ‘Kindly send a check this week’, Account: ‘imap.mail.rogers.com’, Server: ‘smtp.broadband.rogers.com’, Protocol: SMTP, Server Response: ‘552 Message Size exceeded’, Port: 587, Secure(SSL): No, Server Error: 552, Error Number: 0x800CCC0F»

    Are you getting this error message on your printer or computer ?
    What kind of printer do you have and what operating system are you using ?
    If I helped you at all it would be great if you clicked the blue kudos star!
    If I solved your post please mark it as solved to help others.
    I’m a printer tech with HP.

  • Remote Desktop Connection Authentication Error from Windows 8.1 Pro to Windows 7 Pro

    I keep trying to connect to my server running Windows 7 Pro from my laptop running Windows 8.1 Pro, but I get the following message after providing
    my credentials:
    «An authentication error has occurred (Code: 0x8007001f)»
    I can’t find any reference to this error code being associated with using remote desktop.

    Hello,
    Are you connecting to a server as part of a domain ? if so confirm you are using adequate credentials for remote desktop for example: username: domain\administrator 
    if not you can try connecting to the localhost using:
    username: .\administrator   — for example
    also you can try running your remote connection in admin mode:
    Win + R — bring up run then type:
    mstsc /admin
    hope that helps.
    Cheers,
    Harry

  • Remote Desktop disconnected because of security error from Windows 8.1 Surface to Server 2008

    Hello,
    I am trying
    to connect to a remote app on a 2008 server from a surface pro 3 with 8.1
    through Netilla SSL VPN and I getting the following error message.
    Remote Desktop Disconnected
    Because of a security error, the client could not connect to the remote computer Verify that you are logged on to the network and then try connection again
    if I am connected to the network and use the RDP file, it connects fine.
    This
    was previosluly working, but when I changed the terminal server to per user
    license mode from trial mode this happen
    This works fine from Windows 7 machines.<o:p></o:p>
    Any ideas?
    Thanks,
    Derek

    Hi Derek,
    Thank you for posting in Windows Server Forum.
    From the error itself it seems that there is some network connection issue with VPN. Kindly see that you get network when you are using VPN connection, also VPN must be running. You can also try to “ping” the remote computer and see whether there is successful
    ping result.
    Also try to use “Allow connections from computers running any version of Remote Desktop” option on server side and check whether you can remote desktop successfully. 
    Apart this issue can also be caused due to certificate as VPN can’t resolve the certificate properly and facing this issue because you are facing issue only with usage of VPN (as you have commented). Please check
    this link for detail.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Vbscripts: Remote Desktop Disconnected Windows XP SP2

    When I in the office. I can remote to server 2000 with URL is: http://204.72.x.x:8080/tsweb/default.htm. But when I at home, I am getting an error: vbscripts: remote desktop disconnected. Please some one let me know why. Please advice. Note: I have proxy server at work.

    I’m not sure if Apple Remote can, but
    Microsoft offers a free program called Remote Desktop Connection so you can do just that.
    www.microsoft.com/mac

  • Remote Desktop to servers crashes on Windows 8.1 Pro

    Hi All,
    I have done a search for this issue previously, but have been unable to find any information relating to my specific issue.
    I have a Windows 8.1 Lennovo workstation with a pretty fresh install, and about 50% of the time I connect to our Windows 2003/2008R2 servers using remote desktop connection, it hangs, and tells me it has stopped responding.
    I then have to force close the application and try again.
    Having a look in the event viewer, I can see the below entries:
    First, an event ID 1001, which is Windows Error reporting, containing the below info:
    Fault bucket , type 0
    Event Name: AppHangB1
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: mstsc.exe
    P2: 6.3.9600.16384
    P3: 5215e2b5
    P4: bced
    P5: 134217729
    P6: 
    P7: 
    P8: 
    P9: 
    P10: 
    Attached files:
    C:\Users\edmonds\AppData\Local\Temp\WERB565.tmp.appcompat.txt
    C:\Users\edmonds\AppData\Local\Temp\WERB576.tmp.WERInternalMetadata.xml
    These files may be available here:
    C:\Users\edmonds\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppHang_mstsc.exe_85bb93ec22754eb0631313fedba5dc3f456c90_4012f314_1a43c12d
    Analysis symbol: 
    Rechecking for solution: 0
    Report ID: ed4f9264-425c-11e4-be89-00173f416a8b
    Report Status: 97
    Hashed bucket: 
    This is followed by id 1002, which is an application hang, containing the below info:
    The program mstsc.exe version 6.3.9600.16384 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
     Process ID: 18d8
     Start Time: 01cfd6693706de0c
     Termination Time: 16
     Application Path: C:\WINDOWS\system32\mstsc.exe
     Report Id: ed4f9264-425c-11e4-be89-00173f416a8b
     Faulting package full name: 
     Faulting package-relative application ID: 
    Interestingly enough, I had the same issue on my previous Fujitsu PC, which was also running Windows 8.1 Pro x64. I suspect it is some application I have installed on the machine causing the issue, but I don’t have anything unusual installed.
    If the above sheds any light on this, I will thank you in advance for any advice you can offer.
    Thanks
    Eds

    Hi,
    According to your description, since system is just fresh installed, it should not other application cause this problem. It is most probably caused by Certificate or Firewall problem, please try to disable Firewall or upgrade your RDP Certificate for test.
    Certificate Requirements for Windows 2008 R2 and Windows 2012 Remote Desktop Services:
    http://blogs.technet.com/b/askperf/archive/2014/01/24/certificate-requirements-for-windows-2008-r2-and-windows-2012-remote-desktop-services.aspx
    In addition, for RDP client crash problem, I would like to suggest you follow Andre’s suggestion in the link below to colect RDP crash dump file, then upload the dump file to your OneDrive and post the sharing link here.
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/07b758db-7bba-4624-9bb4-d51b5e95e64a/windows-81-rdp-crashes-very-frequently-after-upgrade-from-windows-8?forum=w8itpronetworking
    Roger Lu
    TechNet Community Support

  • Control alt delete from remote desktop connection through virtual pc windows xp on windows 7 professional

    Ok this is an odd one but I am connecting to a server through a vpn which only works on windows xp so I ran a virtual pc instance to connect, and then did a remote desktop connection to the server (Windows server 2008). I need to be able to activate the
    control-alt-delete combination on the server however, to change a password. ctrl + alt + del obviously goes back to my actual machine, and ctrl + alt + end acts on my virtual pc. Is there any way to push the command through to the remote server?

    Hi Cooljoe,
    Based on my understanding, local machine control-alt-delete key combination is control-alt-delete.
    Virtual PC’s control-alt-delete key combination is Right Alt — Delete.
    Remote Destop session’s control-alt-delete key combination is ctrl + alt +
    end.
    There should be no conflicts between them.
    Regards,
    Wilson Jia 
    This posting is provided «AS IS» with no warranties, and confers no rights. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can
    be beneficial to other community members reading the thread. ”

  • The iChat Agent process has unexpectedly quit, disconnecting you from all..

    My iChat has been doing this all the time! I can’t stay connected for more than an hour without iChat quitting on me and giving me this message:
    *»Disconnected from iChat Agent. The iChat Agent process has unexpectedly quit, disconnecting you from all services. Logging in again will restart it.»*
    I have tried these steps to fix the problem with no success.
    Step 1 — Repaired Permissions
    Step 2 — Rebooted off of the DVD or CD and Repaired Disk
    Step 3 — Went to /Users/user_name/Library/Preferences folder and deleted these files:
    com.apple.iChat.plist
    com.apple.iChat.Aim.plist
    com.apple.iChat.Jabber.plist
    com.apple.iChat.SubNet.plist
    com.apple.iChatAgent.plist
    Step 4 — Reinstalled the **** thing.
    My iChat works 100%, I have no issues connecting, video conferencing, screen sharing and etc. But every hour or so the connection drops and gives me that **** message!!! *»Disconnected from iChat Agent. The iChat Agent process has unexpectedly quit, disconnecting you from all services. Logging in again will restart it.»* So have to keep reconnecting all the time! Sometimes I’m in a middle of a conference and the freackn’ thing just drops!!!! (Even tho sometimes I do get that error but my video connection still works offline…. not sure how….)
    I have been in several forums and no one was able to fix this issue! Can some official Apple guy help with this!!! I mean, ****!! What an annoying bug!! I really on iChat to communicate with co-workers and etc as I work remotely. If Adium had video support I wouldn’t even wast my time to get this thing working, but iChat is still my best option(when the **** thing works)
    Please any help is greatly appreciated.
    And no its not my router and ISP and this happens with any connection(Coffee shops, public libraries, WiFi Hot Spots….)

    I had the same problem a month or two ago. I spent a few hours on the phone with an Apple tech and after the fourth time calling back was transferred to a Product Specialist (the highest level of Apple technicians). The specialist recommended creating a test account on my Mac and trying to launch iChat to see if the problem was system-wide or a user based issue. When that didn’t work I was out of options. What it unfortunately came down to was having to do an Archive and Install (which didn’t work) and after hours of backing up did an Erase and Install. After all the smoke cleared and my computer was back to normal, iChat was back and fully functional as before.
    IF YOU ARE USING TIME MACHINE:
    *DO NOT* copy all of your files back onto your Mac. Only copy your documents and music, preferences and nothing else. Chances are you backed up the problem without even knowing it and you would just end up back where you started.
    I did notice that my .Mac account still works in iChat but AIM does not (which just happens to be what I use to communicate with the rest of the world).
    Good Luck!

  • My CS6 is giving me an error message that  says «photoshop has unexpectedly quit» and will not open. I have tried re-intalling but it still won’t open

    CS6 has stopped working.  It give error message saying that Photoshop has unexpectedly quit and will not open at all.  The same with Elements 11

    Sorry — this is the Audition forum. We don’t know anything about Photoshop or Elements at all; you need to ask in the Photoshop forum.

  • My apple RIP gives this error message» the application ppRIPe has unexpectedly quit»

    MY APPLE RIP GIVES THIS ERROR MESSAGE» the application ppRIPe has unexpectedly quit»

    Thanks.
    I should have mentioned that I have already done the Resolving Permissions as outline on Apple Support pages, but, I went ahead and did the complete sequence as shown on Dr. Smokes.
    I decided to stop beating a dead horse and did an Erase and Install of 10.2 again since I did not have anything on there yet. So far, everything is working perfectly. I am doing the Software Updates called for one by one to see if any of those caused the problem.
    The only thing I did other than doing all of the updates after the install was to install OS 9.2 for my Classic Environment software and I also installed an HP PSC 1315v All-In-One scanner/printer. I cannot imagine that would have done anything.
    I did have some strange issues with Where in the USA is Carmen Sandiego and The Star Fleet Technical manual so I may stay away from them unless I start in OS 9 if none of the other updates cause any issues.
    Thanks. BTW, How should I rate your answer? I know that it did not solve my problem, but, it is likely that something else I did whacked something.
    I’ll update when I know more.

  • IOS App 8.1.5 Remote Desktop can’t connect to Windows 7 Pro after upgrade. Error 0x00000507

    Nothing has changed between my network, Windows 7 computer or my iPad besides the upgrade of the ios app software to 8.1.5.  Did not used to have any issues connecting but now when I try to connect, I get the above error when logging in.
    I have tried reinstalling the ios app with no success and also confirmed I can still remote desktop to the PC from another PC with the credentials I’ve always been using.
    I’ve also tried explicitly including the domain when entering the username with no luck.  Looked through my Windows 7 event logs and can’t find any more information on what this error means.
    Has anyone seen anything similar or have any ideas what I can do to troubleshoot? Thanks!

    Hi,
    I have a same problem.
    Although RD Client 8.1.4 worked great, now I cannot connect to Windows 7 Professional computer from my iPhone 5 (iOS 6.1.4) since the latest update.
    Same as Twiggles, when I try to log in (just after entering username and password), the app gives me error code 0x507 «Disconnected from server».
    Note that I connect to my PC over VPN using Cisco AnyConnect app.
    After that, I’ve tried to connect to my PC in two different ways with same network settings as the above situation.
    1. Use different remote app
    I’ve tested free version of «PocketCloud» from Dell Wyse, and I CAN connect to my PC.
    2. Use different version of iOS
    I’ve tested the latest RD Client 8.1.5 on my another iPhone (5s) with iOS 8.1, and I CAN connect to my PC.
    Therefore, I assume our 0x507 is not setting related, but probably some sort of iOS version dependent problem arise from the latest update.
    Even though I tried PocketCloud, I believe RD Client is the BEST app for remote desktop for iOS.
    I strongly hope this problem will be solved!
    Thanks.

  • OS X remote desktop failure to PC with Windows Server — no error messages

    Recently I installed the Microsoft Remote Desktop App on my iPhone 5s and successfully managed to connect to a machine which is running Windows Server. I also frequently connect to it using remote desktop on a PC. 
    I have since installed the Remote Desktop app onto a Macbook with Yosemite and the exact same settings do not work. When I click start, I get a black screen which says ‘Initializing’ and then ‘Connecting’ and then the window simply closes, with absolutely
    no error message or warning. 
    The connection involves specifying a gateway if this is of relevance.
    Given connection is possible using the same app on another device, I cannot reconcile the fact that it does not work through a Macbook and it’s very frustrating because things I need to do are essentially not worth doing on the iPhone screen. 
    At the moment, the only thing I can think of is that the app version for iPhones works and the one for actual Mac computers is faulty because I see these are different versions. 
    Please help or restore my sanity by confirming my suspicions and if it is so, advise when the Mac version will be rectified. Alternatively, if there is an old version which would work, please can you provide a link to where I can install this? 
    Thanks in anticipation!

    Hi,
    From your description it seems that your MRD MAC is not working. Can you let us know which version of MRD MAC you are using, please try to use latest version v 8.0.13 and check?
    Btw, by which method you are trying to remote connect (via IP address or Hostname). Please try alternate way and see. Also you can find the log on below path for more research on MAC.
    Microsoft Remote Desktop>About Microsoft Remote Desktop>Send log via email
    Apart for a try, built URI scheme and connect the server to check. You can get information over
    here.
    And for older version, sorry to say but there is no such option to download. 
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Remote Desktop Connection for Mac to Windows — logout error

    Hello
    I’m trying to use Remote Desktop Connection (RDC) to get from my Mac into a MacMini running Windows XP Professional. I can log into the Windows computer, but once I put in my password and click OK, it logs out of the Windows machine. Is there some sort of sharing preference or configuration that I’m missing that’s making this happen?
    I want to be able to use RDC to access the Windows machine and keep everything up still on the Windows machine.
    Thanks

    Since RDC is not an Apple product, you’ll probably want to use a forum dedicated to Microsoft’s Mac products such as <http://www.microsoft.com/mac/community/community.aspx?pid=newsgroups> rather than an Apple forum
    Be sure to search the forum first in case someone has already had a similar question answered.

  • Remote desktop connection not working in windows 7 Pro x64 bit sp1 3389 port not working

    i have still facing same problem in last two week in my  system RDC not working . i have installed in my system windows 7 x64 bit Pro sp1 then i check 3389 port working or not  in my system use the command netstat -a -o command in
    command prompt but this is  my bad luck  its not woking in my machine after i have decide to change RDC listening port via registry  i have change it 3389 to 3391 after restart my system,  and
    after again testing using same command but no any change again rdc not listening . After i have  search this issue on search engine google bing and microsoft , i have found more solutions  but i have try one
    uninstalled two microsoft updates first is kb  KB2621440 second is KB2667402 and after again restart my system and again installed KB 2667402 But not change i have already enabled Remote Desktop connection in windows 7 and select the option
    any version computer running , i have try  three and four time enable  disable remote desktop connection in my machine . but not change i have all windows firewall disable and uninstalled anti virus they intalled in my machine , and using the Mcafee
    stinger tools to scan my machine to remove virus but stinger is not found any thread in system.  ihave already run this command in my system sfc /scannow  Please Can you help me to fix  this issue.

    Hi,
    When you try to start the Remote Destop Connection, what errors it showed out?
    Could the other PCs connect this PC with the RDC?
    So you have read this blog?
    RDP connections might fail due to a problem with KB2621440 — MS12-020
    Did you reinstalled the KB2621440?
    Besides, did you follow this guide to enable the RDC connection?
    Connect to another computer using Remote Desktop Connection
    And also this guide?
    Why can’t I connect using Remote Desktop Connection?
    Please take a check with those settings again.
    Best regards
    Michael Shao
    TechNet Community Support

  • There is a problem with this windows installer package google chrome
  • The windows in this house are in urgent of replacement
  • Themes su windows 10 курсоры для windows
  • There is a problem with this windows installer package a program required for this install
  • Theme windows 7 go launcher ex theme