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

Unable to start windows service after upgrading to 2.248

    XMLWordPrintable

Details

    Description

      After upgrading to 2.248, the Jenkins windows service can no longer be started.

      This is the error in Windows Event Viewer:

      Faulting application name: jenkins.exe, version: 2.9.0.0, time stamp: 0x5eb872d4
      Faulting module name: KERNELBASE.dll, version: 6.3.9600.19724, time stamp: 0x5ec5262a
      Exception code: 0xe0434f4d
      Fault offset: 0x0000000000007afc
      Faulting process id: 0x%9
      Faulting application start time: 0x%10
      Faulting application path: %11
      Faulting module path: %12
      Report Id: %13
      Faulting package full name: %14
      Faulting package-relative application ID: %15
      

      Attempting to run jenkins.exe directly gives the same error:

      The machine does have .NET framework 4 installed, as pointed out in

      https://www.jenkins.io/blog/2020/07/23/windows-support-updates/#windows-service-management-changes-in-jenkins-2-248

      Attachments

        Issue Links

          Activity

            chinhodado chin ho added a comment -

            I figured out the fix. This is the content of the jenkins.exe.config file:

            <configuration>
              <runtime>
                <!-- see http://support.microsoft.com/kb/936707 -->
                <generatePublisherEvidence enabled="false"/>
              </runtime>
              <startup>
                <!-- this can be hosted either on .NET 2.0 or 4.0 -->
                <supportedRuntime version="v2.0.50727" />
                <supportedRuntime version="v4.0" />
              </startup>
            </configuration>
            

            I removed the <supportedRuntime version="v2.0.50727" /> line and the service can be started again

            chinhodado chin ho added a comment - I figured out the fix. This is the content of the jenkins.exe.config file: <configuration> <runtime> <!-- see http://support.microsoft.com/kb/936707 --> <generatePublisherEvidence enabled="false"/> </runtime> <startup> <!-- this can be hosted either on .NET 2.0 or 4.0 --> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v4.0" /> </startup> </configuration> I removed the <supportedRuntime version="v2.0.50727" /> line and the service can be started again
            oleg_nenashev Oleg Nenashev added a comment -

            Thanks! I will make sure to update the guidelines. This file should not be required anymore, and it looks like the update procedure did not remove it automatically

            oleg_nenashev Oleg Nenashev added a comment - Thanks! I will make sure to update the guidelines. This file should not be required anymore, and it looks like the update procedure did not remove it automatically
            slide_o_mix Alex Earl added a comment -

            Did you use the Windows installer to update?

            slide_o_mix Alex Earl added a comment - Did you use the Windows installer to update?
            chinhodado chin ho added a comment -

            No, I updated directly from jenkins

            chinhodado chin ho added a comment - No, I updated directly from jenkins
            chinhodado chin ho added a comment -

            A follow up to this: suddenly today the jenkins service can't be started again, but with a different error this time:

            Service cannot be started. System.ComponentModel.Win32Exception (0x80004005): Access is denied
               at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
               at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
               at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
               at System.Diagnostics.Process.get_Handle()
               at winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension.OnWrapperStarted()
               at winsw.Extensions.WinSWExtensionManager.FireOnWrapperStarted()
               at winsw.WrapperService.OnStart(String[] args)
               at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
            

            There haven't been any change to the system. Please advice.

            chinhodado chin ho added a comment - A follow up to this: suddenly today the jenkins service can't be started again, but with a different error this time: Service cannot be started. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.OpenProcessHandle(Int32 access) at System.Diagnostics.Process.get_Handle() at winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension.OnWrapperStarted() at winsw.Extensions.WinSWExtensionManager.FireOnWrapperStarted() at winsw.WrapperService.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) There haven't been any change to the system. Please advice.
            oleg_nenashev Oleg Nenashev added a comment -

            Sorry, I was finally unable to work on the fix due to unplanned work and personal events. The issue will go into the 2.249.1 LTS, and we will need documentation for it in the upgrade guidelines and in https://www.jenkins.io/blog/2020/07/23/windows-support-updates/

            oleg_nenashev Oleg Nenashev added a comment - Sorry, I was finally unable to work on the fix due to unplanned work and personal events. The issue will go into the 2.249.1 LTS, and we will need documentation for it in the upgrade guidelines and in  https://www.jenkins.io/blog/2020/07/23/windows-support-updates/
            macdrega Joerg Schwaerzler added a comment - - edited

            What works for us, too:

            • Choosing a different remote root directory will work, too
            • However, simply deleting the current remove root directory will not be sufficient - to re-use the current directory you have to
              • Either apply the fix as described in JENKINS-63198
              • Or:
                1. Choose a different remote root dir
                2. Connect the node
                3. Delete the original remote root dir
                4. Choose again the original remote root dir
                5. Re-Connect the node
            macdrega Joerg Schwaerzler added a comment - - edited What works for us, too: Choosing a different remote root directory will work, too However, simply deleting the current remove root directory will not be sufficient - to re-use the current directory you have to Either apply the fix as described in JENKINS-63198 Or: Choose a different remote root dir Connect the node Delete the original remote root dir Choose again the original remote root dir Re-Connect the node

            oleg_nenashev I am unsure where in the notes on how to fix this appear on the page you mentioned:

            https://www.jenkins.io/blog/2020/07/23/windows-support-updates/

            I see general recommendations for upgrades.  Thus far the fixes for this page do not seem to work for me.  Jenkins starts but only 1/2 and I mostly get error messages when I bring up up Jenkins.  I also see this issue as unresolved is this still being worked onto fix this issue?

            limeman Nicholas Clark added a comment - oleg_nenashev  I am unsure where in the notes on how to fix this appear on the page you mentioned: https://www.jenkins.io/blog/2020/07/23/windows-support-updates/ I see general recommendations for upgrades.  Thus far the fixes for this page do not seem to work for me.  Jenkins starts but only 1/2 and I mostly get error messages when I bring up up Jenkins.  I also see this issue as unresolved is this still being worked onto fix this issue?

            People

              atul7107 Atul Yadav
              chinhodado chin ho
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: