[JIRA] (JENKINS-16475) Build stats graph configuration lost after Jenkins Restart

11 views
Skip to first unread message

wilson@ds.net (JIRA)

unread,
Sep 20, 2016, 11:27:03 AM9/20/16
to jenkinsc...@googlegroups.com
Brian Wilson commented on Bug JENKINS-16475
 
Re: Build stats graph configuration lost after Jenkins Restart

I can confirm this is an issue with our RHEL5 Linux server with Jenkins ver. 2.23, and plugin 1.4 revison.

{{112 Sep 19, 2016 3:37:00 PM hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver reloadPlugin
113 SEVERE: Unable to read /data/jenkins/global-build-stats.xml
114 java.io.IOException: Unable to read /data/jenkins/global-build-stats.xml
115 at hudson.XmlFile.unmarshal(XmlFile.java:165)
116 at hudson.Plugin.load(Plugin.java:264)
117 at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin.load(GlobalBuildStatsPlugin.java:97)
118 at hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver.reloadPlugin(GlobalBuildStatsPluginSaver.java:99)
119 at hudson.plugins.global_build_stats.business.GlobalBuildStatsBusiness.reloadPlugin(GlobalBuildStatsBusiness.java:395)
120 at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin$GlobalBuildStatsItemListener.onLoaded(GlobalBuildStatsPlugin.java:152)
121 at jenkins.model.Jenkins.<init>(Jenkins.java:960)
122 at hudson.model.Hudson.<init>(Hudson.java:85)
123 at hudson.model.Hudson.<init>(Hudson.java:81)
124 at hudson.WebAppMain$3.run(WebAppMain.java:227)
125 Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
126 ---- Debugging information ----
127 cause-exception : java.lang.NullPointerException
128 cause-message : null
129 class : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
130 required-type : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
131 converter-type : hudson.plugins.global_build_stats.xstream.GlobalBuildStatsXStreamConverter
132 path : /hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
133 line number : 2
134 version : not available
135 -------------------------------
136 at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
137 at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
138 at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
139 at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
140 at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
141 at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
142 at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
143 at hudson.util.XStream2.unmarshal(XStream2.java:114)
144 at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
145 at hudson.XmlFile.unmarshal(XmlFile.java:163)
146 ... 9 more
147 Caused by: java.lang.NullPointerException
148 at java.util.ArrayList.addAll(ArrayList.java:577)
149 at hudson.plugins.global_build_stats.model.JobBuildResultSharder.load(JobBuildResultSharder.java:140)
150 at hudson.plugins.global_build_stats.xstream.migration.AbstractMigrator.readGlobalBuildStatsPOJO(AbstractMigrator.java:35)
151 at hudson.plugins.global_build_stats.xstream.GlobalBuildStatsXStreamConverter.unmarshal(GlobalBuildStatsXStreamConverter.java:159)
152 at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
153 ... 18 more}}

Solution:
I confirmed the .../jenkins/global-build-stats/jobresults/ directory contained two jobResults... files, one of which, jobResults-2016-04.xml, contained only "<null/>". The other file appears to contain the build results as you would expect. I removed the jobResults-2016-04.xml file and did a safeRestart on the machine. The graph survived the restart process so I'd say this was the cause of our issue. Hope this helps others.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

michelene.chon@am.sony.com (JIRA)

unread,
Nov 29, 2016, 1:59:02 PM11/29/16
to jenkinsc...@googlegroups.com
M Chon commented on Bug JENKINS-16475

Here is the message I get:

Nov 29, 2016 10:56:02 AM hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver reloadPlugin
SEVERE: Unable to read /var/lib/jenkins/global-build-stats.xml
java.io.IOException: Unable to read /var/lib/jenkins/global-build-stats.xml
at hudson.XmlFile.unmarshal(XmlFile.java:165)
at hudson.Plugin.load(Plugin.java:264)
at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin.load(GlobalBuildStatsPlugin.java:97)
at hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver.reloadPlugin(GlobalBuildStatsPluginSaver.java:99)
at hudson.plugins.global_build_stats.business.GlobalBuildStatsBusiness.reloadPlugin(GlobalBuildStatsBusiness.java:395)
at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin$GlobalBuildStatsItemListener.onLoaded(GlobalBuildStatsPlugin.java:152)
at jenkins.model.Jenkins.<init>(Jenkins.java:994)


at hudson.model.Hudson.<init>(Hudson.java:85)

at hudson.model.Hudson.<init>(Hudson.java:81)

at hudson.WebAppMain$3.run(WebAppMain.java:231)


Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null

---- Debugging information ----
cause-exception : java.lang.NullPointerException
cause-message : null
class : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
required-type : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
converter-type : hudson.plugins.global_build_stats.xstream.GlobalBuildStatsXStreamConverter
path : /hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
line number : 2
version : not available
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)

norman.bestfleisch@netresearch.de (JIRA)

unread,
Nov 30, 2016, 10:04:06 AM11/30/16
to jenkinsc...@googlegroups.com
Norman B commented on Bug JENKINS-16475

Same here with Jenkins 2.34 & Hudson global-build-stats plugin 1.4

Nov 30, 2016 3:50:17 PM hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver reloadPlugin
SEVERE: Unable to read /var/lib/jenkins/global-build-stats.xml
java.io.IOException: Unable to read /var/lib/jenkins/global-build-stats.xml
	at hudson.XmlFile.unmarshal(XmlFile.java:161)
	at hudson.Plugin.load(Plugin.java:264)
	at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin.load(GlobalBuildStatsPlugin.java:97)
	at hudson.plugins.global_build_stats.business.GlobalBuildStatsPluginSaver.reloadPlugin(GlobalBuildStatsPluginSaver.java:99)
	at hudson.plugins.global_build_stats.business.GlobalBuildStatsBusiness.reloadPlugin(GlobalBuildStatsBusiness.java:395)
	at hudson.plugins.global_build_stats.GlobalBuildStatsPlugin$GlobalBuildStatsItemListener.onLoaded(GlobalBuildStatsPlugin.java:152)
	at jenkins.model.Jenkins.<init>(Jenkins.java:995)
	at hudson.model.Hudson.<init>(Hudson.java:85)
	at hudson.model.Hudson.<init>(Hudson.java:81)
	at hudson.WebAppMain$3.run(WebAppMain.java:231)
Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
---- Debugging information ----
cause-exception     : java.lang.NullPointerException
cause-message       : null
class               : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
required-type       : hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
converter-type      : hudson.plugins.global_build_stats.xstream.GlobalBuildStatsXStreamConverter
path                : /hudson.plugins.global_build_stats.GlobalBuildStatsPlugin
line number         : 2
version             : not available
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
	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:114)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
	at hudson.XmlFile.unmarshal(XmlFile.java:159)
	... 9 more
Caused by: java.lang.NullPointerException
	at java.util.ArrayList.addAll(ArrayList.java:577)
	at hudson.plugins.global_build_stats.model.JobBuildResultSharder.load(JobBuildResultSharder.java:140)
	at hudson.plugins.global_build_stats.xstream.migration.AbstractMigrator.readGlobalBuildStatsPOJO(AbstractMigrator.java:35)
	at hudson.plugins.global_build_stats.xstream.GlobalBuildStatsXStreamConverter.unmarshal(GlobalBuildStatsXStreamConverter.java:159)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	... 18 more

norman.bestfleisch@netresearch.de (JIRA)

unread,
Nov 30, 2016, 10:44:04 AM11/30/16
to jenkinsc...@googlegroups.com
Norman B edited a comment on Bug JENKINS-16475
(!) Same here with Jenkins 2.34 & Hudson global-build-stats plugin 1.4
{noformat}
{noformat}

(i) Removing a job results file containing "<null/>" at {{../jenkins/global-build-stats/jobresults/jobResults-2014-07.xml}} fixed this issue for me too.

piotr.ossowski@misys.com (JIRA)

unread,
Jan 9, 2017, 8:42:02 AM1/9/17
to jenkinsc...@googlegroups.com

I've encountered similar issue. I'm gathering data from 9 Jenkins instances (will be more soon).
Charts are dissapearing on one of them after safeRestart. Please see some details below.
root@*******:/home/jenkins/jenkins# ls -al global-build-stats.xml
rw-rr- 1 jenkins bm 22064 Jan 7 19:20 global-build-stats.xml
root@*******:/home/jenkins/jenkins# ls al global-build-stats.xml #<-- after (

{jenkins_url}

/safeRestart)
rw-rr- 1 jenkins bm 220 Jan 7 19:27 global-build-stats.xml

I've found temporary workaround by restarting jenkins server (and tomcat):
service jenkins stop/start
Right now global-build-stats.xml file is not cleared but I'm wondering what was the root cause.

I've also noted that file is frequently accessed (each few minutes):
rw-rr- 1 jenkins bm 22064 Jan 9 14:06 global-build-stats.xml
(...)
rw-rr- 1 jenkins bm 22064 Jan 9 14:24 global-build-stats.xml

Would it be possible (at least) to add button to upload/reload global-build-stats.xml file to easy restore charts (I keep xml files in a separate repository) when such an issue come back again?

Jenkins ver: 2.7.4
Global build stats plugin: 1.4

fcamblor@gmail.com (JIRA)

unread,
Jan 26, 2017, 12:45:05 PM1/26/17
to jenkinsc...@googlegroups.com
Change By: Frédéric Camblor
Assignee: Frédéric Camblor David Hinske

piotr.ossowski@misys.com (JIRA)

unread,
Jan 26, 2017, 1:25:03 PM1/26/17
to jenkinsc...@googlegroups.com
 
Re: Build stats graph configuration lost after Jenkins Restart

I have the problem on 2 (out of 9) jenkinses and I was able to fix the issue on one of them with described: "removing a job results file containing "<null/>" at"
C:\jenkins\global-build-stats\jobresults\jobResults-2011-06.xml (the was also jobResults-2011-07.xml with "null" to remove)
Jenkins ver. 1.509.2 (installed as a service on Windows Server 2008 R2 Standard, with SP1)
Global build stats plugin: 1.3

piotr.ossowski@misys.com (JIRA)

unread,
Apr 16, 2018, 10:53:03 AM4/16/18
to jenkinsc...@googlegroups.com

This PR is open:
https://github.com/jenkinsci/global-build-stats-plugin/pull/13

Could you please validate it?

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages