|
| 1 | +--- |
| 2 | +title: Domain Join Error Code 0x54b |
| 3 | +description: Provides troubleshooting steps for resolving error code 0x54b when you join a workgroup computer to a domain. |
| 4 | +ms.date: 04/23/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: eriw,dennhu,herbertm |
| 9 | +ms.custom: |
| 10 | +- sap:active directory\on-premises active directory domain join |
| 11 | +- pcy:WinComm Directory Services |
| 12 | +--- |
| 13 | +# Domain join error code 0x54b |
| 14 | + |
| 15 | +This article provides troubleshooting steps for resolving error code 0x54b when you join a workgroup computer to a domain. |
| 16 | + |
| 17 | +## Symptoms |
| 18 | + |
| 19 | +When you join a workgroup computer to a domain, you receive the following error message: |
| 20 | + |
| 21 | +> **Error code 0x54b** |
| 22 | +> |
| 23 | +> Computer Name/Domain Changes |
| 24 | +> |
| 25 | +> An Active Directory Domain Controller (AD DC) for the domain "\<NetBIOS\\_name>" could not be contacted. |
| 26 | +> |
| 27 | +> Ensure that the domain name is typed correctly. |
| 28 | +> |
| 29 | +> If the name is correct, click Details for troubleshooting information. |
| 30 | +> |
| 31 | +> Note: This information is intended for a network administrator. If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\WINDOWS\debug\dcdiag.txt. |
| 32 | +> |
| 33 | +> The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "\<domain\_name>": |
| 34 | +> |
| 35 | +> The error was: "This operation returned because the timeout period expired." (error code 0x000005B4 ERROR\_TIMEOUT) |
| 36 | +> |
| 37 | +> The query was for the SRV record for \<srv\_record> |
| 38 | +> |
| 39 | +> The DNS servers used by this computer for name resolution are not responding. This computer is configured to use DNS servers with the following IP addresses: |
| 40 | +> \<ip\_address> |
| 41 | +> |
| 42 | +> Verify that this computer is connected to the network, that these are the correct DNS server IP addresses, and that at least one of the DNS servers is running. |
| 43 | +
|
| 44 | +Here's an example from the **netsetup.log** file: |
| 45 | + |
| 46 | +```output |
| 47 | +NetpValidateName: checking to see if '<domain_name>' is valid as type 3 name |
| 48 | +NetpCheckDomainNameIsValid for <domain_name> returned 0x54b, last error is 0x0 |
| 49 | +NetpCheckDomainNameIsValid [ Exists ] for '<domain_name>' returned 0x54b |
| 50 | +``` |
| 51 | + |
| 52 | +## Cause |
| 53 | + |
| 54 | +Error code 0x54b means "ERROR\_NO\_SUCH\_DOMAIN." This error code indicates the specified domain can't be contacted, pointing to issues locating domain controllers (DCs). |
| 55 | + |
| 56 | +* Domain Name System (DNS) times out and resolution fails when attempting to reach DCs. |
| 57 | +* Network connectivity to DCs is blocked on TCP port 135, 389, 445, or RPC dynamic ports. |
| 58 | + |
| 59 | +## Troubleshooting steps |
| 60 | + |
| 61 | +To resolve the 0x54b error, follow these steps: |
| 62 | + |
| 63 | +### Step 1: Check the network connectivity between the client and the DC |
| 64 | + |
| 65 | +| Server port | Service | |
| 66 | +| --------------- | ------------------- | |
| 67 | +| TCP 135 | RPC Endpoint Mapper | |
| 68 | +| TCP 49152-65535 | RPC Dynamic Ports | |
| 69 | +| TCP 445 | SMB | |
| 70 | +| UDP/TCP 389 | LDAP | |
| 71 | + |
| 72 | +* Refer to the list of required ports in [How to configure a firewall for Active Directory domains and trusts](config-firewall-for-ad-domains-and-trusts.md). |
| 73 | + |
| 74 | +* Use the `Test-NetConnection` command to test the connection between DCs: |
| 75 | + |
| 76 | + ```powershell |
| 77 | + Test-NetConnection <IP\_address\_of\_the\_DC> -Port 389 |
| 78 | +
|
| 79 | + ComputerName: <computer_name> |
| 80 | + RemoteAddress: <remote_address> |
| 81 | + RemotePort: 389 |
| 82 | + InterfaceAlias: Ethernet 2 |
| 83 | + SourceAddress: <source_address> |
| 84 | + TcpTestSucceeded : True |
| 85 | + ``` |
| 86 | + |
| 87 | + It indicates that the LDAP port TCP 389 is open between the client and the DC. |
| 88 | + |
| 89 | +* [PortQry Command Line Port Scanner Version 2.0](https://www.microsoft.com/download/details.aspx?id=17148) can also be used to identify if a port (TCP/UDP) is blocked on DCs. Here's an example syntax: |
| 90 | + |
| 91 | + ```console |
| 92 | + portqry -n <problem_server> -e 135 |
| 93 | + portqry -n <problem_server> -e 445 |
| 94 | + portqry -n <problem_server> -e 389 |
| 95 | + portqry -n <problem_server> -p UDP -e 389 |
| 96 | + portqry -n <problem_server> -r 49152:65535 |
| 97 | + ``` |
| 98 | + |
| 99 | + Port query output examples: |
| 100 | + |
| 101 | + * When the connection to TCP port 135 on a DC is blocked, the following message is displayed: |
| 102 | + |
| 103 | + ```console |
| 104 | + portqry -n <dc_name> -e 135 |
| 105 | + |
| 106 | + Querying target system called: |
| 107 | + |
| 108 | + <dc_name> |
| 109 | + |
| 110 | + Attempting to resolve name to IP address... |
| 111 | + |
| 112 | + Name resolved to <ip_address> |
| 113 | + |
| 114 | + querying... |
| 115 | + |
| 116 | + TCP port 135 (epmap service):FILTERED |
| 117 | + ``` |
| 118 | + |
| 119 | + * When the connection to TCP port 389 on a DC is successful, the following message is displayed: |
| 120 | + |
| 121 | + ```console |
| 122 | + portqry -n <dc_name> -e 389 |
| 123 | + |
| 124 | + Querying target system called: |
| 125 | + |
| 126 | + <dc_name> |
| 127 | + |
| 128 | + Attempting to resolve name to IP address... |
| 129 | + |
| 130 | + Name resolved to 192.168.1.2 |
| 131 | + |
| 132 | + querying... |
| 133 | + |
| 134 | + TCP port 389 (ldap service): LISTENING |
| 135 | + ``` |
| 136 | + |
| 137 | +* Collect network monitor traces when reproducing the issue to confirm if there's any network connectivity issue, if necessary. |
| 138 | + |
| 139 | +### Step 2: Verify if the preferred DNS server is the correct DNS server |
| 140 | + |
| 141 | +### Step 3: Verify if the DC can be discovered |
| 142 | + |
| 143 | +Run `nltest /dsgetdc` (DC Discovery) to verify if you can discover a DC. For example: |
| 144 | + |
| 145 | +```console |
| 146 | +nltest /dsgetdc:<domain_name> /force |
| 147 | + |
| 148 | + DC: \\<dc_address> |
| 149 | + Address: \\<dc_address> |
| 150 | + Dom Guid: <dom_guid> |
| 151 | + Dom Name: <dom_name> |
| 152 | + Forest Name: <foreast_name> |
| 153 | + Dc Site name: Default-First-site-Name |
| 154 | +Our Site Name: Default-First-site-Name |
| 155 | + Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE FULL_SECRET WS DS_8 DS_9 DS_10 KEYLIST |
| 156 | +The command completed successfully |
| 157 | +``` |
| 158 | + |
| 159 | +### Step 4: Verify if SRV records are registered |
| 160 | + |
| 161 | +Run `DCDiag /v` on the closest DC and verify if SRV records are registered. For example: |
| 162 | + |
| 163 | +`_ldap._tcp.dc._msdcs.<domain_name>.com.` |
0 commit comments