Port Configuration

UIGeneratedMonitor1221a570609347668faff12fdf3f17cd (UnitMonitor)

This object monitors the configuration of the port used by the RemoteApp and Desktop Connection Management service.

Knowledge Base article:

Summary

By default, the RemoteApp and Desktop Connection Management service uses TCP port 5504 to communicate with the RD Web Access server. The port on which the RemoteApp and Desktop Connection Management service communicates must be available.

Resolutions

The RemoteApp and Desktop Connection Management service uses TCP port 5504 by default. If this port is in use, you can resolve this issue by stopping the service that is using TCP port 5504. If that is not possible, you can change the port that the RemoteApp and Desktop Connection Management service uses.

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

Stop the service that is using TCP port 5504

The RemoteApp and Desktop Connection Management service uses port 5504 by default. If possible, you should stop any service that is using TCP port 5504 to communicate on the network.

To stop the service that is using TCP port 5504:

1. On the RD Connection Broker server, open the Services console.

2. To open the Services console, click Start, point to Administrative Tools, and then click Services.

3. Locate the service, right-click the service name, point to All Tasks, and then click Stop.

4. If the other service must communicate on TCP port 5504, you can change the port on which the RemoteApp and Desktop Connection Management service communicates by using the section named "Change the port that the RemoteApp and Desktop Connection Management service uses”.

Change the port that the RemoteApp and Desktop Connection Management service uses

You must change the port that the RemoteApp and Desktop Connection Management service uses on both the RD Connection Broker server and the RD Web Access server.

To change the port on the RD Connection Broker server:

1. On the RD Connection Broker server, open Registry Editor. To open Registry Editor, click Start, click Run, type regedit.exe, and then click OK.

2. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralizedPublishing.

3. Double-click the CentralizedPublishing registry setting.

4. Select the Decimal option.

5. In the Value data box, type the port number that the RemoteApp and Desktop Connection Management service should use, and then click OK.

6. Close Registry Editor.

You must edit the web.config file on the RD Web Access server and change the port number.

To change the port on the RD Web Access server:

1. On the RD Web Access server, open Notepad. To open Notepad, click Start, point to All Programs, point to Accessories, and then click Notepad.

2. Click File, and then click Open.

3. Click All Files.

4. Navigate to %windir%\Web\RDWeb, and then double-click Web.config.

5. Change the value in the following line to the desired port number: <add key="DefaultCentralPublishingPort" value="5504" />.

6. Click File, and then click Save.

7. Close Notepad.

Element properties:

TargetMicrosoft.Windows.Server.2012.R2.RemoteDesktopServicesRole.Service.RDConnectionBroker
Parent MonitorSystem.Health.ConfigurationState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.SingleEventLogManualReset2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Port Configuration Alert
Event ID: {0} -- Description: {1}
RunAsDefault

Source Code:

<UnitMonitor ID="UIGeneratedMonitor1221a570609347668faff12fdf3f17cd" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.Server.2012.R2.RemoteDesktopServicesRole.Service.RDConnectionBroker" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.SingleEventLogManualReset2StateMonitorType" ConfirmDelivery="true">
<Category>Custom</Category>
<AlertSettings AlertMessage="UIGeneratedMonitor1221a570609347668faff12fdf3f17cd_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="UIGeneratedOpStateId44b52f47e361421ca2e11b4a320f599b" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateId0ea1acd85989485dad51089c42c8f734" MonitorTypeStateID="EventRaised" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Microsoft-Windows-RemoteApp and Desktop Connection Management/Admin</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1005</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Channel</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-RemoteApp and Desktop Connection Management/Admin</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>