views:

104

answers:

2

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???

A: 

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.

dhorn
already did that: 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.
rip747
+5  A: 

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 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=<protnumber>
-Dhttp.proxyUser=<username>
-Dhttp.proxyPassword=<password>
rip747