• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Debian 7 Wheezy x86-64, Oracle Java 8, Jenkins 1.586

      Using Java8, Jenkins doesn't start with the following message:

      SCHWERWIEGEND: Container startup failed
      java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
         at winstone.Launcher.spawnListener(Launcher.java:209)
         at winstone.Launcher.<init>(Launcher.java:149)
         at winstone.Launcher.main(Launcher.java:354)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:483)
         at Main._main(Main.java:293)
         at Main.main(Main.java:98)
      Caused by: java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen
         at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:101)
         at winstone.Launcher.spawnListener(Launcher.java:207)
         ... 8 more
      Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
         at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
         ... 10 more
      

      After switching back to Oracle Java 7, it works without problems.

          [JENKINS-25333] Jenkins 1.586 not starting up using Java8

          Max Wahler created issue -

          Daniel Beck added a comment - - edited

          Other workarounds would be to offload SSL to a reverse proxy and access Jenkins through that (so jetty-winstone only serves HTTP), or use another container.

          Daniel Beck added a comment - - edited Other workarounds would be to offload SSL to a reverse proxy and access Jenkins through that (so jetty-winstone only serves HTTP), or use another container.
          Daniel Beck made changes -
          Labels Original: exception jenkins New: exception winstone
          Jesse Glick made changes -
          Labels Original: exception winstone New: exception java8 winstone
          Jesse Glick made changes -
          Labels Original: exception java8 winstone New: exception java8 regression winstone
          Jesse Glick made changes -
          Labels Original: exception java8 regression winstone New: exception java8 winstone

          Jesse Glick added a comment -

          Or sorry, perhaps this is not a regression after all—did this work in older versions of Jenkins? It looks like this code to manage certificates never worked in Java 8. Does it work if you specify httpsKeyStore?

          See comments in: https://github.com/jenkinsci/winstone/commit/bb47b5bdd35b1393c19f1ff1d660c4388c208fdc

          Jesse Glick added a comment - Or sorry, perhaps this is not a regression after all—did this work in older versions of Jenkins? It looks like this code to manage certificates never worked in Java 8. Does it work if you specify httpsKeyStore ? See comments in: https://github.com/jenkinsci/winstone/commit/bb47b5bdd35b1393c19f1ff1d660c4388c208fdc
          Jesse Glick made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: security [ 15508 ]
          Labels Original: exception java8 winstone New: java8 winstone

          I'm pretty sure we can generate self-signed certificate by using the JCA API directly without relying on sun.* packages. Let me see...

          Kohsuke Kawaguchi added a comment - I'm pretty sure we can generate self-signed certificate by using the JCA API directly without relying on sun.* packages. Let me see...
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-27624 [ JENKINS-27624 ]

            jglick Jesse Glick
            maxzilla Max Wahler
            Votes:
            11 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: