ESGF / esgf-installer

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

Thredds not starting properly mid-install #617

Closed nathanlcarlson closed 5 years ago

nathanlcarlson commented 5 years ago

When executing

esgsetup --config --minimal-setup --thredds --publish --gateway {host} --thredds-password {password}

The following error occurs

Each entry has the form 'path_identifier | absolute_directory_path':
Current value is: 

esg_dataroot | /esg/data

Enter lines, or <RETURN> to end
INFO       2018-10-08 08:11:13,734 Reinitializing THREDDS server
Got the error: ESGPublishError("Error reinitializing the THREDDS Data Server: error(111, 'Connection refused')",)
Check that the username/password and reinitialization URLs are correct.
Script exited.

Looking into /usr/local/tomcat/logs/catalina.out the following error caused the thredds startup to fail.

SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

There is only one listener in /usr/local/tomcat/webapps/thredds/WEB-INF/web.xml

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

I am not sure why this would not start. Missing .jar file?

sashakames commented 5 years ago

You will get a "connection refused" if httpd isn't running in order to proxy THREDDS. However, @William-Hill had dealt with this issue before (perhaps not exactly this problem but something related)

nathanlcarlson commented 5 years ago

I found more details regarding the failure to start thredds, from /usr/local/tomcat/logs/localhost.{date}.log

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init me
thod failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [esg.orp.app.tds.TDSAuthorizer] for bean with name 'restrictedDatasetAuthorizer'
 defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: esg.orp.app.tds.TDSAuthorizer
...
Caused by: java.lang.ClassNotFoundException: esg.orp.app.tds.TDSAuthorizer
nathanlcarlson commented 5 years ago

There is this commented out line:

    # esg_functions.download_update("/usr/local/tomcat/webapps/thredds/WEB-INF/lib/esg-orp-2.9.3.jar", "{esg_dist_url}/esg-orp/esg-orp-2.9.3.jar".format(esg_dist_url=esg_dist_url))

but I believe that has been that way for awhile and I am unsure why it would cause things to stop working now.

nathanlcarlson commented 5 years ago

Installing the esg-orp-2.9.10.jar file from the distribution mirror into /usr/local/tomcat/webapps/thredds/WEB-INF/lib resolved the thredds not starting issue.

nathanlcarlson commented 5 years ago

If thredds fails to start and httpd is running the following 404 error occurs.

Got the error: ESGPublishError('Error reinitializing the THREDDS Data Server. Result=\'<!doctype html><html lang="en"><head><title>HTTP Status 404 \\xe2\\x80\\x93 Not Found</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 \\xe2\\x80\\x93 Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> /thredds/admin/debug</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/8.5.20</h3></body></html>\'',)

Which makes sense. So it seems both httpd and thredds need to be running in order to properly run esgsetup from esg-publisher tag v3.5.4.

nathanlcarlson commented 5 years ago

Since we are not performing this re-initialize step any more this does not need to be resolved. It is important to note it may be a problem in the future of course.