cfhttp dns 解析

发布于 2024-08-17 13:18:03 字数 777 浏览 11 评论 0原文

我正在尝试让 CFHTTP 与我在测试服务器上为测试目的而创建的域进行通信。域的地址是“mydomain.example.com”。每次我尝试使用 cfhttp 连接时,都会收到一条错误消息:

Your requested host "mydomain.example.com" could not be resolved by DNS.

我已经在 Windows 主机文件中添加了该条目。

mydomain.example.com 127.0.0.1

我还确保 java.net.InetAddress 可以通过在 Coldfusion 页面中执行以下操作来解析域:

<cfset loc.javaInet = createObject("java","java.net.InetAddress")>
<cfset loc.dnsLookup = loc.javaInet.getByName("mydomain.example.com")>

为此,

mydomain.example.com/127.0.0.1

我什至尝试启动和停止 Coldfusion 服务并更改 networkaddress.cache 的值。将 runtime\jre\lib\security\java.security 中的 ttl 设置为 0。

我不明白为什么一切似乎都在 jre 级别解析,而不是在 cfhttp 级别解析。有什么想法吗???

i'm trying to get CFHTTP to talk to a domain that i have created for testing purposes on my test server. the address of the domain is "mydomain.example.com". everytime i try to connect using cfhttp i get an error stating:

Your requested host "mydomain.example.com" could not be resolved by DNS.

i have already added the entry in the windows hosts file.

mydomain.example.com 127.0.0.1

i've also made sure that java.net.InetAddress can resolve the domain by doing the following in a coldfusion page:

<cfset loc.javaInet = createObject("java","java.net.InetAddress")>
<cfset loc.dnsLookup = loc.javaInet.getByName("mydomain.example.com")>

for which is get back

mydomain.example.com/127.0.0.1

i've even tried starting and stopping the coldfusion service and changing the value of networkaddress.cache.ttl in the runtime\jre\lib\security\java.security to 0.

i'm at a lost of why everything seems to be resolving at the jre level but not at the cfhttp level. any ideas???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

岁月如刀 2024-08-24 13:18:03

为什么我提问后我就明白了?去图吧。

问题是,由于某种原因,我的runtime\bin\jvm.config 中的java.args 行上仍然有旧的代理配置设置。

删除旧的配置设置并重新启动 ColdFusion 服务后,我又开始工作了。

对于那些想知道的人,您可以通过将以下参数添加到 jvm.config 文件中的 java.args 行来设置 cfhttp 使用的代理信息

-Dhttp.proxyHost=<ip address>
-Dhttp.proxyPort=<portnumber>
-Dhttp.proxyUser=<username>
-Dhttp.proxyPassword=<password>

Why is it that after I post a question, I figure it out? Go fig.

The issue was that for some reason I still had an old proxy configuration setup on my java.args line in my runtime\bin\jvm.config.

After removing the old configuration setting and restarting the ColdFusion service, I'm back in business.

For those that want to know, you can set the proxy information for cfhttp to use by adding the following arguments to your java.args line in the jvm.config file

-Dhttp.proxyHost=<ip address>
-Dhttp.proxyPort=<portnumber>
-Dhttp.proxyUser=<username>
-Dhttp.proxyPassword=<password>
人心善变 2024-08-24 13:18:03

您的问题可能与 Coldfusion 缓存 DNS 查找的方式有关。 CFHTTP 永久保留 DNS 查找的副本。您可以尝试通过重新启动 Coldfusion 来刷新它。

Your problem may have to do with the way that DNS look-ups are cached by Coldfusion. CFHTTP permanently keeps a copy of the DNS look-up. You could try flushing this by restarting Coldfusion.

Hello爱情风 2024-08-24 13:18:03

此外,您的主机文件不会轻松地获取 Windows 中的这些更改。最简单的方法是重新启动 Windows 计算机。

我同意,问题是 DNS 问题,使用代理只会掩盖问题。尝试将 Windows 上的 DNS 解析器设置为稳定且公开的解析器,例如 8.8.8.8,它是 Google DNS 服务器。

Also, your hosts file won't pick up those changes in windows easily. The easy way is with a reboot of the windows machine.

I agree, the problem is a DNS one, and using a proxy just masks the problem. Try setting your DNS resolver on Windows to something stable and public, like 8.8.8.8 which is a Google DNS server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文