Linux8-messages有dnf报错处理

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

Aug 5 05:44:14 db dnf[356416]: Unable to read consumer identity

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

Aug 5 05:44:14 db dnf[356416]: CentOS Linux 8 0.0 B/s | 0 B 00:00

Aug 5 05:44:14 db dnf[356416]: Errors during downloading metadata for repository 'InstallMedia':

Aug 5 05:44:14 db dnf[356416]: - 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 dnf[356416]: 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 systemd[1]: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE

Aug 5 05:44:14 db systemd[1]: dnf-makecache.service: Failed with result 'exit-code'.

Aug 5 05:44:14 db systemd[1]: Failed to start dnf makecache.

Aug 5 09:02:05 db dnf[473997]: Unable to read consumer identity

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

Aug 5 09:02:05 db dnf[473997]: CentOS Linux 8 0.0 B/s | 0 B 00:00

Aug 5 09:02:05 db dnf[473997]: Errors during downloading metadata for repository 'InstallMedia':

Aug 5 09:02:05 db dnf[473997]: - 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 dnf[473997]: 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 systemd[1]: dnf-makecache.service: Main process exited, code=exited, status=1/FAILURE

Aug 5 09:02:05 db systemd[1]: 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 systemd\[1\]: Starting dnf makecache... Aug 05 10:07:46 db dnf\[513042\]: Updating Subscription Management repositories. Aug 05 10:07:46 db dnf\[513042\]: Unable to read consumer identity Aug 05 10:07:46 db dnf\[513042\]: This system is not registered with an entitlement server. You can use subscription-manager to register. Aug 05 10:07:46 db dnf\[513042\]: Metadata cache refreshed recently. Aug 05 10:07:46 db systemd\[1\]: dnf-makecache.service: Succeeded. Aug 05 10:07:46 db systemd\[1\]: 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 systemd\[1\]: Started dnf makecache --timer. \[root@db \~\]# systemctl stop dnf-makecache.timer \[root@db \~\]# systemctl disable dnf-makecache.timer

相关推荐
晨曦5432105 分钟前
零基础12周精通Linux学习计划
linux
linux修理工15 分钟前
n1 Armbian OS 24.11.0 noble 安装suricata
linux·运维·服务器
傅里叶19 分钟前
sudo启动Flutter程序AMD初始化失败
linux·flutter
bug攻城狮20 分钟前
CentOS 7 出现 “Could not resolve host“ 错误的修复方案
linux·运维·centos
feifeigo12336 分钟前
CentOS系统管理:useradd命令的全面解析
linux·运维·centos
こ进制掌控者39 分钟前
CentOS 8重启后网卡不见了解决办法
linux·运维·centos
荣光波比39 分钟前
Nginx 实战系列(六)—— Nginx 性能优化与防盗链配置指南
运维·nginx·性能优化·云计算
Nightwish544 分钟前
Linux随记(二十三 )
linux·运维
牛奶咖啡132 小时前
从零到一使用Linux+Nginx+MySQL+PHP搭建的Web网站服务器架构环境——LNMP(上)
linux·lnmp·ngnix的源码安装部署·mysql的二进制文件安装部署·php源码的安装部署·记录并解决安装php的各种问题
软件测试很重要2 小时前
UOS20系统安装与 SSH/XRDP 远程访问功能配置指南
linux·运维·ssh