Solved

CFHTTP I/O Exception: peer not authenticated

Posted on 2012-04-06
7
1,815 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
ID: 37817228
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
ID: 37817296
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
ID: 37817316
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:LeadCo
ID: 37817367
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
ID: 37817483
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
ID: 37817821
Did following the process resolve the issue?
0
 

Author Closing Comment

by:LeadCo
ID: 37836656
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

932 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

11 Experts available now in Live!

Get 1:1 Help Now