powered by Jive Software

SSL Socket setup ERROR

Dear all,

I have beein trying to set up a secure sockot on port 443 by following the instructions provided. However the application has thrown the following exceptions:

2005.02.08 15:35:07 org.jivesoftware.messenger.net.SSLJiveServerSocketFactory.getInstance(SSLJiveSer verSocketFactory.java:52)

java.security.UnrecoverableKeyException: Cannot recover key

at sun.security.provider.KeyProtector.recover(Unknown Source)

at sun.security.provider.JavaKeyStore.engineGetKey(Unknown Source)

at java.security.KeyStore.getKey(Unknown Source)

at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.(Unknown Source)

at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit(Unknown Source)

at javax.net.ssl.KeyManagerFactory.init(Unknown Source)

at com.sun.net.ssl.KeyManagerFactorySpiWrapper.engineInit(Unknown Source)

at com.sun.net.ssl.KeyManagerFactory.init(Unknown Source)

at org.jivesoftware.messenger.net.SSLJiveServerSocketFactory.getInstance(SSLJiveSe rverSocketFactory.java:41)

at org.jivesoftware.messenger.net.SSLConfig.(SSLConfig.java:71)

at org.jivesoftware.messenger.net.SSLSocketAcceptThread.(SSLSocketAcceptThre ad.java:93)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.createSocket(ConnectionMan agerImpl.java:73)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.start(ConnectionManagerImp l.java:153)

at org.jivesoftware.messenger.XMPPServer.startModules(XMPPServer.java:308)

at org.jivesoftware.messenger.XMPPServer.start(XMPPServer.java:198)

at org.jivesoftware.messenger.XMPPServer.(XMPPServer.java:116)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.messenger.starter.ServerStarter.start(ServerStarter.java:83)

at org.jivesoftware.messenger.starter.ServerStarter.main(ServerStarter.java:46)

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 com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.install4j.runtime.Launcher.main(Unknown Source)

2005.02.08 15:35:07 [org.jivesoftware.messenger.net.SSLConfig.(SSLConfig.java:75)] SSLConfig startup problem.

storeType:

keyStoreLocation: /opt/jive_messenger/resources/security/keystore

keypass: // obscured

trustStoreLocation: /opt/jive_messenger/resources/security/truststore

trustpass: // client certificates not needed

java.io.IOException: Cannot recover key

at org.jivesoftware.messenger.net.SSLJiveServerSocketFactory.getInstance(SSLJiveSe rverSocketFactory.java:53)

at org.jivesoftware.messenger.net.SSLConfig.(SSLConfig.java:71)

at org.jivesoftware.messenger.net.SSLSocketAcceptThread.(SSLSocketAcceptThre ad.java:93)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.createSocket(ConnectionMan agerImpl.java:73)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.start(ConnectionManagerImp l.java:153)

at org.jivesoftware.messenger.XMPPServer.startModules(XMPPServer.java:308)

at org.jivesoftware.messenger.XMPPServer.start(XMPPServer.java:198)

at org.jivesoftware.messenger.XMPPServer.(XMPPServer.java:116)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.messenger.starter.ServerStarter.start(ServerStarter.java:83)

at org.jivesoftware.messenger.starter.ServerStarter.main(ServerStarter.java:46)

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 com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.install4j.runtime.Launcher.main(Unknown Source)

2005.02.08 15:35:07 org.jivesoftware.messenger.spi.ConnectionManagerImpl.createSocket(ConnectionMana gerImpl.java:88) Could not setup SSL socket

java.io.IOException

at org.jivesoftware.messenger.net.SSLConfig.createServerSocket(SSLConfig.java:147)

at org.jivesoftware.messenger.net.SSLSocketAcceptThread.(SSLSocketAcceptThre ad.java:93)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.createSocket(ConnectionMan agerImpl.java:73)

at org.jivesoftware.messenger.spi.ConnectionManagerImpl.start(ConnectionManagerImp l.java:153)

at org.jivesoftware.messenger.XMPPServer.startModules(XMPPServer.java:308)

at org.jivesoftware.messenger.XMPPServer.start(XMPPServer.java:198)

at org.jivesoftware.messenger.XMPPServer.(XMPPServer.java:116)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.messenger.starter.ServerStarter.start(ServerStarter.java:83)

at org.jivesoftware.messenger.starter.ServerStarter.main(ServerStarter.java:46)

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 com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.install4j.runtime.Launcher.main(Unknown Source)

the keystore used is the one provided.

Your help would be very much appreciated.

Many Thanks

Luca Iacono

Luca,

As a temporary workaround, I’‘d recommend reverting to the keystore that ships with the distribution. It contains a self-signed certificate that works with almost all clients. I’‘ve also filed JM-171 so we’'ll be sure to test out the SSL instructions to see if there are any errors for an upcoming release.

Thanks,

Matt