Re: [idvusers] http based .nc retrieval issue in IDV 2.4

Hi Stuart,

In the past I have used IDV to load and view data from a netcdf file (CF-compliant) accessed over http (I use Tomcat as the web server, not that that should matter). this is NOT an opendap server in any way.

Now, in IDV 2.4, this is failing.  I get this error: Server does not support byte Ranges
This is probably a http server configuration. To access netcdf files via http you need to have byte ranges turned on on your server:

As to the below opendap request that returns a 404 that is how the IDV/Java netcdf code works. It will first try to open the url as an opendap url (the .dds). This fails with a 404. Then it tries it as a http. Perhaps you did not see that in your tcpmon output?


at ucar<init>( 99) at ucar<init>( 78)
        at ucar.nc2.NetcdfFile.getRaf(
        at ucar.nc2.dataset.NetcdfDataset.openFile(

For debug, I put tcpmon in between IDV and my web server. When IDV issues this request

HEAD /uwme/netcdf/ HTTP/1.1
User-Agent: Java/1.5.0_13
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

it gets this response (since we have no .dds file nor servlet mapped to service the url)

HTTP/1.1 404 /uwme/netcdf/
Date: Mon, 17 Mar 2008 20:38:17 GMT
Server: Apache/2.2.6 (Fedora)
Connection: close
Content-Type: text/html;charset=ISO-8859-1

It appears as if the 404 response is throwing the IDV error. Weird thing is that there is no 'byte range' http header in the request??

Looking at the stack trace above, maybe the issue lies in the netcdf- java package, since IT contains the HttpRandomAccessFile class???

Any help appreciated.

PS: If I download a nc file from my web site using a browser and then load that from local disk in IDV, the file loads OK.

idvusers mailing list
For list information, to unsubscribe, visit: