2017年07月

Failed authorization procedure.

ErogameScapeではLet's EncryptのSSL証明書を更新する際に以下のコマンドを実行しています。

# letsencrypt-auto renew --force-renew

今まで問題なかったのですが、本日以下のようなエラーを吐いて更新出来ませんでした。

/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/erogamescape.dyndns.org.conf
-------------------------------------------------------------------------------
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for erogamescape.dyndns.org
Waiting for verification...
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/erogamescape.dyndns.org.conf produced an unexpected error: Failed authorization procedure. erogamescape.dyndns.org (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout. Skipping.

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/erogamescape.dyndns.org/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: erogamescape.dyndns.org
   Type:   connection
   Detail: Timeout

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA 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.

NOTEに該当する部分はまったく問題ないので、何をどうすれば直るかさっぱり分かりませんでした。
いつもはサブコマンドに「renew」を指定しているのですが「run」を指定してみたら、なぜか更新できました…
※renewとrunの違いは、途中で何かを聞かれるか否かの違い…だと思っています。

# letsencrypt-auto run --force-renew -d erogamescape.dyndns.org
/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for erogamescape.dyndns.org
Waiting for verification...
Cleaning up challenges
Deploying Certificate for erogamescape.dyndns.org to VirtualHost /etc/httpd/conf.d/ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1

-------------------------------------------------------------------------------
Your existing certificate has been successfully renewed, and the new certificate
has been installed.

The new certificate covers the following domains:
https://erogamescape.dyndns.org

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=erogamescape.dyndns.org
-------------------------------------------------------------------------------

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/erogamescape.dyndns.org/fullchain.pem. Your
   cert will expire on 2017-10-12. To obtain a new or tweaked version
   of this certificate in the future, simply run letsencrypt-auto
   again with the "certonly" option. To non-interactively renew *all*
   of your certificates, run "letsencrypt-auto renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

再度、オプションを「renew」にしたら、更新できました。

# letsencrypt-auto renew --force-renew
/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/erogamescape.dyndns.org.conf
-------------------------------------------------------------------------------
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for erogamescape.dyndns.org
Waiting for verification...
Cleaning up challenges

-------------------------------------------------------------------------------
new certificate deployed with reload of apache server; fullchain is
/etc/letsencrypt/live/erogamescape.dyndns.org/fullchain.pem
-------------------------------------------------------------------------------

Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/erogamescape.dyndns.org/fullchain.pem (success)

何がいけなかったのでしょうか…

インフラエンジニアのスキル(ErogameScape構築/運用の場合)

インフラエンジニアのスキルチェックリストを書き出してみたよを見て、このチェックリストの項目において、ErogameScapeを構築/運用する場合を書いてみます。
※チェックリストにないスキルもいろいろ必要だと思います。一番必要なのはErogameScapeを構築/運用しても苦にならないことじゃないかな…

DB設計

  • 必須 : 要件からDB定義を作成できる
  • 必須 : ER図を作成できる
  • 必須 : 第3正規化まで正規化できる
  • 必須 : パフォーマンスを意識したインデックス設定ができる

パッケージ管理

  • 不要

Webサーバー構築

  • Apacheは必須 : Apache・NginxでWebサーバーを構築できる
  • 不要 : リバースプロキシを設定できる
  • 不要 : エラーログが読める
  • 必須 : バーチャルホストが設定できる
  • たまに必要 : Rewriteのルールが記述できる
  • 必須 : HTTPSのWebサーバーを立てられる
  • 不要 : HTTP/2化できる
  • 不要 : 負荷分散計画が立てられる

DBサーバー構築

  • PostgreSQLは必須 : MySQL / PostgreSQLでDBサーバーを構築できる
  • たまに必要 : DBサーバーのパフォーマンスチューニングができる
  • 必須 : ボトルネックとなっているクエリを特定し改善案が立てられる
  • 必須 : DBレプリケーションが構築できる
  • 必須 : DB MasterのHA化ができる
  • 不要 : DBの水平分割・垂直分割を組める
  • 必須 : 準同期レプリケーションが組める
  • 必須 : レプリケーションが停止した場合に原因対処と復旧ができる

DNSサーバー構築

  • 必須 : DNSの仕組みを理解している
  • 不要 : BINDでDNSサーバーを構築できる
  • たまに必要 : ゾーンファイルを記述できる
  • 不要 : DNSスレーブサーバーを構築できる

メールサーバー構築

  • 不要

キャッシュサーバー

  • 不要

ロードバランサー

  • 必須 : ipvsadm + keepalivedでLVSを構築できる
  • 不要 : PacemakerでHAIPを構成できる
  • 不要 : HAProxyでプロキシサーバーを構築できる
  • 不要 : ヘルスチェックスクリプトを記述できる
  • 知らない : BIG-IPの設定ができる

監視サーバー

  • 必須 : Muninでリソース監視ができる
  • 他は不要

ログ管理

  • 不要

AWS

  • 不要

仮想化

  • 不要

Docker

  • 不要

Ansible

  • 知らない

ストレージ

  • たまに必要 : CUIでパーティション操作ができる
  • 不要 : 各ファイルシステムの特性を理解している
  • 知らない : 誤って削除したファイルの救出方法を知っている
  • 必須 : 容量が肥大化しているファイルを特定できる
  • 必須 : ディスクI/Oを計測しボトルネックを特定できる
  • 必須 : ファイルマスクを理解している
  • たまに必要 : ファイルのタイムスタンプを変更できる
  • RAID1が必須 : RAID0〜RAID10までのRAID構成が組める
  • 必須 : ソフトウェアRAIDとハードウェアRAIDの特性の違いを理解している
  • 不要 : NFS環境が構築できる
  • 不要 : Samba環境を構築できる
  • 知らない : lsyncdを使ってファイル同期環境が構築できる
  • 知らない : テープドライブのCUI操作ができる

ネットワーク

  • 必須 : ネットワークレイヤーの違いを理解している
  • 必須 : ルーターとL3スイッチ、ネットワークハブとL2スイッチの違いを説明できる
  • 不要 : NICの特性を理解している
  • 不要 : BGPを理解している
  • 不要 : DHCPのルールを設定できる
  • 不要 : オートネゴシエーションの特性を理解しオン・オフともに設定できる
  • たまに必要 : WireSharkなどのパケットキャプチャツールを使用することができる
  • 知らない : iperfなどでネットワーク速度を計測できる
  • 不要 : Cisco IOSをCLIで設定できる
  • 不要 : OpenFlowを理解している
  • たまに必要 : ネットワークのボトルネックを特定できる
  • 必要 Luaは知らない: YAMAHA RTXシリーズをCLIで設定できる。Luaで拡張できる
  • 不要 : タグベースVLANやポートベースVLANを構築できる
  • 必要 : PPTP / IPsecのVPNを構築できる

メモリ

  • 不要

ラック

  • 不要


記事検索