olivierhagolle / Sentinel-download

Automated download of Sentinel-2 L1C data from ESA (through wget) :http://olivierhagolle.github.io/Sentinel-download

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to establish SSL connection.

Milutinke92 opened this issue · comments

When the download starts, file starts to download:
query_results.xml, file_dir.xml.
Then on the following link for example:
https://scihub.copernicus.eu/apihub/odata/v1/Products('326b6316-f7ae-4ae6-91e5-2121f3aedfe1')/Nodes('S2A_OPER_PRD_MSIL1C_PDMC_20160526T094552_R051_V20160521T105553_20160521T105553.SAFE')/Nodes('GRANULE')/Nodes
It says: Unable an to establish SSL connection. And "granule_dir.xml" is empty.

When I set https_proxy="" then there is no error.
But he's getting more time to send request for file.

I couldn't find your email to ask you, so I attach this question here. Sorry.

Sorry for replying late. This is indeed the place where issues should be posted.
I am not sure i understand this issue very well.
Could you please provide your command lines so that i can test ?
Best regards,
Olivier

I download a fresh copy of your api, and setup like this:
export https_proxy=http://proxy.rcub.bg.ac.rs:8080
export http_proxy=http://proxy.rcub.bg.ac.rs:8080

Now the downloading started but now there is a second issue.
It saty "404 not found".
https://scihub.copernicus.eu/odata/v1/Products('b95cb837-6606-484b-89d6-b10bfaead9bd')/Nodes('S2A_OPER_PRD_MSIL1C_PDMC_20160626T152756_R136_V20160626T093035_20160626T093744.SAFE')/Nodes('DATASTRIP')/Nodes('S2A_OPER_MSI_L1C_DS_MPS__20160626T131738_S20160626T093744_N02.04')/Nodes
If you go to this link (copied from console when running api) you will see "page not found"

BUT, if you change link into https://scihub.copernicus.eu/dhus/odata/v1/Products('b95cb837-6606-484b-89d6-b10bfaead9bd')/Nodes('S2A_OPER_PRD_MSIL1C_PDMC_20160626T152756_R136_V20160626T093035_20160626T093744.SAFE')/Nodes('DATASTRIP')/Nodes('S2A_OPER_MSI_L1C_DS_MPS__20160626T131738_S20160626T093744_N02.04')/Nodes
The file is there.

So /dhus/odata/ works, /odata/ doesn't work.

I tried to add --dhus into console, and that's okay for first file granule_dir or something like that, but then he tries to download from /odata/ all other files.

Help?

I tried to modify your API, to insert /dhus/ in every link.
The download start. But on some link same error: SSL Connection could not be establish.

I upload you log.txt file to see console output: http://www102.zippyshare.com/v/H9TsdBND/file.html

This is fresh copy of API downloaded from here. When I add --dhus same error.
1
2

And one more thing. it happens that SSL conection sometimes apear on first file, sometimes on 10th and etc. no rule for that.

Thanks Milutinke92.
I have solved this issue (error 404) on Saturday, (it is due to an inconsistency within the files provided by scihub) please pull again the reprository.
I am interested to know if it solves the problem for you too

Regarding the SSL issue, I have never seen it on my side, so I do not know how I can resolve it. Maybe is it a problem with your proxy ?
Olivier

I did and same issue.

wget --no-check-certificate --user="xxxx" --password="xxx" --continue --output-document=temp.xml "https://scihub.copernicus.eu/apihub/odata/v1/Products('c4f7c88d-c6b0-473a-879f-a9819f2f1113')/Nodes('S2A_OPER_PRD_MSIL1C_PDMC_20160620T201325_R051_V20160620T105336_20160620T105336.SAFE')/Nodes('HTML')/Nodes"
--2016-06-27 12:42:48-- https://scihub.copernicus.eu/apihub/odata/v1/Products('c4f7c88d-c6b0-473a-879f-a9819f2f1113')/Nodes('S2A_OPER_PRD_MSIL1C_PDMC_20160620T201325_R051_V20160620T105336_20160620T105336.SAFE')/Nodes('HTML')/Nodes
Resolving proxy.rcub.bg.ac.rs (proxy.rcub.bg.ac.rs)... 147.91.1.42, 147.91.1.43, 147.91.1.44, ...
Connecting to proxy.rcub.bg.ac.rs (proxy.rcub.bg.ac.rs)|147.91.1.42|:8080... connected.
Unable to establish SSL connection.
Traceback (most recent call last):
File "Sentinel_download.py", line 351, in
get_dir('HTML',url_html_dir,product_dir_name,wg,auth,wg_opt,value)
File "Sentinel_download.py", line 67, in get_dir
download_tree(product_dir_name+'/'+dir_name,"temp.xml",wg,auth,wg_opt,value)
File "Sentinel_download.py", line 40, in download_tree
urls,types,names=get_elements(xml_file)
File "Sentinel_download.py", line 29, in get_elements
line=fic.readlines()[0].split('')
IndexError: list index out of range
stefan@W04704:~/Downloads/Sentinel-download-master$

As I said, the new patch corrects for the error 404, but not for the issue with your proxy.
Maybe should you ask support from you proxy support.
Olivier

It's something with our proxy on faculty. Thanks for all reply!