DNS problem: query timed out looking up A for xx.com

I had this problem. In my case the server was not able to connect due to a NAT error.
I had to reconfigure NAT to forward port 443 to my server. The external DNS was pointing to the wrong IP.(it somehow changed).
So, be sure your server is reachable by the letsencrypt server at port 443.