我正在运行普通旧版 ColdFusion 9 的开发人员版本。我正在尝试 cfhttp
API 调用 Shopify,但我正在对旧版进行裁剪:I/O Exception: peer not authenticated
问题。我使用“https”网址调用它。
//also tried without setting the port directly
variables.httpService = new http(username=trim(application.stDBVars.stShopify.sAPIKey),password=trim(application.stDBVars.stShopify.sPassword),method="POST",url="https://shopname-shop.myshopify.com/admin/webhooks.json",port=443);
variables.httpService.addParam(type="header",name="Content-Type",value="application/json");
variables.httpService.addParam(type="body",value="#variables.sJSON#");
writeDump(variables.httpService.send().getPrefix());
我以前在使用另一个第 3 方 API 时遇到过这个问题,但我按照知识库文章中关于在 keystore 中导入证书的说明解决了这个问题:http://helpx.adobe.com/coldfusion/kb/import-certificates-certificate-stores-coldfusion.html
我又听从了建议,选择了证书添加到 keystore ,但无论我添加多少次,删除它,重新命名它,停止 ColdFusion,启动 ColdFusion,重新启动计算机和执行 voodoo 我不断收到 I/O Exception: peer not authenticated
。
有没有办法调试它以查看它是否甚至试图使用我的证书,无论是在 ColdFusion 还是 Java 中?
最佳答案
我最近在尝试连接到 Twitter api 的 CF9 盒子上遇到了同样的问题。下面是咨询后解决的Pete Freitag :
Java updated the client certificates in Java 1.6.0_19 including Verisign certificates: http://www.oracle.com/technetwork/java/javase/6u19-141078.html so updating to a recent JVM I think may solve it.
Please note that if you install Java 1.7 you need to make sure that you have installed CF 9.0.1 cumulative hotfix 4 (which adds support for java 1.7). You can see if you have 9.0.1 CHF4 by looking in the {cfroot}/lib/updates folder and locating the file chf9010004.jar
应用累积修补程序 4 后,CF 管理员开始抛出错误。这些站点可以正常工作,但 CF 管理员已关闭。我通过以下方式解决了这个问题:
Make sure the latest security hotfixes APSP13-19 and APSP13-27 are also applied, see http://helpx.adobe.com/security/products/coldfusion.html#version9 if the server had already applied a security hotfix that was released after cumulative hotfix 4, that might cause an issue.
您可以通过首先应用安全修补程序来避免 CF 管理问题。
这是我用来更新 JVM 的帖子:
关于java - 如何调试对 https URL 的 cfhttp 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21259076/