Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget returns "Unable to establish SSL connection"

I'm attempting to retrieve a resource using wget, however I keep receiving the following error:

Unable to establish SSL connection.

I've tried the following commands:

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 

And neither has worked.

Detailed logs:

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

I'm running this from a docker container. If I try accessing the resource through my machine, I'm able to get to it.

Any advice on resolving this is greatly appreciate it.

Thank you.

like image 268
afontalv Avatar asked May 11 '18 12:05

afontalv


2 Answers

This is most likely due to a TLS version mismatch from client to server-side. Have a look here:

Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS

EDIT: Upon further digging into the problem, it could also be because of a wrong system time or an old version of wget.

like image 74
n00ne Avatar answered Sep 29 '22 18:09

n00ne


This command solved my problem---> sudo yum update wget

like image 23
jyothsna reddy Avatar answered Sep 29 '22 17:09

jyothsna reddy