3 Replies Latest reply on Dec 24, 2014 8:53 AM by Steve Sommers

    CFHTTP Connection Failure


      I am using CF9 and here is what I get using CFHTTP to Twilio:


      Charset[empty string]
      ErrorDetailI/O Exception: peer not authenticated
      FilecontentConnection Failure
      Header[empty string]
      MimetypeUnable to determine MIME type of file.
      struct [empty]
      StatuscodeConnection Failure. Status code unavailable.


      So I went and imported the the certificate into the cacert keystore. Here it is listed:


      Screen Shot 2014-12-22 at 5.33.34 PM.png

      I have restarted the Application Server service and still get the same error.


      Problem just started in the last week or so and I imported the cert this morning.


      Am I missing something?

        • 1. Re: CFHTTP Connection Failure
          Steve Sommers Level 4

          Make sure you put the cert into the correct certificate store. We use the latest Oracle JRE that CF9 supports and it has it's own cacerts library. The other issue I have seen is make sure the damin name in the cert matches the domain name you are using in the cfhttp call. Lastly, check the contents of the coldfusion http log. Sometimes it contains the missing piece of data you need to diagnose the real issue.

          • 2. Re: CFHTTP Connection Failure
            PaulBW Level 1

            All I get from the HTTP log is:


            "Information","jrpp-2347","12/21/14","07:03:10",,"Starting HTTP request {URL='https://api.twilio.com:443/2010-04-01/Accounts/xxxxxxxxxxxx/SMS/Messages', method='post'}"


            No status code or any other info.


            The cert is a wildcard *.twilio.com so that my be the issue. I used the CF keytool to import the cert so I assume it is in the correct store. How do I check that?


            I have used a work-around using the Adiabata cfx_http5 tag but I still want to figure this out.    

            • 3. Re: CFHTTP Connection Failure
              Steve Sommers Level 4

              Correct store: In the CF administrator pull up the server info. Somewhere on that page will be the Java Home and that will be the root to where the cacerts store is located.


              I'm fairly sure I have imported wildcard certs and used them successfully -- but I'm not 100% sure. Good luck.