ESGF / esgf-installer

ESGF P2P Node Installer
https://esgf.llnl.gov/
Other
21 stars 21 forks source link

NetCDF-4 C library not present #576

Closed nathanlcarlson closed 5 years ago

nathanlcarlson commented 5 years ago

/usr/local/tomcat/logs/catalina.out reports the following warnings.

WARN  [localhost-startStop-1] (TdsContext.java:getPropertyDir():508) - TdsContext.init(): "tds.upload.dir" property isn't defined.
WARN  [localhost-startStop-1] (TdsContext.java:getPropertyFile():554) - TdsContext.init(): "tds.upload.form" property isn't defined.
WARN  [localhost-startStop-1] (TdsContext.java:getPropertyDir():508) - TdsContext.init(): "tds.download.dir" property isn't defined.
WARN  [localhost-startStop-1] (TdsContext.java:getPropertyFile():554) - TdsContext.init(): "tds.download.form" property isn't defined.
WARN  [localhost-startStop-1] (Nc4Iosp.java:load():157) - Nc4Iosp: NetCDF-4 C library not present (jna_path='null', libname='netcdf').
java.lang.UnsatisfiedLinkError: Unable to load library 'netcdf': Native library (linux-x86-64/libnetcdf.so) not found in resource path ([file:/usr/local/apache-tomcat-8.5.20/webapps/thredds/WEB-INF/classes/, ...
nathanlcarlson commented 5 years ago

yum install netcdf resolved the missing library issue.

nathanlcarlson commented 5 years ago

Leaving this open until it is added to the installer.

nathanlcarlson commented 5 years ago

@sashakames Do you know if those missing properties are to be specified at the command line during tomcat start up like -Dtds.download.dir or within a config file? Also, what should the values be?

nathanlcarlson commented 5 years ago

@sashakames It looks like that are to be set in /usr/local/tomcat/bin/setenv.sh. Is that correct?

nathanlcarlson commented 5 years ago

This TDS site mentions that these properties need to be defined for upload and download capabilities. I am not sure how this has been done in the past.

sashakames commented 5 years ago

I noticed the PR for installing netCDF via yum. We don't do this in 2.x and I think there's a good reason, that NetCDF is too closely coupled to many of the tools eg. CDAT that are deployed via other means. We could end up with a version conflict. I think to get THREDDS working its better to try to see what's different from 2.x, where presumably we don't have this problem.

sashakames commented 5 years ago

Thinking more about this, in 2.x TDS likely runs in an environment where NetCDF is installed. Perhaps its missing now in 3.0?

nathanlcarlson commented 5 years ago

Th only netcdf reference I found in the master esg-node is in setup_cdat()

conda install -y -c conda-forge cdms2 cdtime libnetcdf cdat_info  

The netcdf library has to be somewhere in 2.x. Maybe it is installed into /usr/local/tomcat/lib or /usr/local/tomcat/webapps/thredds/WEB-INF/lib. If it is the latter case it must be packaged in the .war. Perhaps we are getting the wrong thredds.war. There are several available in the distribution mirror.

nathanlcarlson commented 5 years ago

Or maybe we got rid of it being installed into the conda environment somewhere.

nathanlcarlson commented 5 years ago

It is just a warning, it looks like thredds can start without it.

nathanlcarlson commented 5 years ago

TDS's website talks about this library here. Do we want to build the library from source?

sashakames commented 5 years ago

source /path/to/conda/bin/activate esgf-pub # if not already conda list # you should find NetCDF there

nathanlcarlson commented 5 years ago

There are a couple netcdf-fortran and netCDF4. What really needs to be present I think is

ls /usr/local/conda/envs/esgf-pub/lib/ | grep libnetcdf.so

I uninstalled to netcdf-fortran and libnetcdf.so remained, so the package that installs it is netCDF4. And it is present, it seems then the LD_LIBRARY_PATH does not include /usr/local/conda/envs/esgf-pub/lib when thredds is starting.