【问题标题】:InetAddress.getByName extremely slowInetAddress.getByName 非常慢
【发布时间】:2016-07-20 14:07:53
【问题描述】:

InetAddress.getByName 在我运行 CentOS 6 的机器上似乎真的很慢。Java 分析显示它需要 4.9 秒才能完成。

Linux 'dig' 命令只需要 300 毫秒即可完成,这是正常的。

4.9 秒似乎异常长,这是什么原因造成的?

【问题讨论】:

    标签: java linux networking centos


    【解决方案1】:

    原来是我的 DNS 解析器有问题。它正在查询的服务器被我主机的防火墙阻止。

    【讨论】:

      猜你喜欢
      • 2015-05-22
      • 1970-01-01
      • 2017-12-12
      • 2015-06-14
      • 2013-05-14
      • 2021-05-24
      • 1970-01-01
      • 2013-06-24
      • 2016-06-14
      相关资源
      最近更新 更多