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

相关推荐
矛取矛求6 分钟前
Linux系统性能调优技巧
linux
山东布谷科技官方10 分钟前
布谷直播源码部署服务器关于数据库配置的详细说明
运维·服务器·数据库·直播系统源码·直播源码·直播系统搭建·直播软件开发
One_Blanks10 分钟前
渗透测试-Linux基础(1)
linux·运维·安全
Perishell11 分钟前
无人机避障——大疆与Airsim中的角速度信息订阅获取
linux·动态规划·无人机
爱吃喵的鲤鱼14 分钟前
linux进程的状态之环境变量
linux·运维·服务器·开发语言·c++
dessler26 分钟前
Linux系统-ubuntu系统安装
linux·运维·云计算
向阳121833 分钟前
Dubbo负载均衡
java·运维·负载均衡·dubbo
荒Huang1 小时前
Linux挖矿病毒(kswapd0进程使cpu爆满)
linux·运维·服务器
海阔天空_20131 小时前
Python pyautogui库:自动化操作的强大工具
运维·开发语言·python·青少年编程·自动化
桥田智能1 小时前
气爪在自动化装配线中是如何应用的?
运维·自动化