I have deployed two EC2 instances on AWS with one as a DC role and the other as a sql server which I intend to join to the domain.
However when I try to join it I am getting the following error.
NetSetup.log
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 shows
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.
When I run the following command from the sql server I see
C:\Users\Administrator>nltest /dsgetdc:demo.local /force
Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN
Port query from sql to DC shows the following
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
It's a Windows Server 2022 Datacenter edition for DC and SQL.