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

Unable to start windows service after upgrading to 2.248

    Details

    • Similar Issues:

      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

            Hide
            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

            Show
            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
            Hide
            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

            Show
            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
            Hide
            slide_o_mix Alex Earl added a comment -

            Did you use the Windows installer to update?

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

            No, I updated directly from jenkins

            Show
            chinhodado chin ho added a comment - No, I updated directly from jenkins
            Hide
            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.

            Show
            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.
            Hide
            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/

            Show
            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/

              People

              • Assignee:
                Unassigned
                Reporter:
                chinhodado chin ho
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: