Linux8-messages有dnf报错处理

隔几个小时,就有如下的告警

Aug 5 05:44:14 db dnf356416: Unable to read consumer identity

Aug 5 05:44:14 db dnf356416: This system is not registered with an entitlement server. You can use subscription-manager to register.

Aug 5 05:44:14 db dnf356416: CentOS Linux 8 0.0 B/s | 0 B 00:00

Aug 5 05:44:14 db dnf356416: Errors during downloading metadata for repository 'InstallMedia':

Aug 5 05:44:14 db dnf356416: - Curl error (37): Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml Couldn't open file /mnt/BaseOS/repodata/repomd.xml

Aug 5 05:44:14 db dnf356416: Error: Failed to download metadata for repo 'InstallMedia': Cannot download repomd.xml: Curl error (37): Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml Couldn't open file /mnt/BaseOS/repodata/repomd.xml

Aug 5 05:44:14 db systemd1: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE

Aug 5 05:44:14 db systemd1: dnf-makecache.service: Failed with result 'exit-code'.

Aug 5 05:44:14 db systemd1: Failed to start dnf makecache.

Aug 5 09:02:05 db dnf473997: Unable to read consumer identity

Aug 5 09:02:05 db dnf473997: This system is not registered with an entitlement server. You can use subscription-manager to register.

Aug 5 09:02:05 db dnf473997: CentOS Linux 8 0.0 B/s | 0 B 00:00

Aug 5 09:02:05 db dnf473997: Errors during downloading metadata for repository 'InstallMedia':

Aug 5 09:02:05 db dnf473997: - Curl error (37): Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml Couldn't open file /mnt/BaseOS/repodata/repomd.xml

Aug 5 09:02:05 db dnf473997: Error: Failed to download metadata for repo 'InstallMedia': Cannot download repomd.xml: Curl error (37): Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml Couldn't open file /mnt/BaseOS/repodata/repomd.xml

Aug 5 09:02:05 db systemd1: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE

Aug 5 09:02:05 db systemd1: dnf-makecache.service: Failed with result 'exit-code'.

查看dnf-makecache.service服务是非活动,执行stop发现问题点

root@db \~# systemctl status dnf-makecache.service

● dnf-makecache.service - dnf makecache

Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.service; static; vendor preset: disabled)

Active: inactive (dead) since Mon 2024-08-05 10:07:46 CST; 52min ago

Process: 513042 ExecStart=/usr/bin/dnf makecache --timer (code=exited, status=0/SUCCESS)

Main PID: 513042 (code=exited, status=0/SUCCESS)

Aug 05 10:07:46 db systemd1: Starting dnf makecache...

Aug 05 10:07:46 db dnf513042: Updating Subscription Management repositories.

Aug 05 10:07:46 db dnf513042: Unable to read consumer identity

Aug 05 10:07:46 db dnf513042: This system is not registered with an entitlement server. You can use subscription-manager to register.

Aug 05 10:07:46 db dnf513042: Metadata cache refreshed recently.

Aug 05 10:07:46 db systemd1: dnf-makecache.service: Succeeded.

Aug 05 10:07:46 db systemd1: Started dnf makecache.

root@db opt# systemctl stop dnf-makecache.service
Warning: Stopping dnf-makecache.service, but it can still be activated by:
dnf-makecache.timer

直接关闭dnf-makecache.timer,观察了几个小时,发现再也不报错了

root@db opt# systemctl status dnf-makecache.timer

● dnf-makecache.timer - dnf makecache --timer

Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled)

Active: active (waiting) since Thu 2024-03-21 11:23:47 CST; 4 months 15 days ago

Trigger: Mon 2024-08-05 11:48:32 CST; 46min left

Mar 21 11:23:47 db systemd1: Started dnf makecache --timer.

root@db \~# systemctl stop dnf-makecache.timer

root@db \~# systemctl disable dnf-makecache.timer

相关推荐
未济5 天前
linux 配置环境变量
linux
傲世仙尊5 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
虎头金猫5 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
_艾伦 耶格尔.5 天前
进程间通信
linux
AI职业加油站5 天前
AI智能体应用工程师证书:政策红利下的职业新风口
大数据·运维·人工智能·学习·职场发展
Liuqy-055 天前
Linux IO编程——静态库、动态库
linux
此冬歌咏5 天前
K8s 节点故障实战:优雅驱逐 31 秒,硬故障 331 秒,以及那个永远 Pending 的 Pod
运维·k8s
彧azz5 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅5 天前
linux(8) 软硬链接
linux·运维·服务器
AIgorithmGEEK5 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid