Sunday, September 11, 2011

Terminal Server Listener Down

I received an email saying that the Terminal Service of one of the Windows Server 2008 (with Service Pack 2) was not working.  I tried it myself and indeed I can’t remote desktop in as well.  So I have logged on through the console and start my troubleshooting.  Apparently,  the problem started after an attempt to install Citrix XenApp 5.0 but that is another story.

From the “Terminal Services Manager”, I saw that the listener was down even the “Terminal Service” service was running.

2011-09-09_224501

Running the qwinsta also showed that the listener was down.

2011-09-09_224741

Checking the event log, I saw a terminal service error with an Event ID 1035.  The following write-up described the error.

Event ID 1035 — Terminal Server Listener Availability

Unfortunately, the suggested resolutions did not resolve the issue.  After some troubleshooting, I kind of determined that the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server registry key was the cause of the issue.

I noticed that the permission of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM was not quite right when compared to another working Windows Server 2008.  The TermService account was missing from the list.

I added back TermService account and granted it the required permission.

2011-09-10_2057082011-09-10_205930

By the way, to add TermService, you need to change the location to the server name and enter NT Service\TermService for the object name.

2011-09-10_205418

After granting the permission, I restarted the server and was hoping that it will fix the issue but it didn’t.

After spending another hour of fruitless troubleshooting, I was almost near to giving the server a new “life” (redoing the operating system).  Then I decided to export the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server registry key from a working server and import it to the problematic server ( I stopped the “Terminal Service” service before importing).

I rebooted the server after the import and it resolved the problem.  The qwinsta command showed that the listener is listening again.

Untitled

I am keeping my finger cross that the someone who is going to install XenApp will not break the server again.

3 comments:

Jellon (Steve J) said...

I too have had this on Terminal server 2008 R2 however I was just able to add the permissions on some servers and other had to add and reboot before it would work, but every time there is an update from Microsoft this permission is lost again and I have to redo these steps!

Jellon (Steve J) said...

Also just to add I have this running on straight box 2008 R2 and 3 systems running over Xen 6 2008 R2

Alex Siow said...

Hi Jellon, are you using some patch management tool to perform the update? You might want to check whether is there some kind of pre or post task that might accidentally remove the permission.

Just my 2 cents :)