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

Re: FW: Java Error



Its pretty clear : the server sends out

 Accept-Ranges: bytes

but you get

 Accept-Ranges: none

Somebody between you and the server is making the switch. Im not sure how you 
track this down
further. Let me know what you find out.

David Stuebe wrote:
> Hi John
> 
> I am using NETCDF JAVA 4.0.31
> 
> Down loaded live headers - very handy!
> 
> It says Accept-Ranges: none
> see below?
> 
> I tried it for a file hosted locally on our thredds server and it works
> fine - Accept-Ranges: bytes. If we suspect it is an intermediary and we
> would like to start complaining to our service provider, can I send them
> this - will they laugh at me? Is there something more specific I can ask
> them about?
> 
> Thank you for your help John!
> 
> David
> 
> ========================================================================
> ====================================================
> http://motherlode.ucar.edu:8080/thredds/fileServer/station/profiler/wind
> /1hr/20090206/PROFILER_wind_01hr_20090206_2000.nc
> 
> GET
> /thredds/fileServer/station/profiler/wind/1hr/20090206/PROFILER_wind_01h
> r_20090206_2000.nc 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
> 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
> Referer:
> http://motherlode.ucar.edu:8080/thredds/catalog/station/profiler/wind/1h
> r/20090206/catalog.html?dataset=NWS/NPN/1hour/20090206/PROFILER_wind_01h
> r_20090206_2000.nc
> 
> HTTP/1.x 200 OK
> Server: Apache-Coyote/1.1
> Last-Modified: Fri, 06 Feb 2009 20:37:20 GMT
> Accept-Ranges: none
> Content-Type: application/x-netcdf
> Content-Length: 333752
> Date: Mon, 09 Feb 2009 21:40:08 GMT
> ========================================================================
> ==================================================
> 
> 
> 
> -----Original Message-----
> From: John Caron [mailto:address@hidden] 
> Sent: Monday, February 09, 2009 3:50 PM
> To: David Stuebe
> Cc: Jennifer Read; Guy De Wardener; address@hidden
> Subject: Re: FW: Java Error
> 
> 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_2009
> 0204_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.
>>>