Sudo certbot certonly --standalone failed

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: swaggerhub.mwhiggins.com

I ran this command: sudo certbot certonly --standalone

It produced this output: I have a log file, but here is a snip:

{
“identifier”: {
“type”: “dns”,
“value”: “swaggerhub.mwhiggins.com
},
“status”: “pending”,
“expires”: “2020-08-06T17:47:43Z”,
“challenges”: [
{
“type”: “http-01”,
“status”: “pending”,
“url”: “https://acme-v02.api.letsencrypt.org/acme/chall-v3/6211849009/aemkew”,
“token”: “di0DU056a_V2iNdiK4IAVEQ7V2do_pWS-Zfw9GZvdvY”
},
{
“type”: “dns-01”,
“status”: “pending”,
“url”: “https://acme-v02.api.letsencrypt.org/acme/chall-v3/6211849009/q67mdw”,
“token”: “di0DU056a_V2iNdiK4IAVEQ7V2do_pWS-Zfw9GZvdvY”
},
{
“type”: “tls-alpn-01”,
“status”: “pending”,
“url”: “https://acme-v02.api.letsencrypt.org/acme/chall-v3/6211849009/X6lwHA”,
“token”: “di0DU056a_V2iNdiK4IAVEQ7V2do_pWS-Zfw9GZvdvY”
}
]
}
2020-07-30 18:47:44,232:DEBUG:acme.client:Storing nonce: 0102qi5u2B_eBxEf7QXDNWxGDqgIX6z06SPRK3vjr-dgHSA
2020-07-30 18:47:44,233:INFO:certbot.auth_handler:Performing the following challenges:
2020-07-30 18:47:44,233:INFO:certbot.auth_handler:http-01 challenge for swaggerhub.mwhiggins.com
2020-07-30 18:47:44,234:DEBUG:acme.standalone:Failed to bind to :80 using IPv6
2020-07-30 18:47:44,234:DEBUG:acme.standalone:Failed to bind to :80 using IPv4
2020-07-30 18:47:44,234:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/certbot/plugins/standalone.py”, line 76, in run
address, self.http_01_resources)
File “/usr/lib/python3/dist-packages/acme/standalone.py”, line 189, in init
BaseDualNetworkedServers.init(self, HTTP01Server, *args, **kwargs)
File “/usr/lib/python3/dist-packages/acme/standalone.py”, line 108, in init

*********** command line returned *********************

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Please enter in your domain name(s) (comma and/or space separated) (Enter ‘c’
to cancel): swaggerhub.mwhiggins.com
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for swaggerhub.mwhiggins.com
Cleaning up challenges
Problem binding to port 80: Could not bind to IPv4 or IPv6.

My web server is (include version): nginx

The operating system my web server runs on is (include version): Ubuntu 16.06 LTS

My hosting provider, if applicable, is: none, bespoke application (SmartBear SwaggerHub)

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

1 Like

Do you have nginx running while running that specific certbot command with --standalone? If so, why are you using --standalone?

1 Like

nginx restarts from docker/kubernetes - i had to kill the container. got certificate now. thanks.

1 Like

you have alternatives. you can get that nginx container to proxy .well-known/acme-challenge to a certbot container, for example.