Search code examples
coldfusioncfhttp

cfhttp dns resolution


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


Solution

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