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.
1) What version of netcdf-java library? An older version requires Accept-Ranges header, latest version (4.0.31) will tolerate not seeing it. 2) I have seen a previous case where some intermediary was stripping HTTP headers (!) You might test in the following way: 1. Add Live HTTP Headers plug-in to Firefox. 2. Try the URL in firefox: http://motherlode.ucar.edu:8080/thredds/fileServer/fmrc/NCEP/NAM/Alaska_11km/files/NAM_Alaska_11km_20090204_1200.grib2 You should get something the following in the Live Headers window: http://motherlode.ucar.edu:8080/thredds/fileServer/fmrc/NCEP/NAM/Alaska_11km/files/NAM_Alaska_11km_20090204_1200.grib2 GET /thredds/fileServer/fmrc/NCEP/NAM/Alaska_11km/files/NAM_Alaska_11km_20090204_1200.grib2 HTTP/1.1 Host: motherlode.ucar.edu:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Last-Modified: Wed, 04 Feb 2009 14:56:37 GMT Accept-Ranges: bytes Content-Type: application/octet-stream Transfer-Encoding: chunked Content-Encoding: gzip Vary: Accept-Encoding Date: Mon, 09 Feb 2009 20:44:20 GMT In particular you should see Accept-Ranges: bytes ---------------------------------------------------------- David Stuebe wrote: > > As an example, I just hit this file on thredds motherlode and I get the > same response: > > HTTPServer:http://motherlode.ucar.edu:8080/thredds/fileServer/fmrc/NCEP/ > NAM/Alaska_11km/files/NAM_Alaska_11km_20090204_1200.grib2 > > java.io.IOException: Server does not support byte Ranges > at > ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.ja > va:123) > at > ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.ja > va:94) > at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:441) > at ucar.nc2.NetcdfFile.open(NetcdfFile.java:347) > at > ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:622) > at > ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:500) > at ucar.nc2.ui.ToolsUI$NCdumpPanel.run(ToolsUI.java:1214) > at ucar.nc2.ui.ToolsUI$GetDataTask.run(ToolsUI.java:3098) > at java.lang.Thread.run(Unknown Source) > > > > > -----Original Message----- > From: John Caron [mailto:address@hidden] > Sent: Wednesday, February 04, 2009 12:21 PM > To: David Stuebe > Cc: Jennifer Read; Guy De Wardener; address@hidden > Subject: Re: FW: Java Error > > see > > http://www.unidata.ucar.edu/software/netcdf-java/reference/HTTPservice.h > tml > > David Stuebe wrote: >> Hi John >> >> CC Jenn, Guy >> >> I have run into a problem accessing files on HTTP servers using netcdf > >> Java. I get this error: Server does not support byte Ranges >> >> The strange part is that the error only occurs when accessing the >> files from ASA. Specifically when I take my laptop home and make the >> same NETCDF JAVA request from my house it works fine. Similarly local >> files, or files hosted inside the ASA network are fine. There is >> something funny about the fire wall or our service provider but we >> can't seem to figure out what. Have you run into this before? >> >> Let me know if you have any ideas >> >> Thanks >> >> David Stuebe >> >> *From:* Jennifer Read >> *Sent:* Tuesday, February 03, 2009 10:33 AM >> *To:* Jennifer Read; Guy De Wardener >> *Cc:* David Stuebe >> *Subject:* RE: Java Error >> >> We tested with this address: >> > http://science.whoi.edu/users/kestons/redtide_2005_hindcast/OUT/avg_gom_ > 0014.nc >> using java NetCDF (One ring to bind them). >> >> *From:* Jennifer Read >> *Sent:* Tuesday, February 03, 2009 10:22 AM >> *To:* Guy De Wardener >> *Cc:* David Stuebe >> *Subject:* Java Error >> >> So, Dave is getting this error: >> >> java.io.IOException: Server does not support byte Ranges >> >> at >> > ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.ja > va:123) >> at >> > ucar.unidata.io.http.HTTPRandomAccessFile.<init>(HTTPRandomAccessFile.ja > va:94) >> at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:441) >> >> at ucar.nc2.NetcdfFile.open(NetcdfFile.java:347) >> >> at >> > ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:622) >> at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:500) >> >> at ucar.nc2.ui.ToolsUI$NCdumpPanel.run(ToolsUI.java:1214) >> >> at ucar.nc2.ui.ToolsUI$GetDataTask.run(ToolsUI.java:3098) >> >> at java.lang.Thread.run(Unknown Source) >> >> When he tries to connect from inside ASA to another source. It works >> outside (at home) and it works inside if he's connecting inside. I'm >> having him see what happens if he uses wireless and tries to connect. >> It isn't a firewall issue- there have been no firewall changes in the >> past long time. >>