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

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

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            custodia Jani Mäkelä created issue -
            custodia Jani Mäkelä made changes -
            Field Original Value New Value
            Description 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}}
            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
            custodia Jani Mäkelä made changes -
            Environment Windows Server 2012
            Jenkins 1.642.4
            Windows Server 2012
            Jenkins 1.642.4
            Java jre 1.8.0_66
            Hide
            custodia 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.

            Show
            custodia 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.
            aheritier Arnaud Héritier made changes -
            Link This issue duplicates JENKINS-25333 [ JENKINS-25333 ]
            aheritier Arnaud Héritier made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 170582 ] JNJira + In-Review [ 198897 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: