[jitsi-dev] IRC exception:


#1

Hello All,

How do I get jitsi to connect to port 7000 on host irc.freenode.net with TLS?

log:
2015-07-24 19:12:17.498 SEVERE: [135]
impl.protocol.irc.IrcStack.connect().205 Unanticipated exception
occurred!
java.lang.RuntimeException: Could not generate DH keypair
    at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1345)
    at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:519)
    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:796)
    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)
    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.tryReadAndUnwrap(SSLSocketChannelConnection.java:184)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.processHandshake(SSLSocketChannelConnection.java:151)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.doAnyPendingHandshake(SSLSocketChannelConnection.java:134)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.write(SSLSocketChannelConnection.java:91)
    at com.ircclouds.irc.api.AbstractCommandServerImpl.execute(AbstractCommandServerImpl.java:19)
    at com.ircclouds.irc.api.IRCApiImpl.executeAsync(IRCApiImpl.java:624)
    at com.ircclouds.irc.api.IRCApiImpl.connect(IRCApiImpl.java:120)
    at net.java.sip.communicator.impl.protocol.irc.IrcConnection.connectSynchronized(IrcConnection.java:265)
    at net.java.sip.communicator.impl.protocol.irc.IrcConnection.<init>(IrcConnection.java:182)
    at net.java.sip.communicator.impl.protocol.irc.IrcStack.connect(IrcStack.java:155)
    at net.java.sip.communicator.impl.protocol.irc.ProtocolProviderServiceIrcImpl.register(ProtocolProviderServiceIrcImpl.java:351)
    at net.java.sip.communicator.util.account.LoginManager$RegisterProvider.run(LoginManager.java:434)
Caused by: java.lang.RuntimeException: Could not generate DH keypair
    at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:136)
    at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:688)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:261)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:853)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:851)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1285)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.security.InvalidAlgorithmParameterException: Prime
size must be multiple of 64, and can only range from 512 to 1024
(inclusive)
    at com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)
    at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:675)
    at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:127)
    ... 8 more
2015-07-24 19:12:17.501 SEVERE: [135]
util.account.LoginManager.handleOperationFailedException().465
Provider could not be registered due to the following general error:
net.java.sip.communicator.service.protocol.OperationFailedException:
Could not generate DH keypair
    at net.java.sip.communicator.impl.protocol.irc.ProtocolProviderServiceIrcImpl.register(ProtocolProviderServiceIrcImpl.java:361)
    at net.java.sip.communicator.util.account.LoginManager$RegisterProvider.run(LoginManager.java:434)
Caused by: java.lang.RuntimeException: Could not generate DH keypair
    at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1345)
    at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:519)
    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:796)
    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)
    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.tryReadAndUnwrap(SSLSocketChannelConnection.java:184)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.processHandshake(SSLSocketChannelConnection.java:151)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.doAnyPendingHandshake(SSLSocketChannelConnection.java:134)
    at com.ircclouds.irc.api.comms.SSLSocketChannelConnection.write(SSLSocketChannelConnection.java:91)
    at com.ircclouds.irc.api.AbstractCommandServerImpl.execute(AbstractCommandServerImpl.java:19)
    at com.ircclouds.irc.api.IRCApiImpl.executeAsync(IRCApiImpl.java:624)
    at com.ircclouds.irc.api.IRCApiImpl.connect(IRCApiImpl.java:120)
    at net.java.sip.communicator.impl.protocol.irc.IrcConnection.connectSynchronized(IrcConnection.java:265)
    at net.java.sip.communicator.impl.protocol.irc.IrcConnection.<init>(IrcConnection.java:182)
    at net.java.sip.communicator.impl.protocol.irc.IrcStack.connect(IrcStack.java:155)
    at net.java.sip.communicator.impl.protocol.irc.ProtocolProviderServiceIrcImpl.register(ProtocolProviderServiceIrcImpl.java:351)
    ... 1 more
Caused by: java.lang.RuntimeException: Could not generate DH keypair
    at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:136)
    at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:688)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:261)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:853)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:851)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1285)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.security.InvalidAlgorithmParameterException: Prime
size must be multiple of 64, and can only range from 512 to 1024
(inclusive)
    at com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)
    at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:675)
    at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:127)
    ... 8 more

java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

uname -a
Linux ralph 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux

jitsi version:
2.9.5463

VM arguments:
-Djna.library.path=/usr/share/jitsi/lib/native
-Dfelix.config.properties=file:/usr/share/jitsi/lib/felix.client.run.properties
-Djava.util.logging.config.file=/usr/share/jitsi/lib/logging.properties
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi
Class path:
/usr/share/jitsi/lib/felix.jar:/usr/share/jitsi/sc-bundles/sc-launcher.jar:/usr/share/jitsi/sc-bundles/util.jar:/usr/share/jitsi/lib
Library path:
/usr/share/jitsi/lib/native:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Boot class path:
/usr/lib/jvm/java-7-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-7-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-7-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-7-oracle/jre/classes

···

--
-------
inum: 883510009027723
sip: jungleboogie@sip2sip.info
xmpp: jungle-boogie@jit.si


#2

How do I get jitsi to connect to port 7000 on host irc.freenode.net with
TLS?

Update your Java to version 8. Versions below cannot deal with prime sizes >
1024.

[...]
Caused by: java.security.InvalidAlgorithmParameterException: Prime
size must be multiple of 64, and can only range from 512 to 1024
(inclusive)
[...]

Ingo


#3

thanks, will do!

···

On 25 July 2015 at 01:57, Ingo Bauersachs <ingo@jitsi.org> wrote:

Update your Java to version 8. Versions below cannot deal with prime sizes >
1024.

--
-------
inum: 883510009027723
sip: jungleboogie@sip2sip.info
xmpp: jungle-boogie@jit.si


#4

This worked perfectly! Thank you. Hopefully other apps I use will work with 1.8

···

On 25 July 2015 at 01:57, Ingo Bauersachs <ingo@jitsi.org> wrote:

Update your Java to version 8. Versions below cannot deal with prime sizes >
1024.

--
-------
inum: 883510009027723
sip: jungleboogie@sip2sip.info
xmpp: jungle-boogie@jit.si