cfhttp I/O Exception: peer not authenticated Error
January 19, 2011 at 7:50 am Taco Fleur 1 comment
Been pulling m hair out today with ColdFusion…. I kept getting this error with cfhttp “I/O Exception: peer not authenticated” I knew that it had to do with the fact I was making a call to HTTPS and I needed to import the certificate. I also remembered how to do it:
– Go to the URL in Internet Explorer
– Click the lock
– Click on Copy to file
– Save as DER to a *.cer file
– Run the Keytool C:\CFusionMX\runtime\jre\lib\security>..\..\bin\keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt -alias mycert -file mycert.cer
But the part where I was failing was actually going to the directory where the carcerts file was, I went into the directory where the keytool was and ran the command, this actually creates a whole new cacerts file which I was not aware of….. After re-installing ColdFusion several times and running the import I finally figured it out.
IMPORTANT
Make sure you are in the directory where the cacerts file is located, which is under C:\CFusionMX\runtime\jre\lib\security or C:\JRun4\jre\lib\security
I hope this helps someone before they go and re-install ColdFusion 🙂 Let me know..
Entry filed under: ColdFusion. Tags: cfhttp, ColdFusion.
1. Alex Sherwood | March 1, 2011 at 3:48 pm
As a note to Win 7 users, you must be running IE in Admin mode in order to export the certificate. If not, the button to save to file will be disabled.
Hope this helps.
LikeLike