关于禁用IPv6引起的故障

开源世界 Winter 5年前 (2015-03-28) 2211次浏览 已收录 0个评论

一台测试用的邮件服务器ContOS6.6,修改/etc/modprobe.d/dist.conf添加以下两行内容以禁用IPv6,然后重启

166 alias net-pf-10 off
167 alias ipv6 off

重启完之后发现dovecot服务启不来了,查看boot.log发现还有ip6tables也没有启用,这个好说,禁用IPv6了IPv6的防火墙也不需要了,chkconfig ip6tables off就行了。

在boot.log中看到dovecot相关的错误日志如下:

Dovecot Imap:Error: socket() failed: Address family not supported by protocol
Error: service(managesieve-login): listen([::], 4190) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(pop3-login): listen([::], 110) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(pop3-login): listen([::], 995) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(lmtp): listen([::], 24) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(imap-login): listen([::], 143) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(imap-login): listen([::], 993) failed: Address family not supported by protocol
Fatal: Failed to start listeners                                                           [失败]
根据错误提示,是IPv6相关的协议启不来,那么就去修改dovecot的配置文件/etc/dovecot/devecot.conf

vi打开文件后在文件是搜索listen和[::],其实也不用搜了,就是第六行了

先注释掉listen = * [::]

然后再插入一行listen = *

:wq保存

service dovecot start启动服务,OK


癹冬阁 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:关于禁用IPv6引起的故障
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址