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

UnsatisfiedLinkError when installing as Windows service

    XMLWordPrintable

Details

    Description

      Steps I took:

      1. Downloaded jenkins.war 1.440
      2. Created folder E:\java\jenkins
      3. Executed java -DJENKINS_HOME=E:\java\jenkins -jar jenkins.war
      4. Browsed to http://localhost:8080/, Jenkins was up and running
      5. Manage Jenkins -> Install as Windows Service
      6. Kept the installation directory as E:\java\jenkins and pressed Install

      This gave me the following error:

      java.lang.UnsatisfiedLinkError: com.sun.jna.Native.malloc(J)J
      at com.sun.jna.Native.malloc(Native Method)
      at com.sun.jna.Memory.malloc(Memory.java:690)
      at com.sun.jna.Memory.<init>(Memory.java:79)
      at com.sun.jna.ptr.ByReference.<init>(ByReference.java:33)
      at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:22)
      at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:18)
      at hudson.util.jna.RegistryKey.open(RegistryKey.java:210)
      at hudson.util.jna.RegistryKey.openReadonly(RegistryKey.java:206)
      at hudson.util.jna.DotNet.isInstalled(DotNet.java:50)
      at hudson.lifecycle.WindowsInstallerLink.doDoInstall(WindowsInstallerLink.java:104)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:104)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Unknown Source)

      PS. A note about bug reporting itself - the Component/s field is required, but the valid values don't make much sense, at least to someone not familiar with the internals of Jenkins. I used "core" for this report as it was the most generic one I could find, but it was by far the most confusing part about the bug reporting process.

      Attachments

        Issue Links

          Activity

            mjomble Andres Kalle created issue -
            brian3791 Brian Brooks added a comment -

            I'm encountering this problem on Windows Server 2008 as well. Any tips on how to resolve/workaround it? I noticed the same error occurred when I started Jenkins from a console windows like

            java -jar jenkins.war

            brian3791 Brian Brooks added a comment - I'm encountering this problem on Windows Server 2008 as well. Any tips on how to resolve/workaround it? I noticed the same error occurred when I started Jenkins from a console windows like java -jar jenkins.war
            darndt David Arndt added a comment -

            I've encountered the same bug. Running on Windows 7 (SP1)

            This should re-prioritized, also. It is not "minor" - it's a feature show stopper/blocker

            darndt David Arndt added a comment - I've encountered the same bug. Running on Windows 7 (SP1) This should re-prioritized, also. It is not "minor" - it's a feature show stopper/blocker
            brian3791 Brian Brooks added a comment -

            @David, it has been a while since I dealt with the issue. I think the workaround was to run the Jenkins installer like it was a new install. I agree with you that the "Manage Jenkins -> Install as Windows Service" feature should be yanked unless its going to be maintained.

            brian3791 Brian Brooks added a comment - @David, it has been a while since I dealt with the issue. I think the workaround was to run the Jenkins installer like it was a new install. I agree with you that the "Manage Jenkins -> Install as Windows Service" feature should be yanked unless its going to be maintained.
            darndt David Arndt added a comment -

            I actually get this same error when I install/run from the command line. Jenkins continues to start up, but the error stack is displayed a few times on startup...

            darndt David Arndt added a comment - I actually get this same error when I install/run from the command line. Jenkins continues to start up, but the error stack is displayed a few times on startup...
            rodrigc Craig Rodrigues added a comment - - edited

            Jenkins has been updated to use JNA 4.1: JENKINS-24521
            Please try again, since this fixes many native library issues.
            The fix will be in Jenkins 1.586 and higher.

            rodrigc Craig Rodrigues added a comment - - edited Jenkins has been updated to use JNA 4.1: JENKINS-24521 Please try again, since this fixes many native library issues. The fix will be in Jenkins 1.586 and higher.
            rodrigc Craig Rodrigues made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            I verified that the jenkins.war with JNA 4.1 starts
            on Windows 2012.

            rodrigc Craig Rodrigues added a comment - I verified that the jenkins.war with JNA 4.1 starts on Windows 2012.
            rodrigc Craig Rodrigues made changes -
            Link This issue is related to JENKINS-24521 [ JENKINS-24521 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142115 ] JNJira + In-Review [ 189979 ]

            People

              Unassigned Unassigned
              mjomble Andres Kalle
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: