java.io.IOException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Upgrade to RESTHeart 0.10.1 or later.

tip

Switch to Oracle JDK from of OpenJDK

tip

Upgrade to the latest doppio

tip

Upgrade spring-boot to v1.1.11 or later and set server.ssl.enabled=false

tip

TLS v1.2 wasn't implemented until java 7. Try upgrading your Java version or if you're stuck in java 5 or 6 and REALLY need to use TLS v1.2 try using BouncyCastle: https://goo.gl/Tg3jd0

tip

This might also be because you're not initializing java the right way. Try to initialize with -server, and that might turn TLSv1.2 on!

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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
    via by Will Berriss,
  • 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());
    via by Saurabh Jain,
  • 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());
    via by Saurabh Jain,
  • 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());
    via by Saurabh Jain,
  • wso2bam 2.4.0 running ibm jdk 7
    via Stack Overflow by Edwin Quai Hoi
    ,
  • IBM Domino Connection to PayPal REST
    via Stack Overflow by John
    ,
  • Problems with SSL configuration
    via by 795313,
  • SSL issue
    via by 795313,
    • 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

    Users with the same issue

    poroszdporoszd
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    32 more bugmates