更新
DVSNI challenge エラーの対処法
このページでは、Certbot クライアント(旧・Let's Encrypt クライアント)による SSL/TLS 証明書取得時に、「Failed to connect to host for DVSNI challenge」というエラーが発生した場合の対処法について解説しています。
エラーメッセージ
Certbot クライアントで SSL/TLS 証明書を取得する際に、下記のエラーが発生します。
入力するコマンド:
$ ./certbot-auto certonly --standalone -d example.jp -d www.example.jp
表示されるエラーメッセージ:
Failed authorization procedure. www.example.jp (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to host for DVSNI challenge, example.jp (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to host for DVSNI challenge
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.example.jp
Type: connection
Detail: Failed to connect to host for DVSNI challenge
Domain: example.jp
Type: connection
Detail: Failed to connect to host for DVSNI challenge
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
エラーの原因と対処法
Let's Encrypt 認証サーバから Certbot クライアントを実行しているサーバに対する接続を確立できない場合に、このエラーが発生します。
考えられる原因は、下記の通りです。
- 証明書を取得しようとしているドメイン名・サブドメイン名に対して、適切なAレコード(IPアドレス)が登録されていない。
- DNSレコードの変更から十分な時間が経過していないため、Aレコード(IPアドレス)の変更が反映されていない。
- ドメイン名のAレコードとして指定されているIPアドレスと、Certbot クライアントを実行しているサーバのIPアドレスが異なる。
- ルータやファイアウォールの設定が原因で TCP Port 80(http)にインターネットから接続することができない。
- ルータやファイアウォールの設定が原因で TCP Port 443(https)にインターネットから接続することができない。
- ルータやファイアウォールの設定により、日本国外のIPアドレスからの接続ができない状態になっている。
エラーメッセージの「tls-sni-01」は、TLS 接続(TCP Port 443)時のエラーを意味します。
Certbot クライアントは TCP Port 80 (http) と TCP Port 443 (https) の両方 への接続を必要とする場合がある(Standalone プラグインなど)ことにご注意ください。
- スポンサーリンク