Closed EmileSonneveld closed 2 weeks ago
The request requires credentials. To quickly inspect the error, you can paste the following snippet in the console of https://services.terrascope.be/
function badGet(url) {
let res = null;
const xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (xhttp.readyState === 4)
{
if(xhttp.status < 200 || xhttp.status >= 300){
document.body.append("badGet: " + xhttp.message);
throw new Error("badGet: " + xhttp.message);
}
}
}
xhttp.open("GET", url);
xhttp.send();
return res;
}
for(var i=0; i<100; i++){
badGet("https://services.terrascope.be/download/AgERA5/2024/20240418/AgERA5_dewpoint-temperature_20240418.tif")
}
This works on https://openeo-staging.dataspace.copernicus.eu/ now. The example process graph encountered 30 times a 429 error, but got trough after retrying
BTW for retries you can use Failsafe; the SHub module also uses it: https://github.com/Open-EO/openeo-geotrellis-extensions/blob/ba6b104cf546523e8a7dd4ed8b4df939d34e2d95/geotrellis-sentinelhub/src/main/scala/org/openeo/geotrellissentinelhub/ProcessApi.scala#L61-L90
if you're not taking a Retry-After header into account this should become a great deal simpler.
@bossie review
Got this issue when running on http://openeo.vito.be. The last MR is not depoyed there yet, but I'd like to keep this ticket open till the cause is found. (Also with this fix deployed on http://openeo-dev.vito.be, this error occurs)
java.io.IOException: Exception while determining data type of asset https://services.terrascope.be/download/AgERA5/2022/20220330/AgERA5_temperature-mean_20220330.tif in collection https://stac.openeo.vito.be/collections/agera5_daily. Detailed message: requirement failed: Server doesn't support ranged byte reads
job_id: j-240628ca5e454cabbb16b64caacb2e8d
Nevermind, it works on https://openeo-staging.dataspace.copernicus.eu and does not need to work on Terrascope, as the the native AGERA5 layer is available there.
The following snippet triggers a 429 error. A backoff strategy or polling mechanism could avoid that