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

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

问题描述

当将跨域请求发送到 api.flickr.com 时,我网站的用户会看到间歇 ERR_SSL_PROTOCOL_ERROR / p>

间歇性地表示我昨天看到这种情况发生在1200次〜1200次请求中的4次。

 无法加载资源:net :: ERR_SSL_PROTOCOL_ERROR https://api.flickr.com/services/rest/?method = flickr.photos.getInfo& api_key = ..... 

我的网站是在Google App Engine上运行的AngularJS应用程序,并且可以在HTTPS上独占使用。



sslchecker显示我的网站的证书&证书链正确安装。那么,我认为它看起来不错!



sslchecker for api.flickr.com 显示缺少证书链的 ROOT 1 。这是问题吗?有没有办法解决这个问题?



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



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




  • 不同的操作系统 - Android,iOS,Windows

  • 不同的网域


解决方案

> SSL协议错误 可能是由目标服务器期望的问题造成的,如


  • 一个不同的协议(例如,SSLv1,SSLv2,SSLv3)违反安全策略(例如某些服务器不遵守客户端发出的证书请求)

  • / b>
  • 防火墙阻抗过滤/加密







间歇 SSL协议错误 非常难以诊断。它们可能是会话过期,密钥过期,连接打嗝,丢失数据包等的结果。更糟的是,它们可能是由服务器端问题引起的,例如日期时间同步,服务器连接池已满等。



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




Flickr 仅在2014年6月27日(仅有不到一年的时间)提供SSL。自那时以来,他们的论坛已经爆发了与SSL有关的问题。

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

>

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



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

  var promise = flickrService.get(.. ); 
$ b promise.success(function(data,status,headers,config){
// Big Party
})
.error(function(data,status,头文件,配置文件){
if(status == 107){
promise = flickrService.get(...);
$ b $ promise.success(function(data,status,头文件,配置){
// Big Party
})
.error(函数(数据,状态,头文件,配置){
AlertService.RaiseErrorAlert(Flickr暂时不可用。请稍后再试);
});
}
});

如果您继续收到协议错误,请通知用户表示Flickr暂时不可用,并在稍后再试。


The users of my website are seeing intermittent ERR_SSL_PROTOCOL_ERROR when making cross domain requests to api.flickr.com

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=.....

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

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

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

  • Have seen it happen for different OSes - Android, iOS, Windows
  • Different browsers - Android, Chrome, Safari
  • Different Network Domains

解决方案

Persistent SSL Protocol Errors may be caused by problems like

  • 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)

  • Firewall impedance filtering / ciphering


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.


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.

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

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.

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");
                });
        }
    });

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天全站免登陆