Hi,
Is there any other error? We could check the event viewer to see if any error about WDS?
Have we used the following article to upgrade Windows Server 2012 R2 to Windows Server 2019?
https://learn.microsoft.com/en-us/windows-server/upgrade/upgrade-2012r2-to-2019
If the upgrade successful, but the MDT and MDS fails, if possible, we could try to re-install the WDT.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.