ncrncornell / ced2ar

Comprehensive Extensible Data Documentation and Access Repository (CED²AR) was designed to improve the documentation and discoverability of both public and restricted data
https://www.ncrn.cornell.edu/projects/#Metadata_Standards_and_Tools
Other
6 stars 1 forks source link

503 error in local install due to XSD timeout (?) #10

Open MatthewRichardsonICPSR opened 7 years ago

MatthewRichardsonICPSR commented 7 years ago

When attempting to upload large files to our cedar install, I encountered a 503 error.

"The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

Interestingly enough, the upload is actually working. I came back to the site a minute or two later and the uploaded files are listed.

When I look in the error logs, I see a connection timeout trying to retrieve an XSD file from www.ncrn.cornell.edu.

There are about a dozen of references to schema on the Cornell server. It may be worth investigating if there's some way of including the schema in the ced2ar-web project so that it doesn't have to ping another server to process data.

MatthewRichardsonICPSR commented 7 years ago

Here's the error message I saw:

org.xml.sax.SAXParseException; systemId: http://www.ncrn.cornell.edu/docs/ddi/2.5.NCRN.P/schemas/XHTML/xhtml-framework-1.xsd; lineNumber: 72; columnNumber: 16; java.net.SocketException: Connection reset at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:341) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.includeSchema(NGCCRuntimeEx.java:234) at com.sun.xml.xsom.impl.parser.state.includeDecl.action0(includeDecl.java:42) at com.sun.xml.xsom.impl.parser.state.includeDecl.leaveElement(includeDecl.java:109) at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime.java:275) at org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:570) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357) at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.includeSchema(NGCCRuntimeEx.java:234) at com.sun.xml.xsom.impl.parser.state.includeDecl.action0(includeDecl.java:42) at com.sun.xml.xsom.impl.parser.state.includeDecl.leaveElement(includeDecl.java:109) at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime.java:275) at org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:570) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357) at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.includeSchema(NGCCRuntimeEx.java:234) at com.sun.xml.xsom.impl.parser.state.includeDecl.action0(includeDecl.java:42) at com.sun.xml.xsom.impl.parser.state.includeDecl.leaveElement(includeDecl.java:109) at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime.java:275) at org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:570) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357) at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.importSchema(NGCCRuntimeEx.java:243) at com.sun.xml.xsom.impl.parser.state.importDecl.action0(importDecl.java:45) at com.sun.xml.xsom.impl.parser.state.importDecl.leaveElement(importDecl.java:126) at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime.java:275) at org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:570) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357) at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115) at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337) at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:124) at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:183) at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:172) at edu.ncrn.cornell.ced2ar.eapi.XMLHandle.getParser(XMLHandle.java:122) at edu.ncrn.cornell.ced2ar.eapi.XMLHandle.(XMLHandle.java:91) at edu.ncrn.cornell.ced2ar.eapi.ProvGenerator.updateProvFromCodebook(ProvGenerator.java:83) at edu.ncrn.cornell.ced2ar.eapi.rest.queries.EditCodebookData.postCodebook(EditCodebookData.java:195) at edu.ncrn.cornell.ced2ar.eapi.rest.queries.EditCodebookData.postCodebook(EditCodebookData.java:233) at edu.ncrn.cornell.ced2ar.ei.controllers.Upload.uploadNewCodebook(Upload.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at

MatthewRichardsonICPSR commented 7 years ago

Note this error occurred at ~9:30am on 2017-02-17. I have since been able to upload files to our local server with no problems.

MatthewRichardsonICPSR commented 7 years ago

Looking at this a little closer, it's probably the intent of schema.location in config.properties to enable the dev to get around this issue. So the only real task is to revise any static instances of schema declaration and point to a config property.