Caddy fails to get certificate

1. The problem I’m having:

I tried visiting my site and it said it wasn’t secure.
So I tried restarting caddy and now its having problems getting certifications

2. Error messages and/or full log output:

2023/05/12 08:42:49.490 ERROR   http.acme_client        challenge failed        {"identifier": "", "challenge_type": "http-01", "problem": {"type": "urn:ietf:params:acme:error:connection", "title": "", "detail": " Fetching Connection refused", "instance": "", "subproblems": []}}
2023/05/12 08:42:49.491 ERROR   http.acme_client        validating authorization        {"identifier": "", "problem": {"type": "urn:ietf:params:acme:error:connection", "title": "", "detail": " Fetching Connection refused", "instance": "", "subproblems": []}, "order": "", "attempt": 1, "max_attempts": 3}

2023/05/12 08:47:31.350 ERROR   tls.renew       could not get certificate from issuer   {"identifier": "", "issuer": "", "error": "HTTP 400 urn:ietf:params:acme:error:connection - Fetching Connection refused"}

(this is one of many)

3. Caddy version:

v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=

4. How I installed and ran Caddy:

Using the official documentation (Install — Caddy Documentation)

a. System environment:

Ubuntu 20.04

b. Command:

caddy start

c. Service/unit/compose file:

I dont know 

d. My complete Caddy config: {
} {
} {

5. Links to relevant resources:

This means the ACME issuers couldn’t connect to your server. You have a problem somewhere in front of Caddy, not with Caddy itself. Check DNS, check your firewall, etc.