Troubleshooting Configuration Catalogs

Check log files for errors

The first step of troubleshooting any type of problem should involve looking at available log data. Both Tomcat and the TDS provide a variety of logs that record errors and messages sent by your server.

Useful log files

Log File Description
${tomcat.home}/logs/catalina.{date}.log Tomcat standard out. This is where Tomcat prints messages about Tomcat startup and uncaught exceptions from any webapp.
${tomcat.home}/logs/localhost.{date}.log This is where log messages from Tomcat are sent.
${tomcat.home}/content/thredds/logs/serverStartup.log This is where TDS logs messages about TDS startup.
${tomcat.home}/content/thredds/logs/catalogInit.log Errors and warnings in your catalog configuration files are shown here. Look at this closely every time you change your config catalogs.
${tomcat.home}/logs/access.{date}.log This is where Tomcat access logs are put, if you have enabled them. You need to manage these by removing them, say, once a month.
${tomcat.home}/content/thredds/logs/threddsServlet.log.{date} Each request that the TDS responds to gets logged here. Errors and warnings that are associated with a request are logged here. You need to manage these by removing them, say, once a month.
${tomcat.home}/content/thredds/logs/featureCollectionScan.log Log messages from feature collections.
${tomcat.home}/content/thredds/logs/fc.<collection_name>.log Log messages from feature collections.

Common errors in the TDS Configuration Catalogs

Duplicate path(s)

If you use the same path in more than one data root:

<datasetRoot path="testdup" location="C:/data/" />
<datasetScan name="duplicate path" path="testdup" location="/home/workshop/data/" 
             serviceName="dodsServer" />

you will get an error message in ${tomcat.home}/content/thredds/logs/catalogInit.log:

Error: already have dataRoot =<testdup> mapped to directory= <C:/data/> wanted to map to=</home/workshop/data/> in catalog

Duplicate id(s)

If you use the same id in more than one dataset:

<dataset name="Test Single Dataset 2" ID="testDataset2" serviceName="odap" 
         urlPath="test/testData2.grib2" dataType="Grid" />
<dataset name="Test Single Dataset 3" ID="testDataset2" serviceName="odap" 
         urlPath="test/testData3.grib3" dataType="Grid" />

you will get an error message in ${tomcat.home}/content/thredds/logs/catalogInit.log:

WARNING: Duplicate id on  'THREDDS Catalog Name/Test Single Dataset 3' id= 'testDataset2'

Data directory doesn't exist

If you refer to a non-existant directory:

<datasetRoot path="sage" location="C:/data/notexist/" />
<datasetScan path="sage" location="C:/data/notexist/" />

you will get an error message in ${tomcat.home}/content/thredds/logs/catalogInit.log:

Data Root =sage directory= <C:/data/notexist /> does not exist

or:

Invalid InvDatasetScan <path=testAll; scanLocation=bad/content/testdata>: CrawlableDataset for scanLocation does not exist.
    ... Dropping this datasetScan [testAll].

DatasetScan has missing or invalid service

If you refer to a non-existant service, or omit a service:

<datasetScan name="bad service name" path="segundo" location="C:/data/" serviceName="badd" />
<datasetScan name="no service name" path="tertiary" location="C:/data/" />

you will get an error message in ${tomcat.home}/content/thredds/logs/catalogInit.log:

**Error: DatasetScan (Top Dataset/bad service name ): must have a default service
**Error: DatasetScan (Top Dataset/no service name): must have a default service

Data not compatible with service

If you use a service on a file which that service cant deal with:

<dataset name="Image of my Data" urlPath="images/labyrinth.jpg" serviceName="dodsServer" dataType="Grid" />

Data file does not exist

If you refer to a non-existant file in a dataset:

<dataset name="My Data" ID="Y" urlPath="images/labyrinth.nc" serviceName="dodsServer" dataType="Grid" />

DatasetScan points to an empty directory, or filters out all files in the directory.

No warning - you simply wont see any datasets in that DatasetScan.

Aggregation scan points to an empty directory

No warning - but when you try to access the dataset, client gets:

Error {     
  code = 500;      
  message = "There are no datasets in the aggregation DatasetCollectionManager { 
  collectionName='/data/goes/**/.gini' recheck=15.0 min    dir=/data/goes/ filter=WildcardMatchOnPath{wildcard=*.gini$ regexp=.*\.gini$}";  
};

and the threddsServlet.log has:

SEVERE: path= /ncmlTest.html 
   java.lang.IllegalStateException: There are no datasets in the aggregation DatasetCollectionManager{   
   collectionName='/data/goes/**/.gini' recheck=15.0 min dir=/data/goes/ filter=WildcardMatchOnPath{wildcard=*.gini$   regexp=.*\.gini$}