[JIRA] (JENKINS-57899) Jira site configuration lost after a reboot

39 views
Skip to first unread message

dcendents@gmail.com (JIRA)

unread,
Jun 6, 2019, 4:33:01 PM6/6/19
to jenkinsc...@googlegroups.com
Daniel Beland created an issue
 
Jenkins / Bug JENKINS-57899
Jira site configuration lost after a reboot
Issue Type: Bug Bug
Assignee: Unassigned
Components: jira-plugin
Created: 2019-06-06 20:32
Priority: Critical Critical
Reporter: Daniel Beland

I configured my Jira site using the latest plugin version 3.0.7

All worked fine (recognised the issue in my scm comment and added a link to Jira)

However after a reboot I noticed the configuration was lost, also I couldn't find any configuration file in my jenkins home directory.

 

I downgraded the plugin to version 3.0.6 and now I can see the file hudson.plugins.jira.JiraProjectProperty.xml is created when I add a Jira site. 

 

If I update the plugin back to the latest version 3.0.7 and modify the configuration, the content of the file is lost.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dcendents@gmail.com (JIRA)

unread,
Jun 6, 2019, 4:34:01 PM6/6/19
to jenkinsc...@googlegroups.com
Daniel Beland updated an issue
Change By: Daniel Beland
Environment: jira-plugin 3.0.7

zsolt.denes@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:41:02 AM6/12/19
to jenkinsc...@googlegroups.com
Dénes Zsolt commented on Bug JENKINS-57899
 
Re: Jira site configuration lost after a reboot

I experienced the same with the previous version, also.:/

zsolt.denes@gmail.com (JIRA)

unread,
Jun 12, 2019, 5:41:02 AM6/12/19
to jenkinsc...@googlegroups.com
Dénes Zsolt edited a comment on Bug JENKINS-57899

jholzer@chroniccareiq.com (JIRA)

unread,
Jun 13, 2019, 3:04:01 PM6/13/19
to jenkinsc...@googlegroups.com

I've experienced this same issue, and it appears that the 3.0.7 version of the plugin simply does not save configuration changes properly.

Similarly to Daniel Beland, I installed 3.0.6, set up my Jira site, and then upgraded back to 3.0.7. After upgrading, the settings were transferred over successfully to the hudson.plugins.jira.JiraGlobalConfiguration.xml 

 

 

file by hand

 

 

jholzer@chroniccareiq.com (JIRA)

unread,
Jun 13, 2019, 3:09:02 PM6/13/19
to jenkinsc...@googlegroups.com
Justin Holzer edited a comment on Bug JENKINS-57899
I've experienced this same issue, and it appears that the 3.0.7 version of the plugin simply does not save configuration changes properly.

Similarly to [~dcendents], I installed 3.0.6, set up my Jira site, and then upgraded back to 3.0.7. After upgrading, the settings were transferred over successfully to the {{hudson.plugins.jira.JiraGlobalConfiguration.xml   }}

 



 

file . After upgrading to 3.0.7, I did notice that any further changes to Jira plugin's configuration, through the Jenkins UI, were not saved to the XML file. However, manually editing the XML file by hand , followed by restarting Jenkins, did appear to be a workaround.

I think this issue may have to do with support that was added for the Jenkins Configuration as Code plugin (jcasc). I believe the following pull request may attempt to address this issue, though I have no idea what the status of it is, or if the maintainers have any plans to merge it in: https://github.com/jenkinsci/jira-plugin/pull/120
 

 

jholzer@chroniccareiq.com (JIRA)

unread,
Jun 13, 2019, 3:36:03 PM6/13/19
to jenkinsc...@googlegroups.com
Justin Holzer edited a comment on Bug JENKINS-57899
I've experienced this same issue, and but I think it appears 's better summarized by saying that the 3.0.7 version of the plugin simply does not save seem to allow settings to be updated using the Jenkins configuration changes properly UI (http://your-jenkins-server/configure) .

Similarly to [~dcendents], From what I installed 3.0.6 've seen , set up my Jira site the plugin's XML settings file is never deleted , and then upgraded back it's just that it is not updated when the UI is used to 3 make config changes . 0.7. After upgrading,

I've found
the settings were transferred over successfully to following workarounds:
# Manually edit
the   plugin's XML file ( {{hudson.plugins.jira.JiraGlobalConfiguration.xml}} file. )
#*
After upgrading to 3.0.7 manually editing , I did notice that any further changes you either have to Jira plugin's restart Jenkins or use the reload configuration , through option on the "Manage Jenkins UI, were not saved to " page
# Use
the XML file. However, manually editing Configuration as Code plugin and maintain plugin settings in the XML file by hand, followed by restarting Jenkins, did appear to be a workaround jenkins .

I think this issue may
yaml file (or wherever you have to do with support that was added for settings stored)
#* You can use
the "Manage Jenkins " -> " Configuration as Code plugin " page to initially export settings ( jcasc) for building jenkins . I believe the following pull request may attempt yaml) and also to address this issue, though I have no idea what the status of it is, or if the maintainers have any plans to merge it in reload settings without restarting Jenkins
#* Here's a sample YAML configuration {code}
unclassified
:
  jiraGlobalConfiguration:
    sites:
    - credentialsId: "46d9cc2a-8681-4b03-9a1e-6181bfb4e1cd"
      url: "
https:// github dischargeiq . com atlassian.net / jenkinsci/jira-plugin/pull/120 "
 

 
{code}

jholzer@chroniccareiq.com (JIRA)

unread,
Jun 13, 2019, 3:37:02 PM6/13/19
to jenkinsc...@googlegroups.com
Justin Holzer edited a comment on Bug JENKINS-57899
I've experienced this same issue, but I think it's better summarized by saying that the 3.0.7 version of the plugin does not seem to allow settings to be updated using the Jenkins configuration UI ( [ http://your-jenkins-server/configure ] ).

From what I've seen, the plugin's XML settings file is never deleted, it's just that it is not updated when the UI is used to make config changes.

I've found the following workarounds:
# Manually edit the plugin's XML file ({{hudson.plugins.jira.JiraGlobalConfiguration.xml}})
# * * After manually editing, you either have to restart Jenkins or use the reload configuration option on the "Manage Jenkins" page
# Use the Configuration as Code plugin and maintain plugin settings in the jenkins.yaml file (or wherever you have settings stored)
# * * You can use the "Manage Jenkins" -> "Configuration as Code" page to initially export settings (for building jenkins.yaml) and also to reload settings without restarting Jenkins
# * * Here's a sample YAML configuration
{code :java }
unclassified:
  jiraGlobalConfiguration:
    sites:
    - credentialsId: "
46d9cc2a some - 8681 credential - 4b03-9a1e-6181bfb4e1cd id "
      url: "https://
dischargeiq my-jira-site .atlassian.net/"
{code}

dcendents@gmail.com (JIRA)

unread,
Jun 15, 2019, 12:36:02 PM6/15/19
to jenkinsc...@googlegroups.com

As a general recommendation to everyone, unless you really need 3.0.7, then I would recommend to stick with 3.0.6 until it is fixed. It does work and is easier to configure than updating the config file manually on disk. Also I believe with 3.0.7, any change in the jenkins configuration page results in the settings being lost (after a reboot, they are still in memory).

 

kiegerhardt@gmail.com (JIRA)

unread,
Jul 3, 2019, 2:37:03 PM7/3/19
to jenkinsc...@googlegroups.com
kyle ian commented on Bug JENKINS-57899

 

Working off Justin Holzer's workaround, the below worked for me in script console – I also tried this as a file in $JENKINS_HOME/ref/init.groovy.d to get loaded on boot, and it appeared to blow away the site record entirely, so I don't recommend trying that. Opted for new JiraSite to overwrite existing due to lack of setUrl method.

import hudson.plugins.jira.*
jiraSites = JiraGlobalConfiguration.get().getSites()
jiraSites[0] = new JiraSite("https://my-jira-site.atlassian.net/")
jiraSites[0].setCredentialsId("some-credential-id")

 

ch.fetzer@gmx.net (JIRA)

unread,
Jul 23, 2019, 4:07:03 AM7/23/19
to jenkinsc...@googlegroups.com
Christoph Fetzer updated an issue
 
Change By: Christoph Fetzer
Environment: jira-plugin 3.0.7
jira-plugin 3.0.8

ch.fetzer@gmx.net (JIRA)

unread,
Jul 23, 2019, 8:50:03 AM7/23/19
to jenkinsc...@googlegroups.com
Christoph Fetzer commented on Bug JENKINS-57899
 
Re: Jira site configuration lost after a reboot

I had the same issue with jira-plugin 3.0.8

Question: what do you mean by "reboot"? - restart of jenkins or reboot of the machine?

zsolt.denes@gmail.com (JIRA)

unread,
Jul 23, 2019, 11:45:03 AM7/23/19
to jenkinsc...@googlegroups.com

happens every time, after jenkins restart. For example if a plugin installed/updated and you have to restart tzhe jenkins.

zsolt.denes@gmail.com (JIRA)

unread,
Jul 23, 2019, 11:46:03 AM7/23/19
to jenkinsc...@googlegroups.com
Dénes Zsolt edited a comment on Bug JENKINS-57899
happens every time, after jenkins restart. For example if a plugin installed/updated and you have to restart tzhe the jenkins.

ch.fetzer@gmx.net (JIRA)

unread,
Jul 24, 2019, 7:39:06 AM7/24/19
to jenkinsc...@googlegroups.com

I cannot confirm this. For me the setting survived a number of restarts and got lost at a unknown time. I wanted to ask for machine reboot because the machine is maintained by someone else and I am not aware of every reboot.

jholzer@chroniccareiq.com (JIRA)

unread,
Jul 24, 2019, 8:09:06 AM7/24/19
to jenkinsc...@googlegroups.com

Christoph Fetzer and Dénes Zsolt please see my earlier comment. I'm not really sure the problem described by this ticket has anything to do with restarting Jenkins or rebooting the server Jenkins is running on. It really has to do with the fact that the Jira plugin's configuration file (hudson.plugins.jira.JiraGlobalConfiguration.xml) is not updated when you make configuration changes using the Jenkins configuration page/UI. Because the Jira config file is not properly updated, a side-effect is that when Jenkins is restarted and reloads the configuration, it appears to lose that values that were input earlier. It's not really losing those values, because they were never properly saved in the first place. I've confirmed this behavior in version 3.0.7, running the latest stable version of Jenkins in Windows. It sounds like nothing changed in 3.0.8 in regards to this issue.

 

As a workaround, I suggest manually updating the XML configuration file or using the "Configuration as Code" plugin with a YAML config file. Otherwise, I guess you'd have to roll back to an earlier version.

jholzer@chroniccareiq.com (JIRA)

unread,
Jul 24, 2019, 8:10:07 AM7/24/19
to jenkinsc...@googlegroups.com
Justin Holzer edited a comment on Bug JENKINS-57899
[~chrisfetz] and [~ronhks] please see my earlier comment. I'm not really sure the problem described by this ticket has anything to do with restarting Jenkins or rebooting the server Jenkins is running on. It really has to do with the fact that the Jira plugin's configuration file ({{hudson.plugins.jira.JiraGlobalConfiguration.xml}}) is not updated when you make configuration changes using the Jenkins configuration page/UI. Because the Jira config file is not properly updated, a side-effect is that when Jenkins is restarted and reloads the configuration, it appears to lose that the values that were input earlier. It's not really losing those values, because they were never properly saved in the first place. I've confirmed this behavior in version 3.0.7, running the latest stable version of Jenkins in Windows. It sounds like nothing changed in 3.0.8 in regards to this issue.


 

As a workaround, I suggest manually updating the XML configuration file or using the "Configuration as Code" plugin with a YAML config file. Otherwise, I guess you'd have to roll back to an earlier version.

jholzer@chroniccareiq.com (JIRA)

unread,
Jul 24, 2019, 8:13:02 AM7/24/19
to jenkinsc...@googlegroups.com
Justin Holzer edited a comment on Bug JENKINS-57899
[~chrisfetz] and [~ronhks] please see my earlier comment. I'm not really sure the problem described by this ticket has anything to do with restarting Jenkins or rebooting the server Jenkins is running on. It really has to do with the fact that the Jira plugin's configuration file ({{hudson.plugins.jira.JiraGlobalConfiguration.xml}}) is not updated when you make configuration changes using the Jenkins configuration page/UI. Because the Jira config file is not properly updated, a side-effect is that when Jenkins is restarted and reloads the configuration, it appears to lose the values that were input earlier. It's not really losing those values, because they were never properly saved in the first place. I've confirmed this behavior in version 3.0.7, running the latest stable version of Jenkins in Windows. It sounds like nothing changed in 3.0.8 in regards to this issue.

 

As a workaround,
I suggest manually updating any of the following should do:
# Manually edit the Jira plugin's
XML configuration config file or using
# Use
the "Configuration as Code" plugin with and create a YAML config file . Otherwise that sets properties for the Jira plugin
# As another commentor described
, I guess you' use the init.groovy. d have script to roll back to an earlier version. configure the Jira plugin

ch.fetzer@gmx.net (JIRA)

unread,
Jul 24, 2019, 8:24:03 AM7/24/19
to jenkinsc...@googlegroups.com

jholzer@chroniccareiq.com (JIRA)

unread,
Jul 24, 2019, 8:28:04 AM7/24/19
to jenkinsc...@googlegroups.com

Christoph Fetzer interesting... Did you restart Jenkins after updating the file (this is necessary so that the settings can be properly loaded)? If you did restart, and the settings still didn't take effect, then what happened? Was the settings file automatically modified and reset with old, or default, values?

zsolt.denes@gmail.com (JIRA)

unread,
Jul 24, 2019, 10:46:02 AM7/24/19
to jenkinsc...@googlegroups.com

I tested.

So, before editing (after jenkins restart - OS restart not necessary) looks like this:

<?xml version='1.1' encoding='UTF-8'?>
<hudson.plugins.jira.JiraGlobalConfiguration plugin="ji...@3.0.7">
  <sites class="hudson.util.PersistedList"/>
</hudson.plugins.jira.JiraGlobalConfiguration>

 after edit, it looks the same. Nothing changed in file, but the configuration is available after save and reload the page.

 

Of course, the file owner is the jenkins user, who runs the jenkins also:

root@dnd-dev:/opt/dndsys/server/jenkins/jenkins_home# ls -al hudson.plugins.jira.Jira*
-rw-r--r-- 1 jenkins jenkins 196 May  3 10:43 hudson.plugins.jira.JiraGlobalConfiguration.xml
-rw-r--r-- 1 jenkins jenkins 117 May  3 10:43 hudson.plugins.jira.JiraProjectProperty.xml

and the Jenkins process data:

root@dnd-dev:/opt/dndsys/server/jenkins/jenkins_home# ps fax | grep jenki
11281 ?        Sl   2147:26 /opt/dndsys/lang/java8/bin/java -Djava.awt.headless=true -XX:MaxPermSize=128m -Xmx1024m -DJENKINS_HOME=/opt/dndsys/server/jenkins/jenkins_home -jar /opt/dndsys/server/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --httpPort=PORT_NUMBER --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --prefix=/jenkins

And the jenkins's home, also owned by jenkins

root@dnd-dev:/opt/dndsys/server/jenkins# ls -al | grep jenkins_home
drwxr-xr-x 34 jenkins jenkins    12288 Jul 24 16:37 jenkins_home

There is nothing relevant (jira, Global, etc.) at jenkins.log

 

 

jholzer@chroniccareiq.com (JIRA)

unread,
Jul 24, 2019, 11:07:01 AM7/24/19
to jenkinsc...@googlegroups.com

Dénes Zsolt I believe that when you make changes to the configuration through the Jenkins web UI, it's storing/caching the configuration in memory, and is persisted until you restart Jenkins, or some other event happens that would cause Jenkins to reload the configuration from disk. This is likely why you see your updated configuration after saving and then reloading the configuration page (without restarting Jenkins)

zsolt.denes@gmail.com (JIRA)

unread,
Jul 24, 2019, 11:32:10 AM7/24/19
to jenkinsc...@googlegroups.com

Yes, it seems legit. But, I think the plugin should be save te configuration to the disk, shuldn't be?

zsolt.denes@gmail.com (JIRA)

unread,
Jul 24, 2019, 11:32:11 AM7/24/19
to jenkinsc...@googlegroups.com
Dénes Zsolt edited a comment on Bug JENKINS-57899
Yes, it seems legit. But, I think the plugin should be save te configuration to the disk, shuldn shouldn 't be?

dcendents@gmail.com (JIRA)

unread,
Jul 24, 2019, 2:21:02 PM7/24/19
to jenkinsc...@googlegroups.com

 

Yes I'm not sure the reboot/restart is important (I run jenkins in docker, so for me a reboot meant restarting the docker container).

I think a better description is simply that modifications done in the UI are not persisted on disk but are only kept in memory. After jenkins is restarted, obviously the settings are lost.

 

 

 

 

zsolt.denes@gmail.com (JIRA)

unread,
Jul 24, 2019, 2:25:01 PM7/24/19
to jenkinsc...@googlegroups.com

At the container, you also mounted a configuration holder disk space, so it also could be persisted also, doesn't it?

dcendents@gmail.com (JIRA)

unread,
Jul 24, 2019, 2:28:03 PM7/24/19
to jenkinsc...@googlegroups.com
Daniel Beland updated an issue
 
Change By: Daniel Beland
I configured my Jira site using the latest plugin version 3.0.7

All worked fine (recognised the issue in my scm comment and added a link
Modifications to Jira)

However after a reboot I noticed
the Jira configuration was lost, also I couldn't find any configuration file done in my the UI are not persisted on disk but are only kept in memory. After jenkins home directory is restarted, the settings are lost .

 

I downgraded the
This started with jira- plugin to version 3.0. 6 7 and now I can see the file hudson.plugins.jira.JiraProjectProperty.xml it is created when I add still a Jira site problem in 3 .   0.8.

 

If I update the plugin back to the latest version 3.0.7 and modify the configuration, the content of the file is lost.  

 
Reply all
Reply to author
Forward
0 new messages