NSF Unidata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote access to netCDF files through HTTP

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.



Whats the URL of the file you want to access through HTTP?
Needham, Sheila wrote:
John,

I'm getting this error when my program tries to access a file over the network:

Exception
java.io.IOException: Server does not support byte Ranges
at ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:99) at ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.java:78)
        at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:277)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:258)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:231)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:219)
        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:207)
        at test.TestNetcdf.main(TestNetcdf.java:20)
Process exited with exit code 0.

Looking at the NetCDF-Java User's Manual it would seem I have to "configure the server to set the Content-Length and Accept-Ranges:Bytes headers". It's not obvious (to me) how I do this. Can you point me to some documentation? I'm using Tomcat 5.5.

Thanks,

Sheila

============================================
Sheila Needham  Senior Software Developer
Infrastructure Development Team   Technology
*Met Office*  Fitzroy Road Exeter EX1 3PB United Kingdom
Tel: +44 (0)1626 363489 E-mail: address@hidden
_http://www.metoffice.gov.uk_
============================================