在HTTP请求的CentOS的VirtualBox5秒延迟(CentOS VirtualBox 5

2019-08-01 04:27发布

我在我的OSX 10.8.2机器上运行的CentOS 6.3的VirtualBox 4.2.1内,而且遇到了延迟问题,我不理解。 基本上,每一个HTTP请求到任何地方有一个额外的5000毫秒的延迟。 平安有没有额外的延迟。

[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7586
[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7586
[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7857
[vagrant@localhost ~]$ ping google.com
PING google.com (74.125.224.66) 56(84) bytes of data.
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=1 ttl=63 time=7.64 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=2 ttl=63 time=6.26 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=3 ttl=63 time=8.69 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=4 ttl=63 time=7.89 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=5 ttl=63 time=5.99 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=6 ttl=63 time=8.64 ms

根据记录,我有相同的VirtualBox / OSX环境的Ubuntu 12.04.1虚拟机,也不会遇到这个问题。

Answer 1:

好吧,原来的问题是DNS问题。

基本上CentOS的VirtualBox的配置为使用,这是内部本身,但也许与我们的网络上的东西冲突一个10.0.2.3的DNS服务器。

在任何情况下,使用不同的DNS服务器解决了这个问题。



文章来源: CentOS VirtualBox 5 second latency on http requests