ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (cod...

本文解决了一个常见的CentOS7系统中firewalld防火墙启动失败的问题,详细介绍了由于Python版本不兼容导致的错误,并提供了具体的修改步骤。
部署运行你感兴趣的模型镜像

firewalld启动报错

ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=1/FAILURE)


firewalld 是CentOS7的默认防火墙,用python作配置文件,一般对python进行升级,python2和python3的不兼容导致firewalld启动异常


vim /usr/sbin/firewalld  用vim打开文件,把/usr/bin/python改成/usr/bin/python2,问题解决可以启动防火墙。

您可能感兴趣的与本文相关的镜像

Python3.9

Python3.9

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

systemctl status firewalldfirewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: inactive (dead) since 四 2025-06-19 14:02:31 CST; 23min ago Docs: man:firewalld(1) Process: 1001 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS) Main PID: 1001 (code=exited, status=0/SUCCESS) 6月 18 14:45:57 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name. 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER' failed: iptables: No ch...y that name. 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D PREROUTING' failed: iptables: Bad rule (does a matching rule exist in that chain?). 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t nat -D OUTPUT' failed: iptables: Bad rule (does a matching rule exist in that chain?). 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER' failed: iptables: Too many links. 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-1' failed: iptables: Too many links. 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name. 6月 19 13:54:33 localhost.localdomain firewalld[1001]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name. 6月 19 14:02:31 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon... 6月 19 14:02:31 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon. Hint: Some lines were ellipsized, use -l to show in full. [root@localhost ~]#
最新发布
06-20
[root@192 ~]# ping google.com PING google.com (93.46.8.90) 56(84) bytes of data. ^C --- google.com ping statistics --- 14 packets transmitted, 0 received, 100% packet loss, time 13001ms [root@192 ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent FirewallD is not running [root@192 ~]# sudo firewall-cmd --reload FirewallD is not running [root@192 ~]# sudo systemctl restart docker [root@192 ~]# systemctl status firewalldfirewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: inactive (dead) since 二 2025-03-25 18:34:53 CST; 9min ago Docs: man:firewalld(1) Process: 1031 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS) Main PID: 1031 (code=exited, status=0/SUCCESS) 3月 25 18:25:22 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:28:14 192.168.208.131 firewalld[1031]: WARNING: COMMAND_FAILED: '/... 3月 25 18:34:51 192.168.208.131 systemd[1]: Stopping firewalld - dynamic fi.... 3月 25 18:34:53 192.168.208.131 systemd[1]: Stopped firewalld - dynamic fir.... Hint: Some lines were ellipsized, use -l to show in full.
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值