Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8286

Jobs trying to publish cobertura coverage report look for the report in the home dir of the master not the slave.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cobertura-plugin
    • Labels:
      None
    • Environment:
      Master/Slave
    • Similar Issues:

      Description

      Here is the post build output of the plugin:

      Publishing Cobertura coverage report...
      Publishing Cobertura coverage results...
      FATAL: Unable to parse /opt/hudson/.hudson/jobs/Bob Pipeline/builds/2010-12-10_19-10-01/coverage7.xml
      hudson.util.IOException2: Cannot parse coverage results
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:89)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:52)
      at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:262)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:651)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
      at hudson.model.Run.run(Run.java:1363)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:349)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:140)
      Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:81)
      ... 11 more
      FATAL: Unable to parse /opt/hudson/.hudson/jobs/Bob Pipeline/builds/2010-12-10_19-10-01/coverage8.xml
      hudson.util.IOException2: Cannot parse coverage results
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:89)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:52)
      at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:262)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:651)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
      at hudson.model.Run.run(Run.java:1363)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:349)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:140)
      Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:81)
      ... 11 more
      FATAL: Unable to parse /opt/hudson/.hudson/jobs/Bob Pipeline/builds/2010-12-10_19-10-01/coverage9.xml
      hudson.util.IOException2: Cannot parse coverage results
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:89)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:52)
      at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:262)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:651)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
      at hudson.model.Run.run(Run.java:1363)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:349)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:140)
      Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:81)
      ... 11 more

      It reports that it is looking in the home dir of the Master. The slave in tis situation is configured with a home dir of /home/hudson not /opt/hudson.

        Attachments

          Issue Links

            Activity

            Hide
            robertredd robertredd added a comment - - edited

            I'm seeing the exact same behavior in 1.389

            I think it's supposed to look on the master for the coverage.xml report after the copy artifacts puts it there. However, I think this related to some reported issues with the copyartifact plugin truncating the files sometimes. JENKINS-7745.

            Show
            robertredd robertredd added a comment - - edited I'm seeing the exact same behavior in 1.389 I think it's supposed to look on the master for the coverage.xml report after the copy artifacts puts it there. However, I think this related to some reported issues with the copyartifact plugin truncating the files sometimes. JENKINS-7745 .
            Hide
            khushsk Sagar Khushalani added a comment -

            Same behaviour in 1.397.

            If you cat the coverage.xml file in the directory shown in the error message, you'll notice that the entire xml file was not transferred. It breaks in the middle, which is why it can't parse the entire file.

            Show
            khushsk Sagar Khushalani added a comment - Same behaviour in 1.397. If you cat the coverage.xml file in the directory shown in the error message, you'll notice that the entire xml file was not transferred. It breaks in the middle, which is why it can't parse the entire file.
            Hide
            existence Johannes Ohlemacher added a comment - - edited

            I'm seeing the same problem here. Some coverage xml files are not transferred completely to the master, so parsing them fails.
            Jenkins v1.401, cobertura plugin v1.2

            Show
            existence Johannes Ohlemacher added a comment - - edited I'm seeing the same problem here. Some coverage xml files are not transferred completely to the master, so parsing them fails. Jenkins v1.401, cobertura plugin v1.2
            Hide
            gjeudy gjeudy added a comment -

            same problem, the coverage xml files are sometimes cut causing the parsing to fail on the master. This is master/slave remoting related Jenkins v1.400 cobertura plugin v1.2

            Show
            gjeudy gjeudy added a comment - same problem, the coverage xml files are sometimes cut causing the parsing to fail on the master. This is master/slave remoting related Jenkins v1.400 cobertura plugin v1.2
            Hide
            existence Johannes Ohlemacher added a comment -

            v1.403 seams to have solved the problem for me, see JENKINS-7871

            Show
            existence Johannes Ohlemacher added a comment - v1.403 seams to have solved the problem for me, see JENKINS-7871
            Hide
            jtharp jtharp added a comment -

            I have Jenkins 1.409.1 and the problem persists.

            Show
            jtharp jtharp added a comment - I have Jenkins 1.409.1 and the problem persists.
            Hide
            jbernard jul-69 added a comment -

            I have Jenkins 1.432 and the problem occurs.

            Show
            jbernard jul-69 added a comment - I have Jenkins 1.432 and the problem occurs.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            This problem was originally caused by the the remoting layer, not in the cobertra plugin — master started parsing the file before all the bits have arrived from the slave.

            This problem was fixed in 1.413. If you are using earlier versions of the core, please upgrade.

            If you are using a version newer than that and still sees the problem, please make sure you are using up-to-date slave.jar.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - This problem was originally caused by the the remoting layer, not in the cobertra plugin — master started parsing the file before all the bits have arrived from the slave. This problem was fixed in 1.413. If you are using earlier versions of the core, please upgrade. If you are using a version newer than that and still sees the problem, please make sure you are using up-to-date slave.jar.

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              flyasaurus flyasaurus
              Votes:
              9 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: