ansible-playbookを実行中に下記のようなエラーが発生。
TASK: [pgsql| be sure postgresql necessary package is installed] **********
failed: [server] => (item=make,gcc,zlib-devel,readline-devel,ncurses-devel) => {"failed": true, "item": "make,gcc,zlib-devel,readline-devel,ncurses-devel"}
msg: Error from repoquery: ['/usr/bin/repoquery', '--show-duplicates', '--plugins', '--quiet', '-q', '--qf', '%{name}-%{version}-%{release}.%{arch}', 'zlib-devel']: failure: repodata/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9
b467f9845bd3-primary.sqlite.bz2 from updates: [Errno 256] No more mirrors to try.
http://xxxxxxxxx/centos/7/updates/x86_64/repodata/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Could not match packages: failure: repodata/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2 from updates: [Errno 256] No more mirrors to try.
http://xxxxxxxxx/centos/7/updates/x86_64/repodata/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
FATAL: all hosts have already failed -- aborting
問題が起きたサーバーで、お約束を実行するもだめ。
# yum clean all
# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
~ 省略 ~
http://xxxxxxxxx/centos/7/updates/x86_64/repodata/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
どうやらこいつが悪さをしているみたいだ。
d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2
ので、どうにかする。
# find / -name "*primary.sqlite.bz2"
/var/cache/yum/x86_64/7/base/efa521576f53587de26616ea1e45f902993abcd9d67e707b8993b5f29bd15956-primary.sqlite.bz2
/var/cache/yum/x86_64/7/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2
# rm var/cache/yum/x86_64/7/d66ff97e9fe6b3e6efb794bedc0d336cd1c6e93e7ae7dd6646c9b467f9845bd3-primary.sqlite.bz2
# yum clean all
# yum update
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
No packages marked for updat
うん、完璧!
yumで何かあったら、yum clean all
を実行してみる。
の原則が通用せず途方に暮れかけましたが、どうにかなってよかったd(ツ)b
この例はCentOS7 ですが、6、5でもいけるっぽい。