Fedora 25首次DNS查找超时

布赖恩·德·赫斯

不确定从哪里开始,但是最近我的DNS查找变得非常缓慢,总是5秒。运行后,strace ping -c 1 google.com我注意到第一个DNS查找总是超时:

poll([{fd=5, events=POLLIN}], 1, 5000)  = 1 ([{fd=5, revents=POLLIN}])
ioctl(5, FIONREAD, [56])                = 0
recvfrom(5,         "a\322\201\200\0\1\0\1\0\0\0\0\6google\3com\0\0\34\0\1\300\f\0\34"...,     2048, 0, {sa_family=AF_INET, sin_port=htons(53),     sin_addr=inet_addr("8.8.8.8")}, [28->16]) = 56

>>>
>>> Timeout happens here
>>> poll([{fd=5, events=POLLIN}], 1, 4960
>>> )  = 0 (Timeout)
>>>

poll([{fd=5, events=POLLOUT}], 1, 0)    = 1 ([{fd=5,     revents=POLLOUT}])
sendto(5, "\361\226\1\0\0\1\0\0\0\0\0\0\6google\3com\0\0\1\0\1", 28,     MSG_NOSIGNAL, NULL, 0) = 28
poll([{fd=5, events=POLLIN}], 1, 5000)  = 1 ([{fd=5, revents=POLLIN}])
ioctl(5, FIONREAD, [44])                = 0
recvfrom(5,     "\361\226\201\200\0\1\0\1\0\0\0\0\6google\3com\0\0\1\0\1\300\f\0\1"...,     2048, 0, {sa_family=AF_INET, sin_port=htons(53),     sin_addr=inet_addr("8.8.8.8")}, [28->16]) = 44
poll([{fd=5, events=POLLOUT}], 1, 4958) = 1 ([{fd=5,     revents=POLLOUT}])
sendto(5, "a\322\1\0\0\1\0\0\0\0\0\0\6google\3com\0\0\34\0\1", 28,     MSG_NOSIGNAL, NULL, 0) = 28
poll([{fd=5, events=POLLIN}], 1, 4958)  = 1 ([{fd=5, revents=POLLIN}])
ioctl(5, FIONREAD, [56])                = 0
recvfrom(5,     "a\322\201\200\0\1\0\1\0\0\0\0\6google\3com\0\0\34\0\1\300\f\0\34"...,     65536, 0, {sa_family=AF_INET, sin_port=htons(53),     sin_addr=inet_addr("8.8.8.8")}, [28->16]) = 56
close(5)          

我阅读strace正确吗?这里可能会发生什么?

运行Fedora 25。

布赖恩·德·赫斯

添加options single-request-reopen到我已/etc/resolv.conf解决的问题!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章