afontalv
afontalv

Reputation: 333

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.

Upvotes: 10

Views: 50166

Answers (2)

jyothsna reddy
jyothsna reddy

Reputation: 31

This command solved my problem:

sudo yum update wget

Upvotes: 3

n00ne
n00ne

Reputation: 259

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.

Upvotes: 1

Related Questions