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

Starting Jenkins windows service with https results in java.io.IOException

      Trying to start the Jenkins windows service with the --httpsPort=8080 parameter results in:

      SEVERE: Container startup failed
      java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
      at winstone.Launcher.spawnListener(Launcher.java:211)
      at winstone.Launcher.<init>(Launcher.java:151)
      at winstone.Launcher.main(Launcher.java:356)
      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 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:100)
      at winstone.Launcher.spawnListener(Launcher.java:209)
      ... 8 more
      Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 10 more

          [JENKINS-34463] Starting Jenkins windows service with https results in java.io.IOException

          Jani Mäkelä created issue -
          Jani Mäkelä made changes -
          Description Original: Trying to start the Jenkins windows service with the --httpsPort=8080 parameter results in:

          {{SEVERE: Container startup failed
          java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
          at winstone.Launcher.spawnListener(Launcher.java:211)
          at winstone.Launcher.<init>(Launcher.java:151)
          at winstone.Launcher.main(Launcher.java:356)
          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 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:100)
          at winstone.Launcher.spawnListener(Launcher.java:209)
          ... 8 more
          Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          ... 10 more}}
          New: Trying to start the Jenkins windows service with the --httpsPort=8080 parameter results in:

          SEVERE: Container startup failed
          java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
          at winstone.Launcher.spawnListener(Launcher.java:211)
          at winstone.Launcher.<init>(Launcher.java:151)
          at winstone.Launcher.main(Launcher.java:356)
          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 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:100)
          at winstone.Launcher.spawnListener(Launcher.java:209)
          ... 8 more
          Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          ... 10 more
          Jani Mäkelä made changes -
          Environment Original: Windows Server 2012
          Jenkins 1.642.4
          New: Windows Server 2012
          Jenkins 1.642.4
          Java jre 1.8.0_66

          Jani Mäkelä added a comment -

          Java jre 1.8 (which jenkins comes with) does not support the interfaces used to generate https keys. Downgrading to Java jre 1.7 solves this issue.

          Jani Mäkelä added a comment - Java jre 1.8 (which jenkins comes with) does not support the interfaces used to generate https keys. Downgrading to Java jre 1.7 solves this issue.
          Arnaud Héritier made changes -
          Link New: This issue duplicates JENKINS-25333 [ JENKINS-25333 ]
          Arnaud Héritier made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170582 ] New: JNJira + In-Review [ 198897 ]

            Unassigned Unassigned
            custodia Jani Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: