unable to establish SSL connection
unable to establish SSL connection
i had setup a crontab which was downloading daily chlorophyll data over the years. Since last month i have been experiencing data not downloading. when i run the script manually it states : unable to establish SSL connection. appreciate any assistance on this.
my server runs from AWS and is built on Ubuntu 16.04.6. I have followed the steps outlined in https://oceancolor.gsfc.nasa.gov/data/download_methods.
i have created a .netrc file with username/password. i am using wget yo download, wget version 1.17.1
this is my code:
if '$PERIOD' == 'daily':
for delta in range(4):
date_stamp = today + timedelta(-delta)
date_stamp = date_stamp.timetuple()
file_name = 'A%4d%03d.L3m_DAY_CHL_chlor_a_4km' % (date_stamp.tm_year, date_stamp.tm_yday)
nc_file_name = file_name + '.nc'
nc_file_path = 'daily/' + nc_file_name
full_url = url + nc_file_name
print full_url
if os.path.exists(nc_file_path):
continue
else:
try:
check_call(['wget','-nc', '--auth-no-challenge=on', '--content-disposition', 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/', '--random-wait', '-P', 'daily'])
except CalledProcessError as cpe:
print cpe.message;
print '\n'
continue
except OSError as oe:
print oe.strerror;
print '\n'
print full_url;
print '\n'
continue
my server runs from AWS and is built on Ubuntu 16.04.6. I have followed the steps outlined in https://oceancolor.gsfc.nasa.gov/data/download_methods.
i have created a .netrc file with username/password. i am using wget yo download, wget version 1.17.1
this is my code:
if '$PERIOD' == 'daily':
for delta in range(4):
date_stamp = today + timedelta(-delta)
date_stamp = date_stamp.timetuple()
file_name = 'A%4d%03d.L3m_DAY_CHL_chlor_a_4km' % (date_stamp.tm_year, date_stamp.tm_yday)
nc_file_name = file_name + '.nc'
nc_file_path = 'daily/' + nc_file_name
full_url = url + nc_file_name
print full_url
if os.path.exists(nc_file_path):
continue
else:
try:
check_call(['wget','-nc', '--auth-no-challenge=on', '--content-disposition', 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/', '--random-wait', '-P', 'daily'])
except CalledProcessError as cpe:
print cpe.message;
print '\n'
continue
except OSError as oe:
print oe.strerror;
print '\n'
print full_url;
print '\n'
continue
Code: Select all
https://oceancolor.gsfc.nasa.gov/data/download_methods/
Filters:
-
- Posts: 396
- Joined: Mon Jun 22, 2020 5:24 pm America/New_York
- Has thanked: 8 times
- Been thanked: 8 times
Re: unable to establish SSL connection
I would suggest upgrading to a more current version of wget to see if that would resolve the issue.
Re: unable to establish SSL connection
Code: Select all
https://oceancolor.gsfc.nasa.gov/data/download_methods/
Re: unable to establish SSL connection
thank you for your suggestion. I have upgraded to wget version 1.21, the latest one. now i see the error as: HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Retrying.
I have .netrc as well as .urs_cookies
appreciate any advice please
Retrying.
I have .netrc as well as .urs_cookies
appreciate any advice please
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: unable to establish SSL connection
Well, "Connection timed out" suggests some server in the mix failed to respond within the timeout defined for wget. Run the wget command with the --debug option, which will print out a lot of information. Some of it might help you identify the issue.
Sean
Sean