Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-2838

Poor error message for a mistake in security configration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: Master, Security, UI
    • Labels:
    • Rank:
      1|hzyuzr:

      Description

      Our documentation advises to create a file in /etc/default/cdap-master containing CDAP_PRINCIPAL="<cdap-principal>@EXAMPLE.REALM.COM". If the user copies this literally, and does not replace <cdap-principal> with his actual kerberos principal, then the master fails to start with a cryptic and misleading error message in the logs:

      [Fatal Error] cdap-site.xml:146:89: The element type "cdap-principal" must be terminated by the matching end-tag "</cdap-principal>".
      2015-06-19 11:48:06,781 - ERROR [main:c.c.c.c.c.Configuration@1733] - error parsing conf file.
      org.xml.sax.SAXParseException: The element type "cdap-principal" must be terminated by the matching end-tag "</cdap-principal>".
              at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
              at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
              at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177) ~[na:1.7.0_65]
              at co.cask.cdap.common.conf.Configuration.loadResource(Configuration.java:1651) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.common.conf.Configuration.loadResources(Configuration.java:1612) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.common.conf.Configuration.getProps(Configuration.java:1582) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.common.conf.Configuration.get(Configuration.java:495) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.common.conf.Configuration.getTrimmed(Configuration.java:514) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.common.conf.Configuration.getBoolean(Configuration.java:849) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.data.runtime.main.MasterServiceMain.init(MasterServiceMain.java:149) [co.cask.cdap.cdap-master-3.0.0.jar:na]
              at co.cask.cdap.common.runtime.DaemonMain.doMain(DaemonMain.java:55) [co.cask.cdap.cdap-common-3.0.0.jar:na]
              at co.cask.cdap.data.runtime.main.MasterServiceMain.main(MasterServiceMain.java:144) [co.cask.cdap.cdap-master-3.0.0.jar:na]
      Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/etc/cdap/conf.dist/cdap-site.xml; lineNumber: 146; columnNumber: 89; The element type "cdap-principal" must be terminated by the matching end-tag "</cdap-principal>".
              at co.cask.cdap.common.conf.Configuration.loadResource(Configuration.java:1734)
              at co.cask.cdap.common.conf.Configuration.loadResources(Configuration.java:1612)
              at co.cask.cdap.common.conf.Configuration.getProps(Configuration.java:1582)
              at co.cask.cdap.common.conf.Configuration.get(Configuration.java:495)
              at co.cask.cdap.common.conf.Configuration.getTrimmed(Configuration.java:514)
              at co.cask.cdap.common.conf.Configuration.getBoolean(Configuration.java:849)
              at co.cask.cdap.data.runtime.main.MasterServiceMain.init(MasterServiceMain.java:149)
              at co.cask.cdap.common.runtime.DaemonMain.doMain(DaemonMain.java:55)
              at co.cask.cdap.data.runtime.main.MasterServiceMain.main(MasterServiceMain.java:144)
      Caused by: org.xml.sax.SAXParseException; systemId: file:/etc/cdap/conf.dist/cdap-site.xml; lineNumber: 146; columnNumber: 89; The element type "cdap-principal" must be terminated by the matching end-tag "</cdap-principal>".
              at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
              at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177)
              at co.cask.cdap.common.conf.Configuration.loadResource(Configuration.java:1651)
              ... 8 more
      

        Attachments

          Activity

            People

            • Assignee:
              John John Jackson
              Reporter:
              andreas Andreas Neumann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: