-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Versions impacted by the bug
NJ 5.8.0-SNAPSHOT
What went wrong?
I had a query today from someone trying to open a remote dataset and getting an authorization error in Panoply. This even though he could enter the same URL in his web browser and simply download the file.
The problem is the result of Panoply trying to create a DatasetUrl, and the NJ code throwing an error because the remote server returned a 403 response when DatasetUrl.checkIfDods tried asking for the URL with ".dds" appended.
It would seem to me that the code in DatasetUrl.disambiguateHttp (line 383) should trap for this, and if it occurs, move on to the next test.
Actually, it looks like several of the checkifXxxx methods in DatasetUrl throw such exceptions, so perhaps DatasetUrl.disambiguateHttp should do the same for those cases also?
Or is there some use case for these exceptions that I am not getting?
Relevant stack trace
java.io.IOException: Unauthorized to open dataset https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/post-processed/RFC/AB/channel_rt/nwm.t2025041403z.short_range.channel_rt.abrfc.nc
at ucar.nc2.dataset.DatasetUrl.checkIfDods(DatasetUrl.java:446)
at ucar.nc2.dataset.DatasetUrl.disambiguateHttp(DatasetUrl.java:383)
at ucar.nc2.dataset.DatasetUrl.findDatasetUrl(DatasetUrl.java:161)
at gov.nasa.giss.data.nc.NcFileUtils.createDatasetUrl(NcFileUtils.java:96)Relevant log messages
No response
If you have an example file that you can share, please attach it to this issue.
If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.
Yes
Code of Conduct
- I agree to follow the UCAR/Unidata Code of Conduct