hi @janvl
Can you please let us know what command you are using and your domain as these are relevant to the troubleshooting.
It looks like a networking issue.
On the same machine can you run wget https://acme-v01.api.letsencrypt.org/directory
It should return a JSON file
I have seen certbot creating empty PEM files which is not an issue. I believe that the files are created first and then populate with data from the web server. If the data is not coming back reliably (due to timeouts) then that would explain why you are getting empty PEM files.
To tidy up you can run the certbot certificate delete commands.

Andrei