Unidata / thredds-docker

Dockerized THREDDS
https://hub.docker.com/r/unidata/thredds-docker
BSD 3-Clause "New" or "Revised" License
36 stars 28 forks source link

WMS Endpoints respond with 404 when using unidata/thredds-docker:4.6.20-SNAPSHOT #260

Closed swainn closed 2 years ago

swainn commented 2 years ago

To report a non-security related issue, please provide:

unidata/thredds-docker:4.6.20-SNAPSHOT

Docker:

Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b7f0
 Built:             Wed Mar 11 01:25:46 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b7f0
  Built:            Wed Mar 11 01:24:19 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Description: WMS Endpoints respond with 404 when using unidata/thredds-docker:4.6.20-SNAPSHOT. This issue does not occur if we revert back to the previous version we were using: unidata/thredds-docker:4.6.16.1. No changes were made to the catalog configurations or data.

Reproduce: This dataset is accessible and should support WMS: https://tethys-staging.byu.edu/thredds/catalog/data/groundwater/4/Cordillera_Central/catalog.html?dataset=testDatasetScan/groundwater/4/Cordillera_Central/Cordillera_Central_2_drinterpolation_1637544972.6278963.nc

However, the GetCapabilities requests respond with 404: https://tethys-staging.byu.edu/thredds/wms/data/groundwater/4/Cordillera_Central/Cordillera_Central_2_drinterpolation_1637544972.6278963.nc?service=WMS&version=1.3.0&request=GetCapabilities

GetMap requests also respond with 404: https://tethys-staging.byu.edu/thredds/wms/data/groundwater/4/Cordillera_Central/Cordillera_Central_2_drinterpolation_1637544972.6278963.nc?service=WMS&request=GetMap&layers=tsvalue&styles=boxfill%2Frainbow&format=image%2Fpng&transparent=true&version=1.3.0&colorscalerange=-119.935%2C1043.237&time=1996-12-31T00%3A00%3A00.000Z&width=256&height=256&crs=EPSG%3A3857&bbox=-7983694.730330091,2035059.4410645345,-7827151.69640205,2191602.474992575

Note: I will likely revert back to 4.6.16.1 until this issue is resolved, so the links above may function fine.

The following error is logged when this happens:

SEVERE [http-nio-8080-exec-22] org.apache.catalina.core.ApplicationContext.log Servlet.init() for servlet [wms] threw exception
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wmsController' defined in ServletContext resource [/WEB-INF/wms-servlet.xml]: Invocation of init method failed; nested exception is thredds.server.wms.config.WmsConfigException: org.jdom2.input.JDOMParseException: Error on line 1 of document http://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd: The markup declarations contained or pointed to by the document type declaration must be well-formed.
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
                at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
                at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
                at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
                at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
                at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
                at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
                at javax.servlet.GenericServlet.init(GenericServlet.java:158)
                at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1118)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:789)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1673)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:748)
        Caused by: thredds.server.wms.config.WmsConfigException: org.jdom2.input.JDOMParseException: Error on line 1 of document http://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd: The markup declarations contained or pointed to by the document type declaration must be well-formed.
                at thredds.server.wms.config.WmsDetailedConfig.fromInputStream(WmsDetailedConfig.java:130)
                at thredds.server.wms.config.WmsDetailedConfig.fromFile(WmsDetailedConfig.java:80)
                at thredds.server.wms.ThreddsWmsController.init(ThreddsWmsController.java:121)
                at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1748)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1685)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1615)
                ... 36 more
        Caused by: org.jdom2.input.JDOMParseException: Error on line 1 of document http://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd: The markup declarations contained or pointed to by the document type declaration must be well-formed.
                at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:228)
                at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:253)
                at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1091)
                at thredds.server.wms.config.WmsDetailedConfig.fromInputStream(WmsDetailedConfig.java:97)
                ... 44 more
        Caused by: org.xml.sax.SAXParseException; systemId: http://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd; lineNumber: 1; columnNumber: 3; The markup declarations contained or pointed to by the document type declaration must be well-formed.
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
                at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1473)
                at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:2038)
                at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:307)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1174)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1045)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:959)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
                at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
                at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
                ... 47 more
13-Jan-2022 20:44:40.040 SEVERE [http-nio-8080-exec-22] org.apache.catalina.core.StandardWrapperValve.invoke Allocate exception for servlet [wms]
        org.xml.sax.SAXParseException; systemId: http://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd; lineNumber: 1; columnNumber: 3; The markup declarations contained or pointed to by the document type declaration must be well-formed.
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
                at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
                at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
                at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1473)
                at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:2038)
                at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:307)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1174)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1045)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:959)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
                at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
                at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
                at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:253)
                at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1091)
                at thredds.server.wms.config.WmsDetailedConfig.fromInputStream(WmsDetailedConfig.java:97)
                at thredds.server.wms.config.WmsDetailedConfig.fromFile(WmsDetailedConfig.java:80)
                at thredds.server.wms.ThreddsWmsController.init(ThreddsWmsController.java:121)
                at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1748)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1685)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1615)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
                at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
                at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
                at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
                at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
                at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
                at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
                at javax.servlet.GenericServlet.init(GenericServlet.java:158)
                at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1173)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1118)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:789)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1673)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:748)
ethanrd commented 2 years ago

Hi @swainn - Try editing the content/thredds/wmsConfig.xml file and changing line 2.

I believe it is currently this

<!DOCTYPE wmsConfig SYSTEM "https://www.unidata.ucar.edu/schemas/thredds/dtd/ncwms/wmsConfig.dtd">

and should instead be

<!DOCTYPE wmsConfig SYSTEM "https://schemas.unidata.ucar.edu/thredds/dtd/ncwms/wmsConfig.dtd">

With TDS 4.6, I don't think you will even have to restart the TDS. A restart is needed for TDS 5.

If that doesn't work, we'll have to dig deeper. But I'm pretty sure that will work.

Cheers,

Ethan

swainn commented 2 years ago

That did the trick. Thank you for your rapid response.