0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【2025年05月版】RHEL9.5 の Failed to start dnf makecache への対応

Last updated at Posted at 2025-05-28

はじめに

journallog に以下のエラーが定期的に出て監視にひっかかるので静観する+頻度を修正することに。
犯人は、dnf makecache だと予想。
残メモリ量・CPU・ディスクの空き容量などは問題ないはず。
dnf makecache の実行は、デフォルトだと 6h 毎です。

May 27 15:55:49 rhel01 systemd[1]: Failed to start dnf makecache.
May 13 13:24:17 rhel01 systemd[1]: Failed to start dnf makecache. 

環境

$ uname -a
Linux rhel01 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Mar 24 11:15:27 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="9.5 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.5"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.5 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://issues.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.5
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.5"

作業概要

  • /etc/dnf/dnf.conf を修正
  • サービスの再起動

作業

/etc/dnf/dnf.conf を修正

[main] セクションに以下の行を追加。デフォルトは 6h 。

/etc/dnf/dnf.conf
metadata_expire=24h

サービスの再起動

sudo systemctl daemon-reload
sudo systemctl restart dnf-makecache.timer

手動で実行する場合

sudo dnf clean all
sudo dnf makecache

さいごに

かんたんでしたね

追記

このあと、rhel 9.5 から rhel 9.6 にアップデートして様子を見ることにしました。

$ uname -a
Linux rhel01 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Mar 24 11:15:27 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="9.6 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.6"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.6 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://issues.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.6"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?