Cmd line: Cluster Start Xml Validation

Kyle Nakamoto's Avatar

Kyle Nakamoto

12 Mar, 2010 06:06 PM via web

Are there warnings printed somewhere on cluster start that inform the user that included xml files may not be well formed? This might be a good check to run before actually trying to start the cluster since it can often take a while for the cluster to start up and then bomb out because of the error.

  1. Support Staff 2 Posted by Jim Fleming on 12 Mar, 2010 10:00 PM

    Jim Fleming's Avatar

    Kyle, You should see an error in smb.log, something like the error below if there is a validation error (we do run schema validation on configuration). Is there something else you had in mind?
    Thanks,
    Jim

    Exception in thread "main" com.saffrontech.configuration.ConfigurationError: Failed to load configuration file: saffron.xml. Unable to continue.

    at com.saffrontech.configuration.ConfigurationRegistry.loadImpl(ConfigurationRegistry.java:324)
    at com.saffrontech.configuration.ConfigurationRegistry.load(ConfigurationRegistry.java:265)
    at com.saffrontech.configuration.ConfigurationRegistryFactory.getConfigurationRegistry(ConfigurationRegistryFactory.java:27)
    at com.saffrontech.configuration.LogConfiguration.getLogDescriptors(LogConfiguration.java:48)
    at com.saffrontech.configuration.LogConfiguration.configureLoggers(LogConfiguration.java:37)
    at com.saffrontech.hostmanager.ServiceWrapper.start(ServiceWrapper.java:76)
    at com.saffrontech.hostmanager.ServiceWrapper.main(ServiceWrapper.java:49)
    

    Caused by: org.jdom.input.JDOMParseException: Error on line 122: The content of element type "dataschemas" must match "(dataschema)*".

    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)
    at com.saffrontech.configuration.ConfigurationDocument.load(ConfigurationDocument.java:81)
    at com.saffrontech.configuration.ConfigurationRegistry.loadImpl(ConfigurationRegistry.java:278)
    ... 6 more
    

    Caused by: org.xml.sax.SAXParseException: The content of element type "dataschemas" must match "(dataschema)*".

    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.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.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
    ... 9 more
    
  2. 3 Posted by Kyle Nakamoto on 17 Mar, 2010 07:29 PM

    Kyle Nakamoto's Avatar

    For the command line start, could there possibly be an output to standard out warning of the condition of the start? It would be good to see feedback like: "the cluster is started with X warnings, Y errors"

  3. 4 Posted by Jared Peterson on 17 Mar, 2010 08:23 PM

    Jared Peterson's Avatar

    Kyle,

    I've created an feature request for David to consider.

    Thanks,
    Jared

  4. 5 Posted by Jared Peterson on 17 Mar, 2010 08:23 PM

    Jared Peterson's Avatar

    I'm going to close this down for now.

  5. Jared Peterson closed this discussion on 17 Mar, 2010 08:23 PM.

  6. David E. Young re-opened this discussion on 18 Mar, 2010 01:40 PM

  7. Support Staff 6 Posted by David E. Young on 18 Mar, 2010 01:40 PM

    David E. Young's Avatar

    Any java process errors that occur during cluster start are written to the log. The interface cluster start uses to determine when the cluster is up is a very simple REST call that simply returns the number of running java processes on each node.

    Getting more information from the REST interface will require a fair bit of work. Right now, the logs are the definitive place to look for errors.

  8. Support Staff 7 Posted by David E. Young on 18 Mar, 2010 01:45 PM

    David E. Young's Avatar

    Following up here. If anything, I'd actually suggest an external utility program to verify whether or not an xml file is well-formed. But I'm not familiar enough with the conditions to know how much work would be involved.

  9. David E. Young closed this discussion on 18 Mar, 2010 01:45 PM.

  10. Support Staff 8 Posted by David E. Young on 18 Mar, 2010 01:56 PM

    David E. Young's Avatar

    I suppose another thing we could do after cluster start is grep the log files (on each node unfortunately) for any exceptions and report that they occurred. Not sure if that will catch everything though...

Comments are currently closed for this discussion. You can start a new one.