Solved

CFHTTP I/O Exception: peer not authenticated

Posted on 2012-04-06
7
1,797 Views
Last Modified: 2012-08-13
I am doing a standard cfhttp post and get this when I try and post.
      <cfhttp
        url="https://services.someurl.com/Data/page.aspx"
                method="post"  result="queryX" >
             <cfhttpparam type="formfield"  name="affiliate_id" value="123">
             <cfhttpparam type="formfield"  name="password" value="456">
             <cfhttpparam type="formfield"  name="service" value="Lookup">
        </cfhttp>
            
      <cfdump var=#queryX#>

Result:
struct
Charset       [empty string]
ErrorDetail       I/O Exception: peer not authenticated
Filecontent       Connection Failure
Header       [empty string]
Mimetype       Unable to determine MIME type of file.
Responseheader       
struct [empty]
Statuscode       Connection Failure. Status code unavailable.
Text       YES

Any help appreciated.
0
Comment
Question by:LeadCo
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:tobyweston
Comment Utility
How do you authenticate with the service? Via the details posted or do they provide a certificate?

Are you hard coding the cfhttpparam values? Do they have any non alpha characters in them?
0
 

Author Comment

by:LeadCo
Comment Utility
When I use this :  and place in a web browser i can see info i need:
https://services.someurl.com/Data/page.aspx?affiliate_id=123&password=456&service=LOOKUP

I get the page and the xml data I am looking for.
I am attempting to use cfhttp to grab the filecontent and return as xml

the page returns:

<TheData>
<Year>1981</Year>
<Year>1982</Year>
<Year>1983</Year>
<Year>1984</Year>
</TheData>
0
 
LVL 3

Accepted Solution

by:
tobyweston earned 500 total points
Comment Utility
You can use the keytool to try importing the URLs certificate:

http://helpx.adobe.com/coldfusion/kb/import-certificates-certificate-stores-coldfusion.html

Using URLDecode or URLEncodeFormat around the the values to make sure they are being sent exactly how you need them to be. Usually a problem if there are non alpha chars in the values.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:LeadCo
Comment Utility
When you click on the lock to view a certicicate where do you find the path to it or how to download it?
0
 

Assisted Solution

by:LeadCo
LeadCo earned 0 total points
Comment Utility
Ok here is process :

Add to keystore coldfusion:

Navigate to url click on lock click details tab
click copy or download.

save to C:\ColdFusion9\runtime\jre\lib\security

open cmd prompt: put in :
cd C:\ColdFusion9\runtime\jre\bin

This puts you in that directory then run:

C:\JRun4\jre\bin>
keytool -importcert -v -alias wa-cert -file C:\ColdFusion9\runtime\jre\lib
\security\CERTFILENAME.cer -keystore C:\JRun4\jre\lib\security\cacerts -storepass
changeit
0
 
LVL 3

Expert Comment

by:tobyweston
Comment Utility
Did following the process resolve the issue?
0
 

Author Closing Comment

by:LeadCo
Comment Utility
Had to make one change: Because of where root directory is on my cf box. <br /><br />Check your location of the  C:\ColdFusion9\runtime\jre<wbr />\lib directory to make it work for your server.<br /><br /><br />Ok here is process :<br /><br />Add to keystore coldfusion:<br /><br />Navigate to url click on lock click details tab<br />click copy or download.<br /><br />save to C:\ColdFusion9\runtime\jre<wbr />\lib\secur<wbr />ity<br /><br />open cmd prompt: put in :<br />cd C:\ColdFusion9\runtime\jre<wbr />\bin<br /><br />This puts you in that directory then run:<br /><br />C:\JRun4\jre\bin><br />keytool -importcert -v -alias wa-cert -file C:\ColdFusion9\runtime\jre<wbr />\lib<br />\security\CERTFILENAME.cer<wbr /> -keystore  C:\ColdFusion9\runtime\jre<wbr />\lib\secur<wbr />ity\cacert<wbr />s -storepass<br />changeit
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now