对某些 url 的 Https 请求不起作用ssl:wrong_version_number 错误

如何解决对某些 url 的 Https 请求不起作用ssl:wrong_version_number 错误

我的平台版本:

  • AWS EKS 1.18
  • istio 1.7.3

嗨,我在通过 https 请求时遇到问题。 当我尝试在 ssl 上连接到“https://kinesis.ap-northeast-2.amazonaws.com”时,出现 ssl3_get_record:wrong version number 错误。 但是,对“https://www.amazon.com”的 SSL 请求有效。对“kinesis.ap-northeast-2.amazonaws.com:443”的 Http 请求也有效。 仅供参考,对路由器代理上的 kinesis 的 https 请求也有效。我认为这个问题出现在 sidecar 代理上。 你能告诉我怎么解决吗?

我的调试日志:

istio-proxy@xx-deployment-1:/$ curl https://kinesis.ap-northeast-2.amazonaws.com # SSL ERROR
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

istio-proxy@xx-deployment-1:/$ openssl s_client -connect kinesis.ap-northeast-2.amazonaws.com:443 -prexit -debug
CONNECTED(00000005)
write to 0x55da2e01a630 [0x55da2e02cbb0] (338 bytes => 338 (0x152))
0000 - 16 03 01 01 4d 01 00 01-49 03 03 d1 6c 8f 02 46   ....M...I...l..F
....
0150 - a6 18                                             ..
read from 0x55da2e01a630 [0x55da2e0238a3] (5 bytes => 5 (0x5))
0000 - 15 00 00 00 02                                    .....
140165107823040:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:332:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 338 bytes
Verification: OK
---
New,(NONE),Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
read from 0x55da2e01a630 [0x55da2e011d80] (8192 bytes => 9 (0x9))
0000 - 02 28 15 00 00 00 02 01-00                        .(.......
read from 0x55da2e01a630 [0x55da2e011d80] (8192 bytes => 0 (0x0))
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 14 bytes and written 338 bytes
Verification: OK
---
New,Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)

443 端口上的 http 请求测试:

root@xx-deployment-576c874974-g8pnn:/usr/src/app# curl -iv http://kinesis.ap-northeast-2.amazonaws.com:443
* Rebuilt URL to: http://kinesis.ap-northeast-2.amazonaws.com:443/
*   Trying 54.230.155.14...
* TCP_NODELAY set
* Connected to kinesis.ap-northeast-2.amazonaws.com (54.230.155.14) port 443 (#0)
> GET / HTTP/1.1
> Host: kinesis.ap-northeast-2.amazonaws.com:443
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
< Server: CloudFront
Server: CloudFront
< Date: Wed,10 Mar 2021 07:51:49 GMT
Date: Wed,10 Mar 2021 07:51:49 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 915
Content-Length: 915
< Connection: close
Connection: close
< X-Cache: Error from cloudfront
X-Cache: Error from cloudfront
< Via: 1.1 3dd24013b0b99bf4ea490be8808572d8.cloudfront.net (CloudFront)
Via: 1.1 3dd24013b0b99bf4ea490be8808572d8.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: ICN51-C2
X-Amz-Cf-Pop: ICN51-C2
< X-Amz-Cf-Id: ZffqQUOQWMUZaVaejuWuy0QTeVrpa47cFhWq7ion4aM2jj7nR17v4w==
X-Amz-Cf-Id: ZffqQUOQWMUZaVaejuWuy0QTeVrpa47cFhWq7ion4aM2jj7nR17v4w==

< 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>400 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later,or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront,you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: ZffqQUOQWMUZaVaejuWuy0QTeVrpa47cFhWq7ion4aM2jj7nR17v4w==
</PRE>
<ADDRESS>
</ADDRESS>
* Curl_http_done: called premature == 0
* Closing connection 0

我的 istio 代理配置:

  proxy:
    autoInject: enabled
    clusterDomain: cluster.local
    componentLogLevel: 'misc:error'
    enableCoreDump: false
    excludeIPRanges: ''
    excludeInboundPorts: ''
    excludeOutboundPorts: ''
    image: proxyv2
    logLevel: warning
    privileged: false
    readinessFailureThreshold: 30
    readinessInitialDelaySeconds: 1
    readinessPeriodSeconds: 2
    resources:
      limits:
        cpu: 2000m
        memory: 1024Mi
      requests:
        cpu: 100m
        memory: 128Mi
    statusPort: 15020
    tracer: zipkin
  proxy_init:
    image: proxyv2
    resources:
      limits:
        cpu: 2000m
        memory: 1024Mi
      requests:
        cpu: 10m
        memory: 10Mi

我的 sidecar 代理容器规范:

- name: istio-proxy
  image: 'docker.io/istio/proxyv2:1.7.3'
  args:
    - proxy
    - sidecar
    - '--domain'
    - $(POD_NAMESPACE).svc.cluster.local
    - '--serviceCluster'
    - xx.$(POD_NAMESPACE)
    - '--proxyLogLevel=warning'
    - '--proxyComponentLogLevel=misc:error'
    - '--trust-domain=cluster.local'
    - '--concurrency'
    - '2'

我的网关容器规范:

  containers:
    - name: istio-proxy
      image: 'docker.io/istio/proxyv2:1.7.3'
      args:
        - proxy
        - router
        - '--domain'
        - $(POD_NAMESPACE).svc.cluster.local
        - '--proxyLogLevel=warning'
        - '--proxyComponentLogLevel=misc:error'
        - '--log_output_level=default:info'
        - '--serviceCluster'
        - xx-gateway
        - '--trust-domain=cluster.local'

解决方法

我创建了另一个 EKS 集群来测试这个错误。 所以,我发现问题出在这个 istio 配置中。

<span th:utext="${'&#36;'+'&nbsp;'}" ></span></b><span th:text="${p.price}"></span>

在我删除“podDNSSearchNamespaces”键后,https 起作用了。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res