• 欢迎访问癹冬阁,本站专注于IT服务,记录工作点滴

关于禁用IPv6引起的故障

开源世界 Winter 3年前 (2015-03-28) 1265次浏览 已收录 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)
[winters@8win.net]
分享 (0)
发表我的评论
取消评论

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

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

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