mDNSResponder和discoveryd 挂了导致苹果电脑不能上网和CPU100%

  • 内容
  • 评论
  • 相关

最近发现苹果电脑在休眠之后经常会出现上不去网的情况。因为在公司是使用Proxifier代理上网,Proxifier报错:

[code]
[08.15 12:24:18] Kernel log : sf_connect_out : QQ(15257,502): already connected
[08.15 12:24:18] Kernel log : sf_connect_out : Mail(15646,502): already connected
[08.15 12:24:18] Kernel log : sf_connect_out : QQ(15257,502): already connected
[08.15 12:24:18] Kernel log : sf_connect_out : QQ(15257,502): already connected
[08.15 12:24:18] Kernel log : sf_connect_out : QQ(15257,502): already connected
[08.15 12:24:18] Kernel log : sf_connect_out : sharingd(254,502): already connected
[/code]

网上找了一圈,没有什么解决办法。然后想起查看系统日志,在控制台(Console.app)中看找到这些:

[code]
16/8/15 下午12:24:17.979 QQ[15257]: dnssd_clientstub write_all(26) failed -1/28 57 Socket is not connected
16/8/15 下午12:24:17.980 QQ[15257]: tcp_connection_host_start 6986 DNSServiceCreateConnection failed: -65537
16/8/15 下午12:24:18.031 QQ[15257]: dnssd_clientstub write_all(19) failed -1/28 57 Socket is not connected
16/8/15 下午12:24:18.032 QQ[15257]: tcp_connection_host_start 6987 DNSServiceCreateConnection failed: -65537
16/8/15 下午12:24:18.036 QQ[15257]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
16/8/15 下午12:24:18.083 Mail[15646]: dnssd_clientstub write_all(66) failed -1/28 57 Socket is not connected
16/8/15 下午12:24:18.084 Mail[15646]: tcp_connection_host_start 727 DNSServiceCreateConnection failed: -65537
16/8/15 下午12:24:18.088 Mail[15646]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
16/8/15 下午12:24:18.145 QQ[15257]: dnssd_clientstub write_all(20) failed -1/28 57 Socket is not connected
16/8/15 下午12:24:18.145 QQ[15257]: tcp_connection_host_start 6988 DNSServiceCreateConnection failed: -65537
16/8/15 下午12:24:18.311 QQ[15257]: dnssd_clientstub write_all(29) failed -1/28 57 Socket is not connected
16/8/15 下午12:24:18.311 QQ[15257]: tcp_connection_host_start 6991 DNSServiceCreateConnection failed: -65537
16/8/15 下午12:24:18.311 QQ[15257]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
[/code]

再去google,终于找到了解决办法,这是原文:

https://inderpreetsingh.com/2015/01/23/mdnsresponder-and-discoveryd-hanging-in-yosemite-cpu-spikes-at-100/

虽然她遇到的问题是CPU占用100%,不过解决方案居然相似。

她的解决方案是重启discoveryd,因为他本机没有mDNSResponder,而正相反,我没有discoveryd。

于是重启mDNSResponder后顺利上网了。

电脑相关情况:

MBP2015年初版

Mac OS Yosemite 10.10.5

解决方案:

控制台执行

[code]
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
[/code]

如果没有mDNSResponder不妨试试

[code]
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
[/code]

评论

1条评论
  1. Gravatar 头像

    Mike 回复

    十分感谢分享,我使用proxifier也遇到的同样的问题,可能是proxifier的问题。

发表评论

电子邮件地址不会被公开。 必填项已用*标注