I'm running into a strange issue with my EC2 instances. I've set up an Active Directory Directory Service and successfully joined six Windows Server 2022 servers to it. While joining, I set the IPv4 DNS settings manually to the first DNS reported by the Directory Service, and initially, everything works fine. The instances reboot and I can connect via RDP using the domain admin account. However, after some time, say an hour, when I restart or stop and start the instance again, the reachability check fails and I can't connect to the instances anymore. Any thoughts on what might be causing this?
4 Answers
You might want to update your DHCP option sets rather than setting everything manually inside the instance OS. It could simplify things for you.
This could be related to DHCP leases. If your DHCP lease is expiring after an hour, the instance might not be getting a new IP address, or it could be a wrong gateway causing the issue. Also, check if any Group Policies from your AD might be affecting the instances over time. Have you tried accessing the instance through the AWS console to see what's happening?
Have you considered using the EC2 serial console? It can help you access the Windows Server boot manager in case of boot failures. It’s been useful for debugging similar issues, especially on Linux instances.
It sounds like it might be related to Group Policies if the problem only appears after joining the domain. Try creating a test Organizational Unit (OU) with no GPOs applied, move your instance there, and see if the issue persists after a reboot. You can also review and research your policies to understand better.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures