linux 执行 iptables 命令出错 segmentation fault (core dumped) 的解决
2014-08-16 15:55
1601 查看
linux 执行 iptables 命令出错: segmentation fault (core dumped)
systemctl status iptables.service 出错 code=dumped signal=SEGV
现象:
一台机器被强制手动关闭了,重新启动后,防火墙(iptables)不能启动,系统启动日志 /var/log/boot.log 中出现如下错误:
failed to start ipv4 firewall with iptables
failed to start ipv6 firewall with iptables
please use "systemctl status iptables.service" for detail
机器是做代理服务的,导致其他机器都不能上网了。
解决办法:
进入系统后,使用 systemctl status iptables.service 查看 iptables 状态,发现没有启动,信息如下:
Active: failed
code=dumped signal=SEGV
于是执行 iptables 命令:iptables -L
直接提示错误: segmentation fault (core dumped)
这种情况从来没有遇到过,iptables是系统软件,执行时怎么会出现段错误呢?猜测是系统强制关闭时破坏了相关文件。尝试重新安装 iptables 会不会解决问题。
首先查看本机的 iptables 的版本:rpm -qa iptables,发现是iptables-2.16-xxx.xx
于是下载了 iptables 的rpm包,即:iptables-2.16-xxx.xx.rpm
然后强制卸载 iptables 包: rpm -e --nodeps iptables-2.16-xxx.xx 这里需要加上 --nodeps 不考虑依赖,强制卸载。
卸载完毕,安装: rpm -ivh iptables-2.16-xxx.xx.rpm
安装成功后,执行 iptables 命令:iptables -L 。发现不再提示段错误了,正常了。
重启iptables,即执行命令: systemctl restart iptables.service,
查看iptables状态,即:systemctl status iptables.service。
终于正常了。
systemctl status iptables.service 出错 code=dumped signal=SEGV
现象:
一台机器被强制手动关闭了,重新启动后,防火墙(iptables)不能启动,系统启动日志 /var/log/boot.log 中出现如下错误:
failed to start ipv4 firewall with iptables
failed to start ipv6 firewall with iptables
please use "systemctl status iptables.service" for detail
机器是做代理服务的,导致其他机器都不能上网了。
解决办法:
进入系统后,使用 systemctl status iptables.service 查看 iptables 状态,发现没有启动,信息如下:
Active: failed
code=dumped signal=SEGV
于是执行 iptables 命令:iptables -L
直接提示错误: segmentation fault (core dumped)
这种情况从来没有遇到过,iptables是系统软件,执行时怎么会出现段错误呢?猜测是系统强制关闭时破坏了相关文件。尝试重新安装 iptables 会不会解决问题。
首先查看本机的 iptables 的版本:rpm -qa iptables,发现是iptables-2.16-xxx.xx
于是下载了 iptables 的rpm包,即:iptables-2.16-xxx.xx.rpm
然后强制卸载 iptables 包: rpm -e --nodeps iptables-2.16-xxx.xx 这里需要加上 --nodeps 不考虑依赖,强制卸载。
卸载完毕,安装: rpm -ivh iptables-2.16-xxx.xx.rpm
安装成功后,执行 iptables 命令:iptables -L 。发现不再提示段错误了,正常了。
重启iptables,即执行命令: systemctl restart iptables.service,
查看iptables状态,即:systemctl status iptables.service。
终于正常了。
相关文章推荐
- linux iptables跟service 命令无效解决方法
- 执行文件下载Java 调用 FFMPEG 命令时用 url 作为输入源,Linux 下出现 “no such file or directory” 问题的解决
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 使用Cocos Code IDE打包apk时出现“执行命令出错,返回值:2。”的解决办法
- 执行impdp命令出错的解决办法
- linux下源码编译mysql在执行configure命令时出错
- windows下写的shell脚本在linux执行出错的解决办法
- 执行命令mm出错以及运行adb shell出现insufficient permissions for device错误的解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- jmap命令在linux系统执行不了问题解决
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法(转)
- linux 下iptables 执行清除命令 iptables -F 要非常小心
- linux下执行 ls,cat等一些命令报出 -bash: /bin/cat: Cannot allocate memory 有没解决的方法
- Linux下命令在命令行执行正常,放到脚本文件执行出错
- linux系统中shell中执行命令是报:bash: ifconfig: command not found错误的解决办法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 【转】linux中执行外部命令提示" error while loading shared libraries"时的解决办法
- 关于 Linux 的配置文件 /etc/profile 路径出错后相关的命令失效解决方式(如:ls,vi不能用)
- linux执行scp命令出错
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法