Certbot Aborts with "AssertionError: Action corresponding to argument -p is None"

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: consulting.epatterns.com.au

I ran this command: sudo certbot -v -apache

It produced this output:An unexpected error occurred:
AssertionError: Action corresponding to argument -p is None

My web server is (include version): Apache
apache2ctl -v
Server version: Apache/2.4.55 (Ubuntu)
Server built: 2023-03-08T16:32:34

The operating system my web server runs on is (include version): Ubuntu
uname -a
Linux MM2012 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
My hosting provider, if applicable, is: NONE

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 2.7.4

The letsencrypt log file has a trace -
cat /tmp/certbot-log-fttu1bng/log

2023-11-03 09:37:45,159:DEBUG:certbot._internal.main:certbot version: 2.7.4
2023-11-03 09:37:45,160:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2023-11-03 09:37:45,160:DEBUG:certbot._internal.main:Arguments: ['-v', '-apache’]
2023-11-03 09:37:45,160:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2023-11-03 09:37:45,167:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/certbot", line 8, in <module>
  File "/opt/certbot/lib/python3.11/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 1852, in main
    config = cli.prepare_and_parse_args(plugins, cli_args)
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/cli/__init__.py", line 476, in prepare_and_parse_args
    return helpful.parse_args()
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/cli/helpful.py", line 275, in parse_args
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/cli/helpful.py", line 236, in _build_sources_dict
    action = self._find_action_for_arg(arg)
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/cli/helpful.py", line 262, in _find_action_for_arg
    raise AssertionError(f"Action corresponding to argument {arg} is None”)
AssertionError: Action corresponding to argument -p is None
2023-11-03 09:37:45,167:ERROR:certbot._internal.log:An unexpected error occurred:
2023-11-03 09:37:45,167:ERROR:certbot._internal.log:AssertionError: Action corresponding to argument -p is None

Well, that is a poor error message but the correct format of that command is:

sudo certbot -v --apache

Note the two dashes in front of apache


Supplemental information:
Using this online tool https://check-host.net/ the domain name seems ping able from everywhere
Permanent link to this check report

However using this online tool Open Port Check Tool - Test Port Forwarding on Your Router shows
Ports 80 and 443 are closed for the domain name; which also what I see from my location using nmap

$ nmap -Pn -p80,443 consulting.epatterns.com.au
Starting Nmap 7.80 ( https://nmap.org ) at 2023-11-03 02:55 UTC
Nmap scan report for consulting.epatterns.com.au (
Host is up (0.20s latency).
rDNS record for n175-39-113-176.meb4.vic.optusnet.com.au

80/tcp  closed http
443/tcp closed https

Nmap done: 1 IP address (1 host up) scanned in 0.68 seconds
1 Like

That has a very recent date [Oct 2 2023] - hmm...

How did you install that version of python?
Why/How is certbot 2.7.4 using that python?
Shouldn't it be using python from /snap/certbot/... ?


Thanks so much for all this help! Those tools will certainly help. I have just been updating a very old ubuntu server. It might have been a better idea to have rebuilt from scratch. Certainly might have been quicker. I forget and can't now find out how I updated python. I decided to make sure I was using the latest version of certbot and followed an online tutorial - perhaps an old one that had python separately installed.
Thanks again.


re. ports being closed - I think I must have been setting up the firewall when you did that. I think I'm all setup correctly now with that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.