Non-interactive attempting to ask: Please choose an account

My domain is: cyva.lese-fowler.us

I ran this command:
command: certbot certonly -vvv --webroot -w /var/www/html/ -d cyva.lese-fowler.us --agree-tos --email jcfowler@pacbell.net --no-eff-email
entrypoint: "/bin/sh -cx 'trap exit TERM; while :; do certbot certonly -vvv --webroot -w /var/www/html/ -d cyva.lese-fowler.us --agree-tos --email jcfowler@pacbell.net --no-eff-email --non-interactive; sleep 12h & wait $${!}; done;'"

It produced this output:
Domain: cyva.lese-fowler.us
My web server is (include version): nginx 1.19.5
The operating system my web server runs on is (include version): Docker / Debian

The process is prompting to select the account when I am attempting to run non-interactive. How do I clean this up? I have removed the staging subdirectory in accounts so only one account remains. Made no difference on the next run.

Output:

certbot.errors.MissingCommandlineFlag: Missing command line flag or config entry for this setting:
| Please choose an account
| Choices: ['certbot@2020-07-18T23:59:58Z (5a92)', 'cyva@2021-03-15T19:17:59Z (364a)']
| Missing command line flag or config entry for this setting:
| Please choose an account
| Choices: ['certbot@2020-07-18T23:59:58Z (5a92)', 'cyva@2021-03-15T19:17:59Z (364a)']
| Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

2021-06-02 21:44:24,610:DEBUG:certbot._internal.main:certbot version: 1.16.0
2021-06-02 21:44:24,611:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/local/bin/certbot
2021-06-02 21:44:24,611:DEBUG:certbot._internal.main:Arguments: ['-vvv', '--webroot', '-w', '/var/www/html/', '-d', 'cyva.lese-fowler.us', '--agree-tos', '--email', 'jcfowler@pacbell.net', '--no-eff-email', '--non-interactive']
2021-06-02 21:44:24,611:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2021-06-02 21:44:24,648:DEBUG:certbot._internal.log:Root logging level set at 0
2021-06-02 21:44:24,653:DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None
2021-06-02 21:44:24,666:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot._internal.plugins.webroot:Authenticator
Initialized: <certbot._internal.plugins.webroot.Authenticator object at 0xb56b3628>
Prep: True
2021-06-02 21:44:24,668:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.webroot.Authenticator object at 0xb56b3628> and installer None
2021-06-02 21:44:24,669:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator webroot, Installer None
2021-06-02 21:44:24,843:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/local/bin/certbot", line 33, in
sys.exit(load_entry_point('certbot', 'console_scripts', 'certbot')())
File "/opt/certbot/src/certbot/certbot/main.py", line 15, in main
return internal_main.main(cli_args)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1552, in main
return config.func(config, plugins)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1396, in certonly
le_client = _init_le_client(config, auth, installer)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 742, in _init_le_client
acc, acme = _determine_account(config)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 650, in _determine_account
acc = display_ops.choose_account(accounts)
File "/opt/certbot/src/certbot/certbot/display/ops.py", line 84, in choose_account
code, index = z_util(interfaces.IDisplay).menu(
File "/opt/certbot/src/certbot/certbot/display/util.py", line 539, in menu
self._interaction_fail(message, cli_flag, "Choices: " + repr(choices))
File "/opt/certbot/src/certbot/certbot/display/util.py", line 495, in _interaction_fail
raise errors.MissingCommandlineFlag(msg)
certbot.errors.MissingCommandlineFlag: Missing command line flag or config entry for this setting:
Please choose an account
Choices: ['certbot@2020-07-18T23:59:58Z (5a92)', 'cyva@2021-03-15T19:17:59Z (364a)']
2021-06-02 21:44:24,847:ERROR:certbot._internal.log:Missing command line flag or config entry for this setting:
Please choose an account
Choices: ['certbot@2020-07-18T23:59:58Z (5a92)', 'cyva@2021-03-15T19:17:59Z (364a)']

Hi!

What is the output of this command:

sudo ls -l /etc/letsencrypt/accounts/acme-{staging-,}v02.api.letsencrypt.org/directory
1 Like

The contents of the accounts directory is:
/etc/letsencrypt/accounts # ls -lR
.:
total 8
drwxr-xr-x 3 root root 4096 Mar 15 12:17 acme-v02.api.letsencrypt.org

./acme-v02.api.letsencrypt.org:
total 4
drwx------ 4 root root 4096 Mar 15 12:17 directory

./acme-v02.api.letsencrypt.org/directory:
total 8
drwx------ 2 root root 4096 Mar 15 12:17 364a782a9e028f2f20d12a702c7326c1
drwx------ 2 root root 4096 Jul 18 2020 5a92360670005eed9769b877e3a41df4

./acme-v02.api.letsencrypt.org/directory/364a782a9e028f2f20d12a702c7326c1:
total 12
-rw-r--r-- 1 root root 107 Jun 2 20:51 meta.json
-r-------- 1 root root 1632 Mar 15 12:17 private_key.json
-rw-r--r-- 1 root root 79 Jun 2 20:51 regr.json

./acme-v02.api.letsencrypt.org/directory/5a92360670005eed9769b877e3a41df4:
total 12
-rw-r--r-- 1 root root 110 Jun 2 20:50 meta.json
-r-------- 1 root root 1632 Jul 18 2020 private_key.json
-rw-r--r-- 1 root root 78 Jun 2 20:50 regr.json

That helped, I reviewed the meta.json files and removed the oldest directory path.
I think it would be a nice feature if certbot had a way to list the accounts and allow to delete it.

Thank You for the pointer!

1 Like

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