Unrecognized SSL message, plaintext connection?https请求遇到异常分析
来源:互联网 发布:淘宝详情页950代码 编辑:程序博客网 时间:2024/05/16 12:39
先简单介绍一下场景。
服务架构为:haproxy+keepalive + esb+应用。
在esb层实现 https双向认证。这样就需要 haproxy 使用 tcp 模式进行转发。
配置好 haproxy 后,用restclient模拟客户端发送https请求时 客户端报错:
“Unrecognized SSL message, plaintext connection?”
客户端对同一端口(https的端口)使用http协议发送消息时,服务端(esb)日志报错:
“Unrecognized SSL message, plaintext connection?”
网上搜到一篇文章解释这个问题:http://blog.csdn.net/dtlscsl/article/details/50462721
产生该问题的原因是:
客户端产生“Unrecognized SSL message, plaintext connection?”的异常 是因为对方提供的不是https服务的端口;
服务端产生该异常,是因为客户端以 http协议访问 服务端的https服务。
带着这个思路,查了下 haproxy的配置,发现
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
默认的方式为http的!
而esb的服务没有配置传输方式!
listen ESB_https 0.0.0.0:8243
mode tcp
log global
option tcplog
balance roundrobin
server ESB_https_126 172.16.0.126:8243 weight 1 maxconn 10000 check inter 3600s
server ESB_https_36 172.16.0.36:8243 weight 1 maxconn 10000 check inter 3600s
加上红字的3句,解决了这个问题。
- Unrecognized SSL message, plaintext connection?https请求遇到异常分析
- Unrecognized SSL message, plaintext connection?https请求遇到异常分析
- Unrecognized SSL message, plaintext connection?
- javaMail(javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection)
- 部署azkaban报错:Unrecognized SSL message, plaintext connection?
- javamail发送SSL邮件报报Unrecognized SSL message, plaintext connection错误
- 使用浏览器访问azkaban报错:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
- 【cas、tomcat】HTTP Status 500 - javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connec
- HTTPS 请求 SSL验证
- 发送https请求,出现Server "172.16.20.107" shut connection during attempt to negotiate SSL session 错误
- https请求 CFNetwork SSLHandshake failed (-9807) A connection failure occurred: SSL problem
- Unrecognized SSL message/DEBUG POP3: authentication command failed
- QT https post请求 ssl
- https请求证书异常javax.net.ssl.SSLHandshakeException sun.security.validator.Validator
- 当OkHttps遇到https请求
- https 的ssl 遇到问题总结
- java实现https ssl请求url
- Java请求Https SSL加密代码
- GSS5 - Can you answer these queries V
- 在梦想的道路上,一路前行
- gradle编译错误:Conflict with dependency com.android.support:support-annotations
- VR播放器研究: 基于 javascrip 和webGL初探
- 如何实现超高并发的无锁缓存
- Unrecognized SSL message, plaintext connection?https请求遇到异常分析
- 在一个Activity里有多次调转网页,自定义返回上一级
- 高性能网络编程(7)--tcp连接的内存使用 (B)
- 访问者模式——操作与数据结构分离
- 中缀表达式转后缀表达式
- 接收xml格式数据的处理(练习)
- Ucosii的实时操作系统(任哲)——第二章
- ReactiveCocoa入门教程:第一部分
- 工厂模式