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

Upgrade automatically causes completely reset when setting --webroot

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • * Any Jenkins version since years, 2.222.1 too
      * CentOS Linux release 7.7.1908
      * JVM 1.8.0_131-b11 (probably not relevant, it happened also using JVM 7)

      When I upgrade Jenkins through the "Or Upgrade Automatically" button the result is a completely new installation where any job and any Jenkins configuration is completely reset. It's just like installing it from scratch.

      Jenkins is launched using the following command

      /home/jenkins/java/bin/java -Dcom.sun.akuma.Daemon=daemonized -Xmn128M -Xms1024M -Xmx6144M -DJENKINS_HOME=/home/jenkins/jenkins-home -Dhudson.model.DirectoryBrowserSupport.CSP=sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-inline'; img-src * data:; style-src * 'unsafe-inline'; font-src * -jar /home/jenkins/war/jenkins.war --webroot=/home/jenkins/jenkins-home --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --logfile=/home/jenkins/log/jenkins.log
      

      and the log after the upgrade is

      Running from: /home/jenkins/war/jenkins.war
      [id=1]     WARNING winstone.Logger#logInternal: Parameter handlerCountMax is now deprecated
      [id=1]     WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated
      [id=1]     INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @689ms to org.eclipse.jetty.util.log.JavaUtilLog
      [id=1]     INFO    winstone.Logger#logInternal: Beginning extraction from war file
      [id=1]     WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
      [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11
      [id=1]     INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
      [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
      [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
      [id=1]     INFO    o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
      [id=1]     INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/jenkins/jenkins-home found at: SystemProperties.getProperty("JENKINS_HOME")
      [id=1]     INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@29876704{Jenkins v2.204.1,/,file:///home/jenkins/jenkins-home/,AVAILABLE}{/home/jenkins/jenkins-home}
      [id=1]     INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1972e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
      [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: Started @20528ms
      [id=21]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled
      [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
      [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
      [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
      [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
      [id=32]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
      [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
      [id=46]    INFO    hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
      [id=46]    INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
      [id=33]    INFO    o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@15be3621: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy
      [id=33]    INFO    o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@15be3621]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e
      [id=33]    INFO    o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e: defining beans [authenticationManager]; root of factory hierarchy
      [id=33]    INFO    o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@337e255a: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy
      [id=33]    INFO    o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@337e255a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409
      [id=33]    INFO    o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409: defining beans [filter,legacy]; root of factory hierarchy
      [id=33]    INFO    jenkins.install.SetupWizard#init: 
      
      *************************************************************
      *************************************************************
      *************************************************************
      
      Jenkins initial setup is required. An admin user has been created and a password generated.
      Please use the following password to proceed to installation:
      
      [OMISSIS]
      
      This may also be found at: /home/jenkins/jenkins-home/secrets/initialAdminPassword
      
      *************************************************************
      *************************************************************
      *************************************************************
      

       

      What could be the reason?

          [JENKINS-62073] Upgrade automatically causes completely reset when setting --webroot

          Giacomo Boccardo created issue -
          Giacomo Boccardo made changes -
          Description Original: When I upgrade Jenkins through the "Or Upgrade Automatically" button the result is a completely new installation where any job and any Jenkins configuration is completely reset. It's just like installing it from scratch.

          Jenkins is launched using the following command
          {noformat}
          /home/jenkins/java/bin/java -Dcom.sun.akuma.Daemon=daemonized -Xmn128M -Xms1024M -Xmx6144M -DJENKINS_HOME=/home/jenkins/jenkins-home -Dhudson.model.DirectoryBrowserSupport.CSP=sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-inline'; img-src * data:; style-src * 'unsafe-inline'; font-src * -jar /home/jenkins/war/jenkins.war --webroot=/home/jenkins/jenkins-home --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --logfile=/home/jenkins/log/jenkins.log
          {noformat}
          and the log after the upgrade is
          {noformat}
          Running from: /home/jenkins/war/jenkins.war [id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMax is now deprecated [id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @689ms to org.eclipse.jetty.util.log.JavaUtilLog [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/jenkins/jenkins-home found at: SystemProperties.getProperty("JENKINS_HOME") [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@29876704{Jenkins v2.204.1,/,file:///home/jenkins/jenkins-home/,AVAILABLE}{/home/jenkins/jenkins-home} [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1972e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @20528ms [id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins [id=32] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs [id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata [id=46] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server [id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@15be3621: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy [id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@15be3621]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e [id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e: defining beans [authenticationManager]; root of factory hierarchy [id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@337e255a: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy [id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@337e255a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409 [id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409: defining beans [filter,legacy]; root of factory hierarchy [id=33] INFO jenkins.install.SetupWizard#init: ************************************************************* ************************************************************* *************************************************************Jenkins initial setup is required. An admin user has been created and a password generated. Please use the following password to proceed to installation:[OMISSIS]This may also be found at: /home/jenkins/jenkins-home/secrets/initialAdminPassword************************************************************* ************************************************************* *************************************************************
          {noformat}
          What could be the reason?
          New: When I upgrade Jenkins through the "Or Upgrade Automatically" button the result is a completely new installation where any job and any Jenkins configuration is completely reset. It's just like installing it from scratch.

          Jenkins is launched using the following command

          {{/home/jenkins/java/bin/java -Dcom.sun.akuma.Daemon=daemonized -Xmn128M -Xms1024M -Xmx6144M -DJENKINS_HOME=/home/jenkins/jenkins-home -Dhudson.model.DirectoryBrowserSupport.CSP=sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-inline'; img-src * data:; style-src * 'unsafe-inline'; font-src * -jar /home/jenkins/war/jenkins.war --webroot=/home/jenkins/jenkins-home --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --logfile=/home/jenkins/log/jenkins.log}}

          and the log after the upgrade is

          {{}}{{Running from: /home/jenkins/war/jenkins.war}}
          {{[id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMax is now deprecated}}
          {{[id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated}}
          {{[id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @689ms to org.eclipse.jetty.util.log.JavaUtilLog}}
          {{[id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file}}
          {{[id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath}}
          {{[id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11}}
          {{[id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet}}
          {{[id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0}}
          {{[id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults}}
          {{[id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms}}
          {{[id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/jenkins/jenkins-home found at: SystemProperties.getProperty("JENKINS_HOME")}}
          {{[id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@29876704\{Jenkins v2.204.1,/,file:///home/jenkins/jenkins-home/,AVAILABLE}{/home/jenkins/jenkins-home}}}
          {{[id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1972e513\{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}}}
          {{[id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @20528ms}}
          {{[id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled}}
          {{[id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization}}
          {{[id=28] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins}}
          {{[id=32] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs}}
          {{[id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata}}
          {{[id=46] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@15be3621: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@15be3621]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e}}
          {{[id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e: defining beans [authenticationManager]; root of factory hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@337e255a: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@337e255a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409}}
          {{[id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409: defining beans [filter,legacy]; root of factory hierarchy}}
          {{[id=33] INFO jenkins.install.SetupWizard#init:}}{{*************************************************************}}
          {{*************************************************************}}
          {{*************************************************************}}{{Jenkins initial setup is required. An admin user has been created and a password generated.}}
          {{Please use the following password to proceed to installation:}}{{[OMISSIS]}}{{This may also be found at: /home/jenkins/jenkins-home/secrets/initialAdminPassword}}{{*************************************************************}}
          {{*************************************************************}}
          {{*************************************************************}}

           

          What could be the reason?
          Giacomo Boccardo made changes -
          Description Original: When I upgrade Jenkins through the "Or Upgrade Automatically" button the result is a completely new installation where any job and any Jenkins configuration is completely reset. It's just like installing it from scratch.

          Jenkins is launched using the following command

          {{/home/jenkins/java/bin/java -Dcom.sun.akuma.Daemon=daemonized -Xmn128M -Xms1024M -Xmx6144M -DJENKINS_HOME=/home/jenkins/jenkins-home -Dhudson.model.DirectoryBrowserSupport.CSP=sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-inline'; img-src * data:; style-src * 'unsafe-inline'; font-src * -jar /home/jenkins/war/jenkins.war --webroot=/home/jenkins/jenkins-home --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --logfile=/home/jenkins/log/jenkins.log}}

          and the log after the upgrade is

          {{}}{{Running from: /home/jenkins/war/jenkins.war}}
          {{[id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMax is now deprecated}}
          {{[id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated}}
          {{[id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @689ms to org.eclipse.jetty.util.log.JavaUtilLog}}
          {{[id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file}}
          {{[id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath}}
          {{[id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11}}
          {{[id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet}}
          {{[id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0}}
          {{[id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults}}
          {{[id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms}}
          {{[id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/jenkins/jenkins-home found at: SystemProperties.getProperty("JENKINS_HOME")}}
          {{[id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@29876704\{Jenkins v2.204.1,/,file:///home/jenkins/jenkins-home/,AVAILABLE}{/home/jenkins/jenkins-home}}}
          {{[id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1972e513\{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}}}
          {{[id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @20528ms}}
          {{[id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled}}
          {{[id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization}}
          {{[id=28] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins}}
          {{[id=32] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions}}
          {{[id=31] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs}}
          {{[id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata}}
          {{[id=46] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@15be3621: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@15be3621]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e}}
          {{[id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e: defining beans [authenticationManager]; root of factory hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@337e255a: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy}}
          {{[id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@337e255a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409}}
          {{[id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409: defining beans [filter,legacy]; root of factory hierarchy}}
          {{[id=33] INFO jenkins.install.SetupWizard#init:}}{{*************************************************************}}
          {{*************************************************************}}
          {{*************************************************************}}{{Jenkins initial setup is required. An admin user has been created and a password generated.}}
          {{Please use the following password to proceed to installation:}}{{[OMISSIS]}}{{This may also be found at: /home/jenkins/jenkins-home/secrets/initialAdminPassword}}{{*************************************************************}}
          {{*************************************************************}}
          {{*************************************************************}}

           

          What could be the reason?
          New: When I upgrade Jenkins through the "Or Upgrade Automatically" button the result is a completely new installation where any job and any Jenkins configuration is completely reset. It's just like installing it from scratch.

          Jenkins is launched using the following command

          {code:bash}
          /home/jenkins/java/bin/java -Dcom.sun.akuma.Daemon=daemonized -Xmn128M -Xms1024M -Xmx6144M -DJENKINS_HOME=/home/jenkins/jenkins-home -Dhudson.model.DirectoryBrowserSupport.CSP=sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-inline'; img-src * data:; style-src * 'unsafe-inline'; font-src * -jar /home/jenkins/war/jenkins.war --webroot=/home/jenkins/jenkins-home --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --logfile=/home/jenkins/log/jenkins.log
          {code}

          and the log after the upgrade is

          {code:java}
          Running from: /home/jenkins/war/jenkins.war
          [id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMax is now deprecated
          [id=1] WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated
          [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @689ms to org.eclipse.jetty.util.log.JavaUtilLog
          [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
          [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
          [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11
          [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
          [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
          [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
          [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
          [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /home/jenkins/jenkins-home found at: SystemProperties.getProperty("JENKINS_HOME")
          [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@29876704{Jenkins v2.204.1,/,file:///home/jenkins/jenkins-home/,AVAILABLE}{/home/jenkins/jenkins-home}
          [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1972e513{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
          [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @20528ms
          [id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled
          [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
          [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
          [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
          [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
          [id=32] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
          [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
          [id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
          [id=46] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server
          [id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@15be3621: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy
          [id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@15be3621]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e
          [id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6fb56c4e: defining beans [authenticationManager]; root of factory hierarchy
          [id=33] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@337e255a: display name [Root WebApplicationContext]; startup date [Mon Jan 20 00:36:10 CET 2020]; root of context hierarchy
          [id=33] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@337e255a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409
          [id=33] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8712409: defining beans [filter,legacy]; root of factory hierarchy
          [id=33] INFO jenkins.install.SetupWizard#init:

          *************************************************************
          *************************************************************
          *************************************************************

          Jenkins initial setup is required. An admin user has been created and a password generated.
          Please use the following password to proceed to installation:

          [OMISSIS]

          This may also be found at: /home/jenkins/jenkins-home/secrets/initialAdminPassword

          *************************************************************
          *************************************************************
          *************************************************************
          {code}
           

          What could be the reason?

          Daniel Beck added a comment -

          Would look at the contents of the Jenkins home directory before and after upgrade.

          As this is the first report of this nature despite it supposedly happening for years, it's more likely a configuration issue than a bug.

          Daniel Beck added a comment - Would look at the contents of the Jenkins home directory before and after upgrade. As this is the first report of this nature despite it supposedly happening for years, it's more likely a configuration issue than a bug.
          Daniel Beck made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

          It seems the issue was related to the use of --webroot. I just removed it and now I can update it without losing everything.

          Giacomo Boccardo added a comment - It seems the issue was related to the use of  --webroot . I just removed it and now I can update it without losing everything.

          Daniel Beck added a comment -

          jhack Thanks for letting us know! I don't think we were aware of this; perhaps worth documenting. I will reopen to indicate the possible problem.

          Daniel Beck added a comment - jhack Thanks for letting us know! I don't think we were aware of this; perhaps worth documenting. I will reopen to indicate the possible problem.
          Daniel Beck made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Daniel Beck made changes -
          Priority Original: Critical [ 2 ] New: Minor [ 4 ]
          Daniel Beck made changes -
          Summary Original: Upgrade automatically causes completely reset New: Upgrade automatically causes completely reset when setting --webroot

            Unassigned Unassigned
            jhack Giacomo Boccardo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: