无法加入域

无法加入域

我已经在 AWS 上部署了两个 EC2 实例,其中一个作为 DC 角色,另一个作为 SQL 服务器,我打算将其加入到域中。

但是当我尝试加入时出现以下错误。

网络设置日志

01/27/2023 00:12:04:860 ----------------------------------------------------------------

-
01/27/2023 00:12:04:860 NetpValidateName: checking to see if 'SQL' is valid as type 1 name
01/27/2023 00:12:04:860 NetpCheckNetBiosNameNotInUse for 'SQL' [MACHINE] returned 0x0
01/27/2023 00:12:04:860 NetpValidateName: name 'SQL' is valid for type 1
01/27/2023 00:12:04:860 -----------------------------------------------------------------
01/27/2023 00:12:04:860 NetpValidateName: checking to see if 'sql' is valid as type 5 name
01/27/2023 00:12:04:860 NetpValidateName: name 'sql' is valid for type 5
01/27/2023 00:12:04:860 -----------------------------------------------------------------
01/27/2023 00:12:04:860 NetpValidateName: checking to see if 'demo.local' is valid as type 3 name
01/27/2023 00:12:19:872 NetpCheckDomainNameIsValid for demo.local returned 0x54b, last error is 0x0
01/27/2023 00:12:19:872 NetpCheckDomainNameIsValid [ Exists ] for 'demo.local' returned 0x54b

dcdiag.log 显示

DNS was successfully queried for the service location (SRV) resource record used to locate a domain controller for domain "demo.local":

The query was for the SRV record for _ldap._tcp.dc._msdcs.demo.local

The following domain controllers were identified by the query:
dc.demo.local


However no domain controllers could be contacted.

Common causes of this error include:

- Host (A) or (AAAA) records that map the names of the domain controllers to their IP addresses are missing or contain incorrect addresses.

- Domain controllers registered in DNS are not connected to the network or are not running.

当我从 SQL 服务器运行以下命令时,我看到

C:\Users\Administrator>nltest /dsgetdc:demo.local /force
Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN

从 SQL 到 DC 的端口查询显示以下内容

C:\Users\Administrator>portqry -n xx.xx.xx.xx -e 53 -p both

Querying target system called:

 xx.xx.xx.xx

Attempting to resolve IP address to a name...


IP address resolved to dc.demo.local

querying...

TCP port 53 (domain service): LISTENING

UDP port 53 (domain service): LISTENING

这是适用于 DC 和 SQL 的 Windows Server 2022 数据中心版本。

相关内容