failed to use wget/curl or hdf to download MCD43A3.061 MODIS data
Posted: Tue Apr 18, 2023 5:22 pm America/New_York
Hi there!
I encountered a confusing problem when downloading the MCD43A3.061 data this afternoon. When I tried to download data via list.txt using curl and wget:
curl --request POST --user USERNAME:PASSWORD --header "Content-Length: 0" "https://appeears.earthdatacloud.nasa.gov/api/login" (it returns me a TOKEN and seems that I log in to the system successfully)
After that, I input the following:
wget --header "Authorization: Bearer TOKEN" -i list.txt
The system responded that it connected but showed:
HTTP request sent, awaiting response...401 Unauthorized
I tried other ways, such as:
wget --user USERNAME --ask-password https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MCD43A3.061/MCD43A3.A2018011.h13v02.061.2021313115305/MCD43A3.A2018011.h13v02.061.2021313115305.hdf
curl -H "Authorization: Bearer TOKEN" -O $url -o LOCATION
But all of them didn't work and returned '403 forbidden' or '401 Unauthorized'
After that, I copied the HTTP link to input in my browser, and it showed access denied.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>BX4RX1CZ0DJFBBSM</RequestId>
<HostId>+RQ8tI/nljlHaO+bqRpVvIa+fjuyg986BDgCY1Q3mJ4htZQGEpYS5KeZjaDPLulofB5Fl/BRVO4=</HostId>
</Error>
However, it works when I click the download button for each file on my web browser. But the download from the web browser always stops suddenly, and hard to find the stop point.
So, I wonder if there is a problem with the HTTP link provided in list.txt or another access problem. Because I tried to create other multiple tasks and enter HTTP links in list.txt but failed again.
Appreciate you a lot for your help!
Best regards,
Qianru
I encountered a confusing problem when downloading the MCD43A3.061 data this afternoon. When I tried to download data via list.txt using curl and wget:
curl --request POST --user USERNAME:PASSWORD --header "Content-Length: 0" "https://appeears.earthdatacloud.nasa.gov/api/login" (it returns me a TOKEN and seems that I log in to the system successfully)
After that, I input the following:
wget --header "Authorization: Bearer TOKEN" -i list.txt
The system responded that it connected but showed:
HTTP request sent, awaiting response...401 Unauthorized
I tried other ways, such as:
wget --user USERNAME --ask-password https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MCD43A3.061/MCD43A3.A2018011.h13v02.061.2021313115305/MCD43A3.A2018011.h13v02.061.2021313115305.hdf
curl -H "Authorization: Bearer TOKEN" -O $url -o LOCATION
But all of them didn't work and returned '403 forbidden' or '401 Unauthorized'
After that, I copied the HTTP link to input in my browser, and it showed access denied.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>BX4RX1CZ0DJFBBSM</RequestId>
<HostId>+RQ8tI/nljlHaO+bqRpVvIa+fjuyg986BDgCY1Q3mJ4htZQGEpYS5KeZjaDPLulofB5Fl/BRVO4=</HostId>
</Error>
However, it works when I click the download button for each file on my web browser. But the download from the web browser always stops suddenly, and hard to find the stop point.
So, I wonder if there is a problem with the HTTP link provided in list.txt or another access problem. Because I tried to create other multiple tasks and enter HTTP links in list.txt but failed again.
Appreciate you a lot for your help!
Best regards,
Qianru