国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

幫助中心 >  技術(shù)知識(shí)庫(kù) >  數(shù)據(jù)庫(kù) >  相關(guān)技術(shù)支持 >  linux 執(zhí)行 iptables 命令出錯(cuò) segmentation fault (core dumped) 的解決

linux 執(zhí)行 iptables 命令出錯(cuò) segmentation fault (core dumped) 的解決

2016-03-16 17:06:11 13674

linux 執(zhí)行 iptables 命令出錯(cuò): segmentation fault (core dumped)

systemctl status iptables.service  出錯(cuò) code=dumped signal=SEGV

現(xiàn)象:

一臺(tái)機(jī)器被強(qiáng)制手動(dòng)關(guān)閉了,重新啟動(dòng)后,防火墻(iptables)不能啟動(dòng),系統(tǒng)啟動(dòng)日志 /var/log/boot.log 中出現(xiàn)如下錯(cuò)誤:
failed to start ipv4 firewall with iptables
failed to start ipv6 firewall with iptables
please use "systemctl status iptables.service" for detail

機(jī)器是做代理服務(wù)的,導(dǎo)致其他機(jī)器都不能上網(wǎng)了。

解決辦法:
進(jìn)入系統(tǒng)后,使用 systemctl status iptables.service 查看 iptables 狀態(tài),發(fā)現(xiàn)沒有啟動(dòng),信息如下:
Active: failed
code=dumped signal=SEGV
于是執(zhí)行 iptables 命令:iptables -L
直接提示錯(cuò)誤: segmentation fault (core dumped)
這種情況從來沒有遇到過,iptables是系統(tǒng)軟件,執(zhí)行時(shí)怎么會(huì)出現(xiàn)段錯(cuò)誤呢?猜測(cè)是系統(tǒng)強(qiáng)制關(guān)閉時(shí)破壞了相關(guān)文件。嘗試重新安裝 iptables 會(huì)不會(huì)解決問題。
首先查看本機(jī)的 iptables 的版本:rpm -qa iptables,發(fā)現(xiàn)是iptables-2.16-xxx.xx
于是下載了 iptables 的rpm包,即:iptables-2.16-xxx.xx.rpm
然后強(qiáng)制卸載 iptables 包: rpm -e --nodeps iptables-2.16-xxx.xx  這里需要加上 --nodeps 不考慮依賴,強(qiáng)制卸載。
卸載完畢,安裝: rpm -ivh iptables-2.16-xxx.xx.rpm
安裝成功后,執(zhí)行 iptables 命令:iptables -L 。發(fā)現(xiàn)不再提示段錯(cuò)誤了,正常了。
重啟iptables,即執(zhí)行命令: systemctl restart iptables.service,
查看iptables狀態(tài),即:systemctl status iptables.service。

提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問題: