Unable to establish SSL connection with wget

curl

I am trying to execute :

wget https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD

I replaced wget 1.12 with 1.16 on my centos machine.

I have set check-certificate option to off in

vi /etc/wgetrc

I can infact use https usually with wget

wget https://google.com

It doesn't give ssl error with google.com.

Infact I can access the link on browser just fine. Why does it seem to fail with wget then?

With this command, I get:

[root@warehouse ~]# wget 'https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD'
[2] 1487
[3] 1488
[4] 1489
[3]   Done                    reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites
[root@warehouse ~]# --2016-10-06 18:27:48--  https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK
Resolving app.adroll.com (app.adroll.com)... 52.11.56.178, 52.89.249.63
Connecting to app.adroll.com (app.adroll.com)|52.11.56.178|:443... connected.
Unable to establish SSL connection.

Edit: Tried with single and double quotes as well.Made no difference:

[root@warehouse ~]# wget 'https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD'
--2016-10-06 18:32:38--  https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD
Resolving app.adroll.com (app.adroll.com)... 52.89.249.63, 52.11.56.178
Connecting to app.adroll.com (app.adroll.com)|52.89.249.63|:443... connected.
Unable to establish SSL connection.

Edit2: Tried with –no-check-certificate as well:

[root@warehouse ~]# wget --no-check-certificate "https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD"
--2016-10-06 18:35:23--  https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=T4ZPAGYESJEZZMCCBVEMHK&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&format=csv&currency=USD
Resolving app.adroll.com (app.adroll.com)... 52.11.56.178, 52.89.249.63
Connecting to app.adroll.com (app.adroll.com)|52.11.56.178|:443... connected.
Unable to establish SSL connection.

Edit 3:

using  curl -v "https://app.adroll.com/api/v1/export/all_campaigns_report?a‌​dvertisable=T4ZPAGYE‌​SJEZZMCCBVEMHK&repor‌​ts=AllCampaignsSumma‌​ry,AllCampaignsChart‌​,AllAds,AllCampaigns‌​Sites&format=csv&cur‌​rency=USD" 
* About to connect() to app.adroll.com port 443 (#0)
*   Trying 52.11.56.178... connected
* Connected to app.adroll.com (52.11.56.178) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -5938
* Closing connection #0
* SSL connect error
curl: (35) SSL connect error

Best Answer

You can connect to the server, as seen by the line * Connected to app.adroll.com (52.11.56.178) port 443 (#0) (that excludes firewall and/or routing issues) but then the connection gets severed, as indicated by the NSS error code * NSS error -5938 * Closing connection #0 and curl: (35) SSL connect error.

Typically you would need to see the server-side log to know the exact reason, but @Anubioz seems to have the right idea, the server blocks your connect attempt.

You may be running afoul of their invalid traffic protections if you connect from certain IP-address ranges.

"Any domains identified as sources of invalid traffic are permanently blocked."