Remote Desktop Session Host Listener Availability

UIGeneratedMonitor0861f0a3d015499787f644d39c59c064 (UnitMonitor)

This object monitors the availability of the Remote Desktop Session Host listener.

Knowledge Base article:

Summary

The listener component runs on the RD Session Host server and is responsible for listening for and accepting new Remote Desktop Protocol (RDP) client connections, thereby allowing users to establish new remote sessions on the RD Session Host server. There is a listener for each Remote Desktop Services connection that exists on the RD Session Host server. Connections can be created and configured by using the Remote Desktop Session Host Configuration tool.

Resolutions

To resolve this issue, check the event ID, and then view the troubleshooting information for that event in the sections below.

Resolution steps for the following event ID: 1035

To resolve this issue, attempt to restart the listener on the RD Session Host server. If restarting the listener is not successful, attempt to increase available system resources, such as memory, on the RD Session Host server.

To perform these tasks, refer to the following sections.

Restart the listener

To restart the listener, use either of the following methods on the RD Session Host server.

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

Method one

To stop and start the Remote Desktop Services service:

1. On the RD Session Host server, open the Services snap-in. To open the Services snap-in, click Start, point to Administrative Tools, and then click Services.

2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

3. In the Services pane, right-click Remote Desktop Services, and then click Restart.

4. If you are prompted about restarting other services, click Yes.

5. Confirm that the Status column for the Remote Desktop Services service displays Started.

Method two

To disable and enable Remote Connections:

1. On the RD Session Host server, start the System tool. To start the System tool, click Start, click Run, type control system and then click OK.

2. Under Tasks, click Remote settings.

3. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

4. In the System Properties dialog box, on the Remote tab, select the Don't allow connections to this computer option, and then click Apply.

5. In the System Properties dialog box, select either of the following, depending on your environment:

Allow connections from computers running any version of Remote Desktop (less secure)

Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure)

For more information about the two options, click Help me choose.

6. Click OK to close the System Properties dialog box.

Increase available system resources

One way to increase the amount of available memory is to determine if there are any programs or processes running on the RD Session Host server that can be closed. Use Task Manager to determine which processes are using the most memory, and to end those processes.

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To free up memory on the RD Session Host server by using Task Manager:

1. On the RD Session Host server, right-click an empty area of the taskbar, and then click Start Task Manager.

2. Click the Processes tab.

3. Make sure that the User Name and Memory (Private Working Set) columns appear. If they do not appear, on the View menu, click Select Columns, select the User Name and the Memory (Private Working Set) check boxes, and then click OK.

4. At the bottom of the tab, select the Show processes from all users check box.

5. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

6. To sort the processes by memory usage, click the Memory (Private Working Set) column header.

7. Determine if you can end any of the memory-intensive processes.

8. To end a process, click the process name, and then click End Process.

9. Click End Process to confirm that you want to end the process.

If you cannot free up memory by using Task Manager, or if this issue still occurs after you try to free up memory, restart the RD Session Host server.

Resolution steps for the following event ID: 1036

This problem could indicate that another application on the RD Session Host server is using the same TCP port as the Remote Desktop Protocol (RDP). The default port assigned to RDP is 3389.

To resolve this issue, determine which application is using the same port as RDP. If the port assignment for that application cannot be changed, change the port assigned to RDP by editing the registry. After editing the registry, you must restart the Remote Desktop Services service. After you restart the Remote Desktop Services service, you should confirm that the RDP port has been correctly changed.

To perform these tasks, refer to the following sections.

Determine which application is using the same port as RDP

You can run the netstat tool to determine if port 3389 (or the assigned RDP port) is being used by another application on the RD Session Host server.

To use netstat:

1. On the RD Session Host server, click Start, click Run, type cmd, and then click OK.

2. At the command prompt, type netstat -a -o and then press ENTER.

3. Look for an entry for TCP port 3389 (or the assigned RDP port) with a status of Listening. This indicates that another application is using this port. The PID (Process Identifier) of the process or service that is using that port appears under the PID column.

To determine which application is using port 3389 (or the assigned RDP port), use the tasklist command-line tool along with the PID information from the netstat tool.

1. On the RD Session Host server, click Start, click Run, type cmd, and then click OK.

2. Type tasklist /svc and then press ENTER.

3. Look for an entry for the PID number that is associated with the port (from the netstat output). The services or processes associated with that PID will appear on the right.

Change the port assigned to RDP

You should determine if this application can use a different port. If you cannot change the application’s port, you will have to change the port assigned to RDP.

Important: Microsoft does not recommend changing the port assigned to RDP.

If you have to change the port assigned to RDP, you must edit the registry.

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To change the port assigned to RDP:

Caution: Incorrectly editing the registry might severely damage your system. Before making changes to the registry, you should back up any valued data.

1. On the RD Session Host server, open Registry Editor. To open Registry Editor, click Start, click Run, type regedit, and then click OK.

2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

3. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations

Note: RDP-TCP is the default connection name. To change the port for a specific connection on the RD Session Host server, select the connection under the WinStations key.

4. In the right-pane, double-click the PortNumber registry entry.

5. Type the port number that you want to assign to RDP in the Value data box. PortNumber is entered as a hexadecimal value.

6. Click OK to save the change, and then close Registry Editor.

Restart the Remote Desktop Services service

For the RDP port assignment change to take effect, stop and start the Remote Desktop Services service.

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To stop and start the Remote Desktop Services service:

1. On the RD Session Host server, open the Services snap-in. To open the Services snap-in, click Start, point to Administrative Tools, and then click Services.

2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

3. In the Services pane, right-click Remote Desktop Services, and then click Restart.

4. If you are prompted about restarting other services, click Yes.

5. Confirm that the Status column for the Remote Desktop Services service displays Started.

Confirm that the RDP port has changed

To confirm that the RDP port assignment has been changed, use the netstat tool.

To use netstat:

1. On the RD Session Host server, click Start, click Run, type cmd, and then click OK.

2. At the command prompt, type netstat -a and then press ENTER.

3. Look for an entry for the port number that you assigned to RDP. The port should appear in the list and have a status of Listening.

Resolution steps for the following event ID: 1066

This issue can typically be ignored.

Resolution steps for the following event ID: 1132

To resolve this issue, you must install the Remote Desktop Session Host role service.

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To install the Remote Desktop Session Host role service:

1. Open Server Manager. To open Server Manager, click Start, point to Administrative Tools, and then click Server Manager.

2. Under Roles Summary, click Add Roles.

3. On the Before You Begin page of the Add Roles Wizard, click Next.

4. On the Select Server Roles page, select the Remote Desktop Services check box, and then click Next.

5. On the Remote Desktop Services page, click Next.

6. On the Select Role Services page, select the Remote Desktop Session Host check box, and then click Next.

7. On the Uninstall and Reinstall Applications for Compatibility page, click Next.

8. On the Specify Authentication for Remote Desktop Session Host page, click Require Network Level Authentication, and then click Next.

9. On the Specify Licensing page, select the appropriate option, and then click Next.

10. On the Select User Groups Allowed Access To This Remote Desktop Session Host Server page, click Next.

11. On the Configure Client Experience page, select the appropriate options, and then click Next.

12. On the Confirm Installation Selections page, ensure that the RD Session Host role service will be installed, and then click Install.

13. On the Installation Results page, you are prompted to restart the server to finish the installation process. Click Close, and then click Yes to restart the server.

14. After the server restarts and you log on to the computer with the same user account that was used to install the Remote Desktop Session Host role service, confirm that the installation of the RD Session Host role service succeeded, and then click Close to close the RD Session Host configuration window.

Element properties:

TargetMicrosoft.Windows.Server.2012.R2.RemoteDesktopServicesRole.Service.RDSessionHost
Parent MonitorSystem.Health.AvailabilityState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.SingleEventLogManualReset2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Remote Desktop Session Host Listener Availability Alert
Event ID: {0} -- Description: {1}
RunAsDefault

Source Code:

<UnitMonitor ID="UIGeneratedMonitor0861f0a3d015499787f644d39c59c064" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.Server.2012.R2.RemoteDesktopServicesRole.Service.RDSessionHost" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.SingleEventLogManualReset2StateMonitorType" ConfirmDelivery="true">
<Category>Custom</Category>
<AlertSettings AlertMessage="UIGeneratedMonitor0861f0a3d015499787f644d39c59c064_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDisplayNumber$</AlertParameter1>
<AlertParameter2>$Data/Context/EventDescription$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UIGeneratedOpStateId3ce5ff85bf5f487aaf2f12acd93a3381" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateIdcf85de4df8db46d495fede817752afef" MonitorTypeStateID="EventRaised" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>System</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-TerminalServices-RemoteConnectionManager</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1132</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1066</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1035</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1036</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>