Memo

メモ > サーバ > 各論: トラブル対応例 > 「Could not retrieve mirrorlist」というメールが届く

■「Could not retrieve mirrorlist」というメールが届く
1時間ごとに、Cronから以下のようなメールが届く
/etc/cron.hourly/0yum-hourly.cron: Could not retrieve mirrorlist https://mirror.webtatic.com/yum/el6/x86_64/mirrorlist error was 14: curl#60 - "SSL certificate problem: certificate has expired"
サーバにインストールされている中間証明書の期限が切れていたため、curl系のコマンドでSSL接続をした時にエラーになっていた (証明書が何らかの理由で破損したときも、このエラーになるらしい) 有効な証明書なのにcertificate has expiredになる件 | Otogeworks https://otogeworks.com/blog/a-valid-certificate-has-expired/ 以下は実際に対応したときの内容 curlでエラーになることが確認できる
$ curl https://something.com curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
ca-certificatesパッケージ(証明書が含まれている)を更新
$ sudo yum update ca-certificates
curlでエラーにならないことが確認できる
$ curl https://something.com <html><head><title>Something.</title></head> <body>Something.</body> </html>
以下はca-certificatesパッケージの更新前と更新後の比較 若干新しくなっていることが確認できる
$ yum list installed | grep ca-certificates ca-certificates.noarch 2018.2.22-65.1.21.amzn1 @amzn-updates $ sudo yum update ca-certificates $ yum list installed | grep ca-certificates ca-certificates.noarch 2018.2.22-65.1.30.amzn1 @amzn-updates
有効な証明書なのにcertificate has expiredになる件 | Otogeworks https://otogeworks.com/blog/a-valid-certificate-has-expired/

Advertisement