OpenSSL SSL_connect:连接到api.amazonalexa.com的SSL_ERROR_SYSCALL:443 [英] OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.amazonalexa.com:443

查看:168
本文介绍了OpenSSL SSL_connect:连接到api.amazonalexa.com的SSL_ERROR_SYSCALL:443的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力使技能管理API正常运行,今天早上,我遇到了一个新的障碍,没有做任何更改。我收到了昨晚用户不同意此操作错误的信息,并且今天早上没有进行任何更改,这是我得到的curl日志:

I've been trying to get the Skill Management API working and this morning I've hit a new roadblock without haven't changed anything. I was getting a "User has not consented to this operation error last night" and without changing anything this morning, this is the curl log I'm getting:

按与昨晚相同的代码访问API,现在我得到:

Trying to hit the API with the same code as last night and now I'm getting:

string(513) "
* Hostname api.amazonalexa.com was found in DNS cache
* Trying 54.239.28.187...
* TCP_NODELAY set
* Connected to api.amazonalexa.com (54.239.28.187) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.amazonalexa.com:443
* stopped the pause stream! * Closing connection 0 "

这是我在使用:

ob_start();  
$out = fopen('php://output', 'w');

// exchange the access token for list of skills
$c = curl_init('https://api.amazonalexa.com/v0/skills/');
curl_setopt($c, CURLOPT_HTTPHEADER, array(
  'Authorization: ' . $access_token,
  'Accept: application/json',
  'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
));
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_VERBOSE, true);
curl_setopt($c, CURLOPT_STDERR, $out);
curl_setopt($c, CURLOPT_POST, 1);

$r = curl_exec($c);
curl_close($c);
fclose($out);
$debug = ob_get_clean();
var_dump($r);
echo "<BR><BR>";
var_dump($debug);
$d = json_decode($r);

$ r在这种情况下会产生bool(false),而$ d输出NULL。如果可以,我会将服务器托管在Godaddy上。我仍然能够使用Amazon登录并检索访问令牌。因此,这似乎不是托管问题。

$r in this case produces bool(false) and $d outputs NULL. I host my server on Godaddy if that makes a difference. I am still able to access Login with Amazon and retrieve an access token. So, it doesn't seem like a hosting problem.

推荐答案

根据错误跟踪,您的连接存在SSL错误。最明显的原因是托管端点没有有效的HTTPS证书或HTTPS配置不正确。如果您能以某种方式通过浏览器或curl请求访问端点,则可以很容易地进行测试。

As per the error trace, your connection has an SSL error. The most obvious reason to it that your hosted endpoint either does not have a valid HTTPS certificate or your HTTPS configuration is not right. This can be easily tested if you somehow can hit your endpoint through a browser or a through a curl request.

这篇关于OpenSSL SSL_connect:连接到api.amazonalexa.com的SSL_ERROR_SYSCALL:443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆