This looks a bit like this issue, but my connection is solid & the actual XMPP Server (nope it’s not example.com ) is definitely reachable – I am connected with a regular XMPP client and the exact same credentials right now.
2016-02-18 22:03:12.861 [ERROR] [tion.xmpp.internal.XMPPConnect] - Could not establish connection to XMPP server 'example.com:5222': null
2016-02-18 22:03:12.870 [WARN ] [nhab.action.xmpp.internal.XMPP] - Could not send XMPP message as connection is not correctly initialized!
2016-02-18 22:03:13.020 [ERROR] [tion.xmpp.internal.XMPPConnect] - Could not establish connection to XMPP server 'example.com:5222': null
2016-02-18 22:03:13.021 [WARN ] [nhab.action.xmpp.internal.XMPP] - Could not send XMPP message as connection is not correctly initialized!
The error message isn’t that helpful and it could be quite literally anything – so did anyone encounter the same problem yet?
Any hints or tips on how I would debug it are appreciated.
Followup, as I found no time to debug this, last week: The naming of the settings is a bit confusing: xmpp:servername is the bit that would come from a SRV record and xmpp:proxy is the server part of the jabber id (not an file transfer proxy or anything).
17:44:48.399 [WARN ] [nhab.action.xmpp.internal.XMPP:181 ] - Could not send XMPP message as connection is not correctly initialized!
17:44:48.420 [WARN ] [esoftware.smack.XMPPConnection:1193 ] - Connection closed with error at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnection.java:658) ~[smack-tcp-4.0.6.jar:4.0.6]
17:44:48.551 [ERROR] [tion.xmpp.internal.XMPPConnect:162 ] - Could not establish connection to XMPP server 'example.com:5222': java.lang.RuntimeException: Could not generate DH keypair
So I’ve come a bit further, but this looks like Java fails with a handshake error – I’m running my own server with 4096 bit DH params, openhab is running with Java 1.8.0 – from what I can read that shouldn’t be a problem…
As always: Any hints appreciated!
Update: It actually was a bug in the JVM. I generated new, 2048 bit DH parameters and now OpenHab will connect and everything is fine.
Hello, i am stuck with the same problem, but do not fully understand the solution.
Can you be a bit more precise which steps you took to get it working?
I don’t have an own xmpp server, by the way
@msg the actual »fix« was to downgrade the diffie hellman parameters to 2048 bit because apparently you cannot use anything larger than 2048 when running Java 1.8.0 – but it might be possible meanwhile: https://bugzilla.redhat.com/show_bug.cgi?id=1163501
I occassionaly see the same error message. If it shows up in the log, the corresponding XMPP message is lost. Typically, the next message comes through.
I dug into the sources a bit. Apparently, this issue is caused within XMPPConn.java in the first place, most likely in line 157 (or maybe 158). The underlying library throws an exeption without an error message when trying to connect to the XMPP server.