java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory

Jenkins JIRA | Will Berriss | 3 months ago
  1. 0

    I have tried and tried to get Jenkins to run on port 443 in HTTPS mode, but it always complains as follows: SEVERE: Container startup failed java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory at winstone.Launcher.spawnListener(Launcher.java:207) at winstone.Launcher.<init>(Launcher.java:149) at winstone.Launcher.main(Launcher.java:352) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) at java.lang.reflect.Method.invoke(Method.java:620) at Main._main(Main.java:246) at Main.main(Main.java:91) Caused by: winstone.WinstoneException: Error getting the SSL context object at winstone.HttpsConnectorFactory.getSSLContext(HttpsConnectorFactory.java:241) at winstone.HttpsConnectorFactory.createConnector(HttpsConnectorFactory.java:131) at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:116) at winstone.Launcher.spawnListener(Launcher.java:205) ... 8 more Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at sun.security.jca.GetInstance.getInstance(GetInstance.java:172) at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:9) at winstone.HttpsConnectorFactory.getSSLContext(HttpsConnectorFactory.java:206) ... 11 more My keys are created using the following: keytool -genkey -alias jenkins-ssl-cert -keyalg RSA -keystore /var/lib/jenkins/ssl/.keystore -validity 3650 (but I also tried using openssl and the converting to JKS format, but that method didn't help it either.) Finally, I see on the internet that once upon a time we could specify IbmX509, but now it seems we can't: ## the SSL KeyManagerFactory type (eg SunX509, IbmX509). Default is SunX509 #JENKINS_HTTPS_KEY_MANAGER="SunX509" JENKINS_HTTPS_KEY_MANAGER="IbmX509" If that mechanism still worked, that might have fixed things for me? Finally, I tried the following, but that didn't help either: JENKINS_ARGS="-Dproxy.cert.factory=IbmX509" So, I'm pretty sure this is a bug, as Jenkins should work with HTTPS when using IBM Java (I hope) Thanks

    Jenkins JIRA | 3 months ago | Will Berriss
    java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
  2. 0

    When connecting from a zookeeper client running in IBM WebSphere Application Server version 8.5.5, with SSL configured in ZooKeeper, the below mentioned exception is observed. org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline. at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:208) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at org.apache.zookeeper.ClientCnxnSocketNetty.connect(ClientCnxnSocketNetty.java:112) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1130) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1158) Caused by: org.apache.zookeeper.common.X509Exception$SSLContextException: Failed to create KeyManager at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:75) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initSSL(ClientCnxnSocketNetty.java:358) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.getPipeline(ClientCnxnSocketNetty.java:348) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:206) ... 4 more Caused by: org.apache.zookeeper.common.X509Exception$KeyManagerException: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:129) at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:73) ... 7 more Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at sun.security.jca.GetInstance.getInstance(GetInstance.java:172) at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:9) at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:118) Reason : IBM websphere uses its own jre and supports only IbmX509 keymanager algorithm which is causing an exception when trying to get an key manager instance using SunX509 which is not supported. Currently KeyManager algorithm name (SunX509) is hardcoded in the class X509Util.java. Possible fix: Instead of having algorithm name hardcoded to SunX509 we can fall back to the default algorithm supported by the underlying jre. Instead of having this - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); can we have ? KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());

    Apache's JIRA Issue Tracker | 7 months ago | Saurabh Jain
    org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline.
  3. 0

    When connecting from a zookeeper client running in IBM WebSphere Application Server version 8.5.5, with SSL configured in ZooKeeper, the below mentioned exception is observed. org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline. at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:208) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at org.apache.zookeeper.ClientCnxnSocketNetty.connect(ClientCnxnSocketNetty.java:112) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1130) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1158) Caused by: org.apache.zookeeper.common.X509Exception$SSLContextException: Failed to create KeyManager at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:75) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initSSL(ClientCnxnSocketNetty.java:358) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.getPipeline(ClientCnxnSocketNetty.java:348) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:206) ... 4 more Caused by: org.apache.zookeeper.common.X509Exception$KeyManagerException: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:129) at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:73) ... 7 more Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at sun.security.jca.GetInstance.getInstance(GetInstance.java:172) at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:9) at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:118) Reason : IBM websphere uses its own jre and supports only IbmX509 keymanager algorithm which is causing an exception when trying to get an key manager instance using SunX509 which is not supported. Currently KeyManager algorithm name (SunX509) is hardcoded in the class X509Util.java. Possible fix: Instead of having algorithm name hardcoded to SunX509 we can fall back to the default algorithm supported by the underlying jre. Instead of having this - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); can we have ? KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());

    Apache's JIRA Issue Tracker | 7 months ago | Saurabh Jain
    org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When connecting from a zookeeper client running in IBM WebSphere Application Server version 8.5.5, with SSL configured in ZooKeeper, the below mentioned exception is observed. org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline. at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:208) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at org.apache.zookeeper.ClientCnxnSocketNetty.connect(ClientCnxnSocketNetty.java:112) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1130) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1158) Caused by: org.apache.zookeeper.common.X509Exception$SSLContextException: Failed to create KeyManager at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:75) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.initSSL(ClientCnxnSocketNetty.java:358) at org.apache.zookeeper.ClientCnxnSocketNetty$ZKClientPipelineFactory.getPipeline(ClientCnxnSocketNetty.java:348) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:206) ... 4 more Caused by: org.apache.zookeeper.common.X509Exception$KeyManagerException: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:129) at org.apache.zookeeper.common.X509Util.createSSLContext(X509Util.java:73) ... 7 more Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available at sun.security.jca.GetInstance.getInstance(GetInstance.java:172) at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:9) at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:118) Reason : IBM websphere uses its own jre and supports only IbmX509 keymanager algorithm which is causing an exception when trying to get an key manager instance using SunX509 which is not supported. Currently KeyManager algorithm name (SunX509) is hardcoded in the class X509Util.java. Possible fix: Instead of having algorithm name hardcoded to SunX509 we can fall back to the default algorithm supported by the underlying jre. Instead of having this - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); can we have ? KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());

    Apache's JIRA Issue Tracker | 7 months ago | Saurabh Jain
    org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline.
  6. 0

    wso2bam 2.4.0 running ibm jdk 7

    Stack Overflow | 3 years ago | Edwin Quai Hoi
    java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available

  1. poroszd 1 times, last 8 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.security.NoSuchAlgorithmException

    SunX509 KeyManagerFactory not available

    at sun.security.jca.GetInstance.getInstance()
  2. Java RT
    KeyManagerFactory.getInstance
    1. sun.security.jca.GetInstance.getInstance(GetInstance.java:172)
    2. javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:9)
    2 frames
  3. winstone
    Launcher.main
    1. winstone.HttpsConnectorFactory.getSSLContext(HttpsConnectorFactory.java:206)
    2. winstone.HttpsConnectorFactory.createConnector(HttpsConnectorFactory.java:131)
    3. winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:116)
    4. winstone.Launcher.spawnListener(Launcher.java:205)
    5. winstone.Launcher.<init>(Launcher.java:149)
    6. winstone.Launcher.main(Launcher.java:352)
    6 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    4. java.lang.reflect.Method.invoke(Method.java:620)
    4 frames
  5. Unknown
    Main.main
    1. Main._main(Main.java:246)
    2. Main.main(Main.java:91)
    2 frames