当前位置:网站首页>VMware虚拟机更改静态IP报错Unit network.service entered failed state解决方案
VMware虚拟机更改静态IP报错Unit network.service entered failed state解决方案
2022-07-22 21:34:00 【时间是一种解药】
VMware虚拟机更改静态IP报错Unit network.service entered failed state解决方案
问题背景
VMware虚拟机更改静态IP报错:
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 三 2022-07-20 06:01:18 PDT; 1h 27min ago
Docs: man:systemd-sysv-generator(8)
Process: 899 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
7月 20 06:01:18 localhost.localdomain systemd[1]: Starting LSB: Bring up/down networking...
7月 20 06:01:18 localhost.localdomain network[899]: Bringing up loopback interface: [ OK ]
7月 20 06:01:18 localhost.localdomain network[899]: Bringing up interface eno16777736: Error: Conn...)).
7月 20 06:01:18 localhost.localdomain network[899]: [FAILED]
7月 20 06:01:18 localhost.localdomain systemd[1]: network.service: control process exited, code=exi...s=1
7月 20 06:01:18 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
7月 20 06:01:18 localhost.localdomain systemd[1]: Unit network.service entered failed state.
7月 20 06:01:18 localhost.localdomain systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
出现这个问题可能有不同原因,这里列出可能出现的两个原因解决方案
解决方案一
1 可能网络配置文件出现多个,导致失效
首先进入network配置的文件夹查看网络配置文件,只能有一个ifcfg-exxx
cd /etc/sysconfig/network-scripts
ll
多个网络配置文件,需要删除,只剩一个配置文件
解决方案二
1 查看ifconfig
ifconfig
可以看到实际动态分配了192.168.207.130的IP,并且可以看见配置文件为ens33,并不是我的配置文件里面的192.168.207.137这个IP,而且我的配置文件叫eno16777736,所以文件名对不上更改这个错误
2 更改我的配置文件名
cd /etc/sysconfig/network-scripts
ll

3 更改网络配置文件名字
mv ifcfg-eno16777736 ifcfg-ens33

4 编辑文件内容
vim ifcfg-ens33

5 重启网络设置两次,一定是两次
systemctl restart network

作为程序员第 211 篇文章,每次写一句歌词记录一下,看看人生有几首歌的时间,wahahaha …


Lyric: 就算没伴奏也可以继续
边栏推荐
猜你喜欢

4G传输模块的功能应用

Information system project managers must recite the core examination points (49) contract law

Mysql无法访问,navicat提示:is not allowed to connect to this MySQL server

Redis三种集群方案

不会吧?钉钉都下载了,你还不知道可以这样玩?

pny 文件转图片

Here comes the genuine Adobe software! Adobe's only genuine family bucket subscription in the world costs only 0 yuan / year

2022年暑假ACM热身练习4(总结)

我为OpenHarmony 写代码,战“码”先锋第二期正式开启!

The new idea 2022.2 was officially released, and the new features are really fragrant
随机推荐
直播实录 | 37 手游如何用 StarRocks 实现用户画像分析
用Stanford Parse(智能语言处理)去实现分词器
Wechat campus second-hand book trading applet graduation design finished product (4) opening report
93. (leaflet chapter) leaflet situation plotting - modification of attack direction
6-13漏洞利用-smtp暴力破解
Information system project managers must recite the core examination points (49) contract law
Summary in the development process BaseService provides a public access service file for all controllers or services to reduce repeated injection
Redis三种集群方案
不会吧?钉钉都下载了,你还不知道可以这样玩?
FTXUI基础笔记(hello world)
沃尔沃xc90的安全性如何?一起来看看吧
关于Redis,是先更新数据库,还是先更新缓存?
With 130 new services and functions a year, this storage "family bucket" has grown again
局域网SDN技术硬核内幕 10 云网融合的红娘EVPN
golang--module
Mysql A left(right) join B on A.id=B.id and A.age=1与A left(right) join B on A.id=B.id where A.age=1
毕业设计-----基于STM32的物联网环境检测系统
Wechat campus second-hand book trading applet graduation design finished product (7) Interim inspection report
How to use the order flow analysis tool (in)
squid代理服务+ip代理池