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

相关推荐
lllsure7 小时前
Linux 实用指令
linux·物联网
努力的小T7 小时前
使用 Docker 部署 Apache Spark 集群教程
linux·运维·服务器·docker·容器·spark·云计算
Nerd Nirvana7 小时前
OpenSSL crt & key (生成一套用于TLS双向认证的证书密钥)
linux·ssl·shell·认证·加密·tls·oepnssl
letisgo58 小时前
记录一次部署PC端网址全过程
linux·阿里云·服务器运维
枫叶落雨2228 小时前
08-Elasticsearch
运维·jenkins
猫猫的小茶馆8 小时前
【网络编程】UDP协议
linux·服务器·网络·网络协议·ubuntu·udp
尚墨11118 小时前
linux 安装启动zookeeper全过程及遇到的坑
linux·zookeeper
鱼嘻9 小时前
Linux自学day23-进程和线程
linux·服务器·c语言·进程和线程
AuGuSt_819 小时前
在windows下安装windows+Ubuntu16.04双系统(下)
linux·ubuntu·双系统
old_power9 小时前
Linux(Ubuntu24.04)源码编译安装OpenCV4.6.0
linux·opencv