You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Docker容器中wget无法建立SSL连接的问题求助

SSL Handshake Failure with wget in Docker Container (Works Locally)

我在Docker容器里用wget拉取资源时,一直碰到SSL连接建立失败的问题,但在本地主机上访问该资源完全正常,实在卡壳了,来求助大家!

遇到的错误信息

Unable to establish SSL connection.

已尝试的命令

我试过下面两个命令,都没解决问题:

wget -d https://resourcesource.com/spring-boot-starter-parent-2.0.0.RELEASE.pom 
wget --no-check-certificate -d https://resourcesource.com/spring-boot-starter-parent-2.0.0.RELEASE.pom

详细调试日志

wget -d输出的完整日志如下:

Resolving resourcesource.com (resourcesource.com)... {ip address} 
Caching resourcesource.com => {ip address} 
Connecting to resourcesource.com (resourcesource.com)|{ip address}:443... connected. 
Created socket 3. 
Releasing 0x000055c98ca7a8d0 (new refcount 1). 
Initiating SSL handshake. 
SSL handshake failed. 
Closed fd 3 
Unable to establish SSL connection. 
Saving HSTS entries to /root/.wget-hsts

环境补充说明

  • 操作场景:Docker容器内部执行命令
  • 宿主机本地访问该URL完全正常
  • 容器内可正常解析目标域名,也能连接到443端口,但SSL握手环节直接失败

有没有大佬能给点排查方向或者解决建议?万分感谢!

内容的提问来源于stack exchange,提问作者afontalv

火山引擎 最新活动