Re: [thredds] HTTPServer/fileServer for dataset

Hi Aleksander,

There are a few issues with your catalog:

1. You need to define a datasetRoot element.
2. The netcdf element is used to define a NetCDF file inline (within the
catalog). You don't need it.
3. Instead, point to your existing NetCDF file using the combination of
datasetRoot and urlPath.

Try something like this instead:

<datasetRoot path="test-data"
location="/opt/tomcat/content/thredds/testdata/" />

<dataset name="TestDataset" ID="test" urlPath="test-data/testfile.nc">
    <metadata inherited="true">
        <serviceName>testservices</serviceName>
        <dataType>Station</dataType>
    </metadata>
</dataset>

Also, take a look at our THREDDS Configuration Catalogs tutorial [1].
Hopefully that'll get you sorted.

Cheers,
Christian

[1]
http://www.unidata.ucar.edu/software/thredds/current/tds/tutorial/BasicConfigCatalogs.html#ConfigCatalogs


On Fri, Feb 13, 2015 at 3:27 AM, Aleksander Vines <aleksander.vines@xxxxxxxx
> wrote:

> Hi,
>
> Is it not possible to serve a regular netCDF file with the HTTPServer
> service? I can get it to work with a datasetScan, but not dataset where i
> specify a netCDF file.
>
> In the following example, OPeNDAP works for both datasets, while
> HTTPServer works for only the datasetScan. The first dataset returns HTTP
> 404 when I try to download the file. Tested on 4.3.23 and 4.5.4.
>
> Example catalog.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <catalog name="THREDDS test catalogue"
>         xmlns="
> http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0";
>         xmlns:xlink="http://www.w3.org/1999/xlink";>
>  <service name="testservices" serviceType="Compound" base="">
> <service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/"/>
> <service name="http" serviceType="HTTPServer" base="/thredds/fileServer/"/>
> </service>
>  <dataset name="TestDataset" ID="test"
> urlPath="arcticData/framStrait/testpath">
> <metadata inherited="true">
> <serviceName>testservices</serviceName>
> <dataType>Station</dataType>
> </metadata>
> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";
> location="file:///opt/tomcat/content/thredds/testdata/testfile.nc"/>
> </dataset>
>  <datasetScan name="Test all files in a directory" ID="testDatasetScan"
>       path="testAll" location="/opt/tomcat/content/thredds/testdata/">
> <metadata inherited="true">
> <serviceName>testservices</serviceName>
> <dataType>Station</dataType>
> </metadata>
> <filter>
> <include wildcard="testfile.nc"/>
> </filter>
> </datasetScan>
> </catalog>
>
> Regards,
> Aleksander Vines
>
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
  • 2015 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: