"Connection Failure"

Participant

"Connection Failure"

Hello, I have a coldfusion app that's using the CTCT API to add email addresses and update lists.

I have a development server and a production server that I'm using, but for some reason my development server can't connect to the API, where as the production server seems to behave fine.

Using the provided Coldfusion sample code, my development server receives a "Connection Failure" during the CTCTRequest function which causes an XML parse error when xmlParse() is called.

This doesn't seem to happen on my local development or my production server however.

Could someone provide input on how I could fix this issue?

My dev server is runnig IIS 6.0  with Windows Server 2003.

 

Thank you,

4 REPLIES 4
Member

Hello,

 

Based on what you've described, this sounds like it may be an issue with the SSL certificates on your server. If they are out of date, then the SSL verification required to connect to the Constant Contact API can fail. You most likely could resolve the issue if this is the case by updating the server's root certificate which is normally done through windows update.

 

Another thing to try is to see if you can load https://api.constantcontact.com/ in a browser. If it loads you should see a 596 service not found error.

 

Sincerely,

Elijah G.

API Support Specialist

Elijah G.
API Support Engineer

If we are testing locally on a development machine (and have local certificates) how do we test the Constant Contact API without getting 596 Service Not Found errors?

Occasional Participant

Your local certificates aren't the issue.  It is CFHTTP needing a recognized/installed certificate for the destination URL to create the SSL connection.

 

Here's the description and steps from Adobe.  Obviously, path locations change if you are on Linux.

 

To use HTTPS with thecfhttptag, you might need to manually import the certificate for each web server into the keystore for the JRE that ColdFusion uses. This procedure should not be necessary if the certificate is signed (issued) by an authority that the JSSE (Java Secure Sockets Extension) recognizes (for example, Verisign); that is, if the signing authority is in the cacerts already. However, you might need to use the procedure if you are issuing SSL (secure sockets layer) certificates yourself.

 

Manually import a certificate

  1. Go to a page on the SSL server in question.
  2. Double-click the lock icon.
  3. Click the Details tab.
  4. Click Copy To File.
  5. Select the base64 option and save the file.
  6. Copy the CER file into C:\ColdFusion8\runtime\jre\lib\security (or whichever JRE ColdFusion is using).
  7. Run the following command in the same directory (keytool.exe is located in C:\CFusionMX7\runtime\jre\bin):
    keytool -import -keystore cacerts -alias giveUniqueName -file filename.cer
Regular Participant

You need to add the Constant Contact SSL certificates to your CF keystore.  It is a common problem with many remotes services and the different SSL certs used and the ones included with CF that CFHTTP uses for https.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page