跨域请求的间歇性 ERR_SSL_PROTOCOL_ERROR 错误 [英] Intermittent ERR_SSL_PROTOCOL_ERROR error for cross domain request

查看:163
本文介绍了跨域请求的间歇性 ERR_SSL_PROTOCOL_ERROR 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我网站的用户在向 api.flickr.com

间歇性我的意思是我昨天在向 api 发出的大约 1200 个请求中看到这种情况发生了 4 次.

By intermittent I mean that I've seen this happen 4 times out of ~1200 requests to the api yesterday.

Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR     https://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=.....

我的网站是在 Google App Engine 上运行的 AngularJS 应用程序,并且只能在 HTTPS 上使用.

My site is and AngularJS application running on Google App Engine and is exclusivley avalable on HTTPS.

sslchecker 显示我网站的证书 &证书链 已正确安装.嗯,我觉得还行!

sslchecker shows that my site's certificate & certificate chain is installed correctly. Well, I think it looks ok!

sslchecker for api.flickr.com 显示 ROOT 1证书链的 丢失.这是问题吗?有什么办法可以解决我的问题吗?

sslchecker for api.flickr.com shows that ROOT 1 of the certificate chain is missing. Is that the problem? Is there any way around that for me?

还有其他想法吗?是不是我们的证书是不同机构颁发的问题?

Any other ideas? Is the problem that our certificates are issues by different authorities maybe?

编辑 - 从谷歌分析收集的其他一些可能相关的信息

Edit - Some other possibly relevant info gleaned from google analytics

  • 在不同的操作系统(Android、iOS、Windows)上看到过这种情况
  • 不同的浏览器 - Android、Chrome、Safari
  • 不同的网络域

推荐答案

持久性SSL 协议错误可能是由诸如

Persistent SSL Protocol Errors may be caused by problems like

  • 目标服务器需要不同的协议(例如 SSLv1、SSLv2、SSLv3)

  • the destination server expects a different protocol (e.g. SSLv1, SSLv2, SSLv3)

违反安全政策(例如,某些服务器不接受来自客户端的证书请求)

a violation of a security policy (e.g. some servers don't honor certificate requests made from client)

防火墙阻抗过滤/加密

间歇性SSL 协议错误很难诊断.它们可能是会话过期、密钥过期、连接中断、数据包丢失等的结果

Intermittent SSL Protocol Errors are very hard to diagnose. They can be the result of expired session, expired key, connectivity hiccup, lost packets, etc

更糟糕的是,它们可能是由服务器端问题引起的,例如日期时间同步、服务器连接池已满等.

Even worse, they can be caused by Server Side issues like date-time sync, server connection pool full, etc.

最佳做法是重新发送请求:因为此类问题通常是暂时性故障,通常在第二次尝试时会成功.

Best practice is to re-send the request: because such issues are often a temporary glitch, and usually succeed at 2nd attempt.

Flickr2014 年 6 月 27 日(不到一年)将他们的 API 切换为仅 SSL.从那以后,他们的论坛因 SSL 相关问题而炸毁.

Flickr switched their API to SSL-only on June 27th, 2014 (a little under a year). Their Forum has blown up with SSL related problems since then.

在过去几个月中,许多用户报告了(检查线程) 零星的SSL 协议错误.

In the past few months many users have reported (check thread) sporadic SSL Protocol Errors.

这些协议错误出现在所有设备类型(笔记本电脑、台式机、移动设备、Linux、Windows 等)中,通常会立即出现- 尝试成功.这些问题的共性和非常罕见的性质表明,主机端存在一些与客户端上的任何事情完全无关的问题.

These Protocol Errors appear across all device types (laptops, desktops, mobile, Linux, Windows, etc) and usually an immediate re-try is successful. The commonality and highly infrequent nature of these problems indicates there is some issue on the host side completely unrelated to anything on the client.

由于重新尝试或第二次尝试通常会成功,我建议捕获错误,然后再尝试 1-3 次:

Since a re-fresh or 2nd attempt is usually successful, I suggest trapping the error, and making 1-3 more attempts:

var promise = flickrService.get(...);

promise.success(function (data, status, headers, config) {
        // Big Party
    })
    .error(function(data, status, headers, config) {
        if (status == 107) {
            promise = flickrService.get(...);

            promise.success(function (data, status, headers, config) {
                    // Big Party
                })
                .error(function (data, status, headers, config) {
                    AlertService.RaiseErrorAlert("Flickr temporarily unavailable.Please try again later");
                });
        }
    });

如果您继续遇到协议错误",请通知用户 Flickr 暂时不可用并稍后重试.

If you continue to get a "Protocol Error", then inform the user that Flickr is temporarily unavailable and to try again later.

这篇关于跨域请求的间歇性 ERR_SSL_PROTOCOL_ERROR 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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