?
Solved

CFHTTP I/O Exception: peer not authenticated

Posted on 2012-04-06
7
Medium Priority
?
1,941 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 2000 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
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 

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

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

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

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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