Hi everyone,
I got ejabberd 18.12.1-2 on a debian system running quite well for about 2 years.
Just now I tried to setup the xmppclient addon for openhab2 with limited success.
The xmppclient fails to authenticate with the following error:
2019-12-21 19:40:36.981 [WARN ] [oftware.smack.AbstractXMPPConnection] - Connection XMPPTCPConnection[not-authenticated] (0) closed with error org.jivesoftware.smack.XMPPException$StreamErrorException: connection-timeout You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions <stream:error><connection-timeout xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xml:lang='en'>Idle connection</text></stream:error> at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1131) ~[?:?] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$900(XMPPTCPConnection.java:1063) ~[?:?] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1080) ~[?:?] at java.lang.Thread.run(Thread.java:748) [?:?] 2019-12-21 19:40:37.114 [INFO ] [nding.xmppclient.internal.XMPPClient] - XMPP connection error org.jivesoftware.smack.sasl.SASLErrorException: SASLError using X-OAUTH2: not-authorized at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthentication.java:292) ~[?:?] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1167) ~[?:?] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$900(XMPPTCPConnection.java:1063) ~[?:?] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1080) ~[?:?] at java.lang.Thread.run(Thread.java:748) [?:?]
The log on ejabbered refers to an invalid token:
2019-12-21 21:19:20.128 [info] <0.370.0>@ejabberd_listener:accept:238 (<0.671.0>) Accepted connection 192.168.0.100:2565 → 192.168.0.231:5222
2019-12-21 21:19:20.248 [warning] <0.671.0>@ejabberd_c2s:handle_auth_failure:452 (tls|<0.671.0>) Failed c2s X-OAUTH2 authentication for test@domain.com from 192.168.1.100: Invalid token
Since I did not use x-auth2 before I followed the instructions here for the setup: https://docs.ejabberd.im/developer/ejabberd-api/oauth/
Any ideas where to look into next ?
Cheers,
Ludwig