关于禁用IPv6引起的故障

4,110次阅读
没有评论

共计 1341 个字符,预计需要花费 4 分钟才能阅读完成。

一台测试用的邮件服务器 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

正文完
 
Winter
版权声明:本站原创文章,由 Winter 2015-03-28发表,共计1341字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码