powered by Jive Software

Upgrade from Openfire 4.0.3 to 4.1.1 breaks bot written with Perl Net::XMPP

Hello,

I upgraded from Openfire 4.0.3 to 4.1.1 and a IM bot written in Perl that utilizes Net::XMPP will not log in.

The script fails where the AuthIQAuth() function is called.

From what I’ve read, this may have something to do with SASL and/or SSL.

I briefly enabled debugging and captured the following messages:

2017.01.13 08:12:39 org.apache.mina.filter.ssl.SslHandler - Unexpected exception from SSLEngine.closeInbound().
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
at sun.security.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1561)
at org.apache.mina.filter.ssl.SslHandler.destroy(SslHandler.java:204)
at org.apache.mina.filter.ssl.SslFilter.sessionClosed(SslFilter.java:439)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:382)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:750)
at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:109)
at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703)
at java.lang.Thread.run(Thread.java:745)

I’ve tried disabling SSL/TLS [0] as (@Guus der Kinderen suggested) via Client Connections’ advanced settings, but that didn’t seem to help.

Thoughts?

Suggestions and troubleshooting tips are welcome.

Thanks,

Mike

Seems there may be others from this thread at Perl Monks.

But the original poster didn’t reference his Openfire version numbers.

It was posted on December 29th, 2016 though! So that’s a recent issue.

Same issue here, didn’t notice my cron script that sends weather reports to some tabs was failing, and wrote a new script to do some real time notifications of another system, only to find that sendxmpp doesn’t work anymore due to error 401

Guessing it has to do with Net::XMMP and the order things are presented?

Have tried disabling SASL by commenting out return $self->AuthSASL(%args); in Protocol.pm, I do get connected, just Error 401 - unauthorized.

sendxmpp: config: ‘component’ => ‘(server.com)’

sendxmpp: config: ‘port’ => ‘0’

sendxmpp: config: ‘jserver’ => ‘(server.com)’

sendxmpp: config: ‘password’ => ‘(passwordremoved)’

sendxmpp: config: ‘username’ => ‘(usernameremoved)’

XML::Stream: new: hostname = (spark)

XML::Stream: SetCallBacks: tag(node) func(CODE(0x1724780))

XMPP::Conn: xmppCallbackInit: start

XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x17244c8))

XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x1724558))

XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x1724618))

XMPP::Conn: SetPresenceCallBacks: type(unsubscribe) func(CODE(0x1724360))

XMPP::Conn: SetPresenceCallBacks: type(subscribe) func(CODE(0x1724570))

XMPP::Conn: SetPresenceCallBacks: type(unsubscribed) func(CODE(0x1724240))

XMPP::Conn: SetPresenceCallBacks: type(subscribed) func(CODE(0x17242d0))

XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-tls”]) func(CODE(0x17242e8))

XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”]) func(CODE(0x1724198))

XMPP::Conn: xmppCallbackInit: stop

sendxmpp: ssl_verify: 1

sendxmpp: tls_ca_path:

XMPP::Conn: Connect: host(server.com:5222) namespace(jabber:client)

XMPP::Conn: Connect: timeout(10)

XML::Stream: Connect: type(tcpip)

XML::Stream: Connect: Got a connection

Use of uninitialized value within @_ in lc at /usr/local/share/perl/5.18.2/XML/Stream/Parser.pm line 71.

XML::Stream: Send: (<?xml version='1.0'?><stream:stream version=‘1.0’ xmlns:stream=‘http://etherx.jabber.org/streams’ xmlns=‘jabber:client’ to=‘server.com’ from=‘spark’ xml:lang=‘en’ >)

XML::Stream: Read: buff(<?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“server.com” id=“9mjepkqwer” xml:lang=“en” version=“1.0”>)

XML::Stream: _handle_root: sid(newconnection) sax(XML::Stream::Parser=HASH(0x171af38)) tag(stream:stream) att( xml:lang en from server.com xmlns:stream http://etherx.jabber.org/streams xmlns jabber:client version 1.0 id 9mjepkqwer )

XML::Stream: Read: buff(stream:featuresPLAINANONYMOUSEXTERNALJIVE-SHAREDSECRE Tzlib</stream:features>)

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(stream:features) att( )

XML::Stream: Node: _handle_element: check( -1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(starttls) att( xmlns urn:ietf:params:xml:ns:xmpp-tls )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(starttls)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanisms) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(PLAIN)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(PLAIN)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(ANONYMOUS)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(ANONYMOUS)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(EXTERNAL)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(EXTERNAL)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(JIVE-SHAREDSECRET)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(JIVE-SHAREDSECRET)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanism)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(mechanisms)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(compression) att( xmlns http://jabber.org/features/compress )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(method) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(zlib)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(zlib)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(method)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(compression)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(auth) att( xmlns http://jabber.org/features/iq-auth )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(auth)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(register) att( xmlns http://jabber.org/features/iq-register )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(register)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(stream:features)

XML::Stream: Node: _handle_close: check( 0 )

XML::Stream: Node: _handle_close: check2( -1 )

XML::Stream: Process: block(0)

XMPP::Conn: Connect: connection made

XML::Stream: SetCallBacks: tag(node) func(CODE(0x171b5c8))

sendxmpp: Connect: 1

XMPP::Conn: AuthIQAuth: old school auth

XMPP::Conn: SendAndReceiveWithID: object(Net::XMPP::IQ=HASH(0x1715aa8))

XMPP::Conn: SendWithID: id(netjabber-0)

XMPP::Conn: SendWithID: in((username))

XMPP::Conn: RegisterID: tag(iq) id(netjabber-0)

XMPP::Conn: SendWithID: out((username))

XMPP::Conn: SendXML: sent((username))

XML::Stream: Send: ((username))

XMPP::Conn: SendAndReceiveWithID: sent with id(netjabber-0)

XMPP::Conn: WaitForID: id(netjabber-0)

XMPP::Conn: ReceivedID: id(netjabber-0)

XMPP::Conn: ReceivedID: nope…

XMPP::Conn: WaitForID: haven’t gotten it yet… let’s wait for more packets

XMPP::Conn: Process: timeout(1)

XML::Stream: Read: buff((username))

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(iq) att( type result id netjabber-0 )

XML::Stream: Node: _handle_element: check( -1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(query) att( xmlns jabber:iq:auth )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(username) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(username)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(username)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(username)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(resource) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(resource)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(query)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(iq)

XML::Stream: Node: _handle_close: check( 0 )

XML::Stream: Node: _handle_close: check2( -1 )

XMPP::Conn: CallBack: sid(9mjepkqwer) received((username))

XMPP::Conn: CallBack: tag(iq)

XMPP::Conn: CallBack: id(netjabber-0)

XMPP::Conn: CallBack: we either want it or were waiting for it.

XMPP::Conn: CallBack: check directxpath

XMPP::Conn: CallBack: check directxpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-tls”])

XMPP::Conn: CallBack: check directxpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”])

XMPP::Conn: BuildObject: tag(iq) package(Net::XMPP::IQ)

XMPP::Conn: CheckID: tag(iq) id(netjabber-0)

XMPP::Conn: CheckID: we have that here somewhere…

XMPP::Conn: CallBack: found registry entry: tag(iq) id(netjabber-0)

XMPP::Conn: DeregisterID: tag(iq) id(netjabber-0)

XMPP::Conn: CallBack: they still want it… we still got it…

XMPP::Conn: GotID: id(netjabber-0) xml((username))

XML::Stream: Process: block(0)

XMPP::Conn: ReceivedID: id(netjabber-0)

XMPP::Conn: ReceivedID: id(netjabber-0)

XMPP::Conn: WaitForID: we got it!

XMPP::Conn: GetID: id(netjabber-0)

XMPP::Conn: ReceivedID: id(netjabber-0)

XMPP::Conn: CleanID: id(netjabber-0)

XMPP::Conn: AuthIQAuth: authType(digest)

XMPP::Conn: SendAndReceiveWithID: object(Net::XMPP::IQ=HASH(0x171b5f8))

XMPP::Conn: SendWithID: id(netjabber-1)

XMPP::Conn: SendWithID: in(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XMPP::Conn: RegisterID: tag(iq) id(netjabber-1)

XMPP::Conn: SendWithID: out(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XMPP::Conn: SendXML: sent(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XML::Stream: Send: (ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XMPP::Conn: SendAndReceiveWithID: sent with id(netjabber-1)

XMPP::Conn: WaitForID: id(netjabber-1)

XMPP::Conn: ReceivedID: id(netjabber-1)

XMPP::Conn: ReceivedID: nope…

XMPP::Conn: WaitForID: haven’t gotten it yet… let’s wait for more packets

XMPP::Conn: Process: timeout(1)

XML::Stream: Read: buff(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(iq) att( id netjabber-1 to server.com/9mjepkqwer type error )

XML::Stream: Node: _handle_element: check( -1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(query) att( xmlns jabber:iq:auth )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(digest) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1f)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1f)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(digest)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(resource) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(Weather Update)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(Weather Update)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(resource)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(username) att( )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_cdata: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) cdata(username)

XML::Stream: Node: _handle_cdata: sax(XML::Stream::Parser=HASH(0x171af38)) cdata(username)

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(username)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(query)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(error) att( code 401 type auth )

XML::Stream: Node: _handle_element: check( 0 )

XML::Stream: Node: _handle_element: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(not-authorized) att( xmlns urn:ietf:params:xml:ns:xmpp-stanzas )

XML::Stream: Node: _handle_element: check( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(not-authorized)

XML::Stream: Node: _handle_close: check( 2 )

XML::Stream: Node: _handle_close: check2( 1 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(error)

XML::Stream: Node: _handle_close: check( 1 )

XML::Stream: Node: _handle_close: check2( 0 )

XML::Stream: Node: _handle_close: sid(9mjepkqwer) sax(XML::Stream::Parser=HASH(0x171af38)) tag(iq)

XML::Stream: Node: _handle_close: check( 0 )

XML::Stream: Node: _handle_close: check2( -1 )

XMPP::Conn: CallBack: sid(9mjepkqwer) received(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XMPP::Conn: CallBack: tag(iq)

XMPP::Conn: CallBack: id(netjabber-1)

XMPP::Conn: CallBack: we either want it or were waiting for it.

XMPP::Conn: CallBack: check directxpath

XMPP::Conn: CallBack: check directxpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-tls”])

XMPP::Conn: CallBack: check directxpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”])

XMPP::Conn: BuildObject: tag(iq) package(Net::XMPP::IQ)

XMPP::Conn: CheckID: tag(iq) id(netjabber-1)

XMPP::Conn: CheckID: we have that here somewhere…

XMPP::Conn: CallBack: found registry entry: tag(iq) id(netjabber-1)

XMPP::Conn: DeregisterID: tag(iq) id(netjabber-1)

XMPP::Conn: CallBack: they still want it… we still got it…

XMPP::Conn: GotID: id(netjabber-1) xml(ec8fd9a0f886070f28c66a2a6e67840d7c91cf1fWeather Updateusername)

XML::Stream: Process: block(0)

XMPP::Conn: ReceivedID: id(netjabber-1)

XMPP::Conn: ReceivedID: id(netjabber-1)

XMPP::Conn: WaitForID: we got it!

XMPP::Conn: GetID: id(netjabber-1)

XMPP::Conn: ReceivedID: id(netjabber-1)

XMPP::Conn: CleanID: id(netjabber-1)

Error ‘AuthSend’: 401: [?]

XML::Stream: Send: (</stream:stream>)

XML::Stream: SetCallBacks: tag(node) func(CODE(0x171b118))

XMPP::Conn: Disconnect: bye bye

sendxmpp: Disconnected

I have no experience with this library. Perhaps it depends on non-SASL authentication, for which support was removed from Openfire in 4.1.0? Since then, there is a new plugin, named ‘nonsaslauthentication’ that you can install to restore this functionality, if you must.

Thanks for the response Guus!

Does the nonsaslauthentication plugin require an openfire restart to take? I haven’t done that yet, but with just the plugin installed, same result.

I think it’s probably due to any sort of stanza change, when reading through the output it’s never geting challenged to send the password so likely something with that.

I don’t know if it requires a restart.

It seems to use AuthSASL without issues when connecting to openfire 4.0.4.
In my case, I’m using sendxmpp 1.24 on CentOS 7.3.

Here’s the (partial) client debug log:

[…]

XML::Stream: Read: buff(stream:featuresPLAINSCRAM-SHA-1</stream:features>)

[…]

XMPP::Conn: AuthSASL: shiney new auth

XML::Stream: Send: (SECRETSTUFFREMOVED/auth>)

XMPP::Conn: AuthSASL: haven’t authed yet… let’s wait.

XMPP::Conn: Process: timeout(1)

XML::Stream: Read: buff()

XMPP::Conn: AuthSASL: We authed!

And here’s the (partial) client debug log when connecting to openfire 4.1.3:

[…]

XML::Stream: Read: buff(stream:featuresPLAINEXTERNAL</stream:features>)

[…]

XMPP::Conn: AuthSASL: shiney new auth

XML::Stream: Send: (USERNAMEREMOVED)

XMPP::Conn: AuthSASL: haven’t authed yet… let’s wait.

XMPP::Conn: Process: timeout(1)

XML::Stream: Read: buff()

XMPP::Conn: AuthSASL: Authentication failed.

So it seems instead of the PLAIN mechanism as before, EXTERNAL is used by Net::XMPP and no password is sent, so the authentication fails now.

Can I somehow configure the openfire server not to send EXTERNAL as allowed SASL auth mechanism? Just using PLAIN would be fine with me, as TLS is enforced.

Addendum: I’m not using LDAP.

you can explicitly set the sasl mechs by setting a system property.

create sasl.mechs with the property PLAIN

Openfire Properties

1 Like

Awesome, it’s working again with openfire 4.1.3! Thanks!

It works like a charm!! Thank you very much.

Regards.

Al