system

linux系统故障笔记

一、前言

在linux系统的使用中,经常会碰到一些故障,比如网络故障、防火墙故障、内核故障等等,这些故障往往需要通过linux的相关日志来查看报错信息,然后通过错误信息来定位具体的错误,接着可以查找关键字google来解决,为此我们从今天开始在这里记录碰到的故障信息,积少成多,碰到的新的错误会越来越少,这也是经验的积累,方便提高自身工作效率。

二、开始

2.1.网络故障

故障一:
启动网络systemctl start network报错

Job for network.service failed.See 'Systemctl status network.service' and 'journalctl -xe' for details

但是按照提示并没有发现错误,我们查看系统日志
tail -n 100 /var/log/messages,发现错误

Mar 11 10:18:18 localhost systemd: Starting LSB: Bring up/down networking...
Mar 11 10:18:19 localhost network: 正在打开环回接口: [  确定  ]
Mar 11 10:18:19 localhost NetworkManager[9366]: <info>  [1552270699.1055] audit: op="connection-activate" uuid="fd005f04-41ac-4401-bd27-decd3492dd84" name="ens33" result="fail" reason="No suitable device found for this connection."
Mar 11 10:18:19 localhost network: 正在打开接口 ens33: 错误:激活连接失败:No suitable device found for this connection.
Mar 11 10:18:19 localhost network: [失败]
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost network: RTNETLINK answers: File exists
Mar 11 10:18:19 localhost systemd: network.service: control process exited, code=exited status=1
Mar 11 10:18:19 localhost systemd: Failed to start LSB: Bring up/down networking.
Mar 11 10:18:19 localhost systemd: Unit network.service entered failed state.
Mar 11 10:18:19 localhost systemd: network.service failed.

这种错误针对不同的情况有不同的解决方式:
1、如果该系统是克隆过来的,那么mac地址需要修改
临时修改:
ifdown ens33
ifconfig ens33 hw ether mac地址
ifup ens33
永久修改:
编辑文件/sys/class/net/ens33/address
2、与MAC地址无关
systemctl stop NetworkManager

支付宝扫码打赏 微信打赏

若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏

扫描二维码,分享此文章

linuxwt's Picture
linuxwt

我叫王腾,来自武汉,2016年毕业后在上海做了一年helpdesk,自学了linux后回武汉从事系统运维的工作,从2017年开始写博客记录自己的学习工作,现在正在进行数据迁移到此博客,目前就职于北京神州新桥科技有限公司,个人的座右铭是:逃脱舒适区才能在闲暇的时候惬意的玩耍。

武汉光谷 https://linuxwt.com

Subscribe to 今晚打老虎

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!

Comments