Solved

CFHTTP I/O Exception: peer not authenticated

Posted on 2012-04-06
7
1,866 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

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…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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