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

views lost due to error parsing config.xml after copying jenkins to another system

XMLWordPrintable

      We tried to create a pre production instance of jenkins on another system.
      The system was a cloned vmware vm.
      At this "vanilla state" jenkins could be started (at least 3-4 times) without a glitch and everything was displayed as expected.
      Later we rsync'ed every file to reflect the actual state of the production system using the following bash commands:

      rsync --delete-during --exclude=modules --exclude=builds --exclude=config-history -rlptD -4 -vv rsync://production-jenkins-host$JENKINS_HOME/. $JENKINS_HOME/
      rsync --delete-during --exclude=modules --exclude=builds -rlptD -4 -vv rsync://production-jenkins-host$JENKINS_HOME/jobs/. $JENKINS_HOME/jobs/
      chown -R $JENKINS_USER:$JENKINS_GROUP $JENKINS_HOME
      find $JENKINS_HOME -type d -exec chmod ugo+rx {} \;
      find $JENKINS_HOME -type f -exec chmod ug+r {} \;
      find $JENKINS_HOME -type f -exec chmod u+w {} \;

      At that state many views were no longer displayed and not accessible by any means.

      That happened reproducibly even with all config files transferred from production system and leaving them untouched/unmodified when jenkins gets started.

      Removing "the first failed" view from config.xml (following the assumption lower line number gets parsed first and may cause errors so that following entries cannot be parsed anymore), we could get some views displayed, increasing that number by repeating the step of "removing the first failed view", but some of those views were "empty" afterwards, that is not containing (some of)

      {0,1}

      their assigned jobs anymore until manually adding them again.

      The problem first did not give any usable log messages or exceptions (potentially, not for sure, related to https://issues.jenkins-ci.org/browse/JENKINS-29766).
      Now after experimenting with log plugins and log options as well as disabling (not uninstalling) priority sorter plugin which seemed to cause "hiding"/"disapperance" of those StackTraces due to another error message:
      "
      Aug 14, 2015 11:30:00 AM SCHWERWIEGEND jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy getView Configured View does not exixts '99.Technik' using primary view
      "
      "SCHWERWIEGEND" should translate to SEVERE

      When looking into config.xml, the missing views are still in there, getting clobbered when doing any change to the main configuration and saving them.

      Now we managed to get the following output from "manage old data" and these StackTraces :

              1. Manage Old Data #####

      ConversionException: Invalid reference ---- Debugging information ---- reference : ../../../../../../slaves/org.jenkinsci.plugins.vSphereCloudSlave[2]/nodeProperties/hudson.slaves.EnvironmentVariablesNodeProperty/envVars/tree-map/default/comparator class : java.util.TreeSet required-type : java.util.TreeSet converter-type : com.thoughtworks.xstream.converters.collections.TreeSetConverter path : /hudson/views/hudson.plugins.sectioned_view.SectionedView[5]/sections/hudson.plugins.sectioned_view.ListViewSection/jobNames/comparator line number : 6604 -------------------------------, MissingFieldException: No field 'string' found in class 'hudson.plugins.sectioned_view.ListViewSection', MissingFieldException: No field 'string' found in class 'hudson.plugins.sectioned_view.ListViewSection', MissingFieldException: No field 'string' found in class 'hudson.plugins.sectioned_view.ListViewSection', MissingFieldException: No field 'string' found in class 'hudson.plugins.sectioned_view.ListViewSection', MissingFieldException: No field 'string' found in class 'hudson.plugins.sectioned_view.ListViewSection', CannotResolveClassException: jobFilters, CannotResolveClassException: name, CannotResolveClassException: width, CannotResolveClassException: alignment, CannotResolveClassException: columns, InstantiationError: null, MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'listView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'listView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson', MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson'

              1. StackTraces #####

      Aug 14, 2015 12:26:11 PM hudson.util.RobustReflectionConverter addErrorInContext
      FEIN: Failed to load
      com.thoughtworks.xstream.converters.reflection.MissingFieldException: No field 'hudson.plugins.sectioned_view.SectionedView' found in class 'hudson.model.Hudson'
      at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:94)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:160)
      at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:415)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:285)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:228)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:113)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at hudson.XmlFile.unmarshal(XmlFile.java:163)
      at jenkins.model.Jenkins$16.run(Jenkins.java:2642)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      Aug 14, 2015 12:26:11 PM hudson.util.RobustReflectionConverter addErrorInContext
      FEIN: Failed to load
      com.thoughtworks.xstream.converters.reflection.MissingFieldException: No field 'hudson.plugins.sectioned_view.ListViewSection' found in class 'hudson.plugins.sectioned_view.SectionedView'
      at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:94)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:160)
      at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:415)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:285)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:228)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
      at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:83)
      at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
      at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:74)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:349)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:289)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:228)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:113)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at hudson.XmlFile.unmarshal(XmlFile.java:163)
      at jenkins.model.Jenkins$16.run(Jenkins.java:2642)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      Aug 14, 2015 12:26:11 PM hudson.util.RobustReflectionConverter addErrorInContext
      FEIN: Failed to load
      com.thoughtworks.xstream.converters.reflection.MissingFieldException: No field 'hudson.plugins.nested_view.NestedView' found in class 'hudson.model.Hudson'
      at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:94)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:160)
      at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:415)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:285)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:228)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:113)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at hudson.XmlFile.unmarshal(XmlFile.java:163)
      at jenkins.model.Jenkins$16.run(Jenkins.java:2642)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      Aug 14, 2015 12:26:11 PM hudson.util.RobustReflectionConverter addErrorInContext
      FEIN: Failed to load
      com.thoughtworks.xstream.converters.reflection.MissingFieldException: No field 'listView' found in class 'hudson.model.Hudson'
      at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:94)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:160)
      at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:415)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:285)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:228)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:113)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at hudson.XmlFile.unmarshal(XmlFile.java:163)
      at jenkins.model.Jenkins$16.run(Jenkins.java:2642)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

            Unassigned Unassigned
            tcb_xy Tim-Christian Bloss
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: