Missing file regr.json

My domain is: *.ffolio-gwales.dev.supadu.com

I ran this command:
sudo /usr/local/bin/certbot-auto certonly --manual --preferred-challenges=dns -d *.ffolio-gwales.dev.supadu.com --server [https://acme-v02.api.letsencrypt.org](https://acme-v02.api.letsencrypt.org/) --dry-run

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
An unexpected error occurred:
acme.errors.ClientError: Unexpected response Content-Type: text/html
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version): Linode VM

The operating system my web server runs on is (include version): CentOS Linux release 8.1.1911 (Core)

My hosting provider, if applicable, is:

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
$ certbot-auto --version
Requesting to rerun /usr/local/bin/certbot-auto with root privileges…
certbot 1.6.0

When I checked the log files I saw this:

Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 234, in _load_for_server_path
    with open(self._regr_path(account_dir_path)) as regr_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/regr.json'

Sure enough the file regr.json is not there:

[root@dev directory]# pwd
/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory
[root@dev directory]# ls -la
total 12
drwx------. 3 root root 4096 Jan 20  2020 .
drwx------. 3 root root 4096 Jan 20  2020 ..
drwx------. 2 root root 4096 Jan 20  2020 cd5201f35ebd078070332aed3757be89
[root@dev directory]#

Is this definitely the cause of the command failing? If so, how do I regenerate this file and any ideas as to why it went missing?

Thanks

I’m sorry, but your topic title has a whole different kind of error than the output you’ve pasted in your post. Both are missing a lot of context and without that context, I think it will be rather impossible to help you. Could you please share the contents of the most recent log file in the directory mentioned?

1 Like

Thanks @Osiris.

Here is the most recent log file:

# cat letsencrypt.log
2020-07-30 15:14:24,542:DEBUG:certbot._internal.main:certbot version: 1.6.0
2020-07-30 15:14:24,544:DEBUG:certbot._internal.main:Arguments: ['--manual', '--preferred-challenges=dns', '-d', '*.ffolio-gwales.dev.supadu.com', '--server', 'https://acme-v02.api.letsencrypt.org', '--dry-run']
2020-07-30 15:14:24,544:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-07-30 15:14:24,567:DEBUG:certbot._internal.log:Root logging level set at 20
2020-07-30 15:14:24,568:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-07-30 15:14:24,569:DEBUG:certbot._internal.plugins.selection:Requested authenticator manual and installer None
2020-07-30 15:14:24,575:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * manual
Description: Manual configuration or run your own shell scripts
Interfaces: IAuthenticator, IPlugin
Entry point: manual = certbot._internal.plugins.manual:Authenticator
Initialized: <certbot._internal.plugins.manual.Authenticator object at 0x7f2a77bd8390>
Prep: True
2020-07-30 15:14:24,578:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.manual.Authenticator object at 0x7f2a77bd8390> and installer None
2020-07-30 15:14:24,578:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator manual, Installer None
2020-07-30 15:14:24,579:DEBUG:certbot._internal.account:Account loading problem
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 234, in _load_for_server_path
    with open(self._regr_path(account_dir_path)) as regr_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/regr.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 182, in _find_all_for_server_path
    accounts.append(self._load_for_server_path(account_id, server_path))
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 241, in _load_for_server_path
    raise errors.AccountStorageError(error)
certbot.errors.AccountStorageError: [Errno 2] No such file or directory: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/regr.json'
2020-07-30 15:14:24,579:DEBUG:certbot._internal.account:Account loading problem
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 234, in _load_for_server_path
    with open(self._regr_path(account_dir_path)) as regr_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/regr.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 182, in _find_all_for_server_path
    accounts.append(self._load_for_server_path(account_id, server_path))
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/account.py", line 241, in _load_for_server_path
    raise errors.AccountStorageError(error)
certbot.errors.AccountStorageError: [Errno 2] No such file or directory: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/regr.json'
2020-07-30 15:14:25,001:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org.
2020-07-30 15:14:25,004:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
2020-07-30 15:14:25,514:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "GET / HTTP/1.1" 200 None
2020-07-30 15:14:25,515:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Thu, 30 Jul 2020 15:14:39 GMT
Content-Type: text/html
Last-Modified: Mon, 25 Feb 2019 20:15:27 GMT
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"5c744cdf-87e"
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
Content-Encoding: gzip

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content=
  "width=device-width, initial-scale=1">

  <title>Boulder: The Let's Encrypt CA</title>
  <link href=
  "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
  rel="stylesheet" type="text/css">
  <link href=
  "//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"
  rel="stylesheet" type="text/css">
</head>

<body>
  <div class="container-fluid">
    <div class="row">
      <div class="col-xs-6 text-right">
        <p style="font-size: 90px;">
        <i class="fa fa-barcode"></i></p>
      </div>

      <div class="col-xs-6 text-left">
        <h1>Boulder<br>
        <small>The Let's Encrypt CA</small></h1>
      </div>
    </div>

    <div class="row">
      <div class="col-xs-8 col-xs-offset-2 text-center">
        <h3>This is an <a href="https://github.com/letsencrypt/acme-spec/">ACME</a> Certificate Authority running <a href="https://github.com/letsencrypt/boulder">Boulder</a>.</h3>
        <p>This is a <em>programmatic</em> endpoint, an API for a computer to talk to. You should probably be using a specialized client to utilize the service, and not your web browser. See <a href="https://letsencrypt.org/"><tt>https://letsencrypt.org/</tt></a> for help.</p>
        <p>If you're trying to use this service, note that the starting point, <em>the directory</em>, is available at this URL: <a href="https://acme-v02.api.letsencrypt.org/directory"><tt>https://acme-v02.api.letsencrypt.org/directory</a></tt>.</p>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4 col-xs-offset-2 text-center">
        <p><a href="https://letsencrypt.status.io" title="Twitter">
          <i class="fa fa-area-chart"></i>
          Service Status (letsencrypt.status.io)
        </a></p>
      </div>
      <div class="col-xs-4 text-center">
        <p><a href="https://twitter.com/letsencrypt" title="Twitter">
          <i class="fa fa-twitter"></i>
          Check with us on Twitter
        </a></p>
      </div>
    </div> <!-- row -->
  </div>


</body>
</html>

2020-07-30 15:14:25,516:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
    load_entry_point('letsencrypt==0.7.0', 'console_scripts', 'letsencrypt')()
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/main.py", line 1353, in main
    return config.func(config, plugins)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/main.py", line 1220, in certonly
    le_client = _init_le_client(config, auth, installer)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/main.py", line 603, in _init_le_client
    acc, acme = _determine_account(config)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/main.py", line 519, in _determine_account
    config, account_storage, tos_cb=_tos_cb)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/client.py", line 173, in register
    acme = acme_from_config_key(config, key)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/certbot/_internal/client.py", line 43, in acme_from_config_key
    return acme_client.BackwardsCompatibleClientV2(net, key, config.server)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/acme/client.py", line 831, in __init__
    directory = messages.Directory.from_json(net.get(server).json())
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/acme/client.py", line 1168, in get
    self._send_request('GET', url, **kwargs), content_type=content_type)
  File "/opt/eff.org/certbot/venv/lib64/python3.6/site-packages/acme/client.py", line 1087, in _check_response
    'Unexpected response Content-Type: {0}'.format(response_ct))
acme.errors.ClientError: Unexpected response Content-Type: text/html
2020-07-30 15:14:25,517:ERROR:certbot._internal.log:An unexpected error occurred:
2020-07-30 15:14:25,517:ERROR:certbot._internal.log:acme.errors.ClientError: Unexpected response Content-Type: text/html
[root@dev letsencrypt]#

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