#569 closed defect (fixed)

Can't connect to Jabber server on localhost ("stanza sent before session start")

Reported by: thecloud Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 1.2.4
Keywords: Cc:
IRC client+version: Irssi v0.8.14 Operating System: MacOS
OS version/distro: Mac OS X


I have a Jabber server at localhost:5223 (it's actually not running on the same machine, but rather is port-forwarded via SSH.) Other clients (Adium, mcabber) are able to connect without a problem.

Bitlbee (also running locally, in daemon mode) fails every time after making the connection and authenticating:

00:39 <@root> jabber - Logging in: Connecting
00:39 <@root> jabber - Logging in: Connected to server, logging in
00:39 <@root> jabber - Logging in: Authentication finished
00:39 <@root> jabber - Couldn't log in: Stream error: not-authorized: stanza sent before session start
00:39 <@root> jabber - Logging in: Signing off..

This is on Mac OS X 10.5.8, but Google shows that at least one other person has run into this on Gentoo; see

Here are the settings for this account:

00:43 <@thecloud> account set 1
00:43 <@root> auto_connect = `0'
00:43 <@root> auto_reconnect = `true'
00:43 <@root> password is empty
00:43 <@root> username = `'
00:43 <@root> port = `5223'
00:43 <@root> priority = `0'
00:43 <@root> resource = `Bitlbee'
00:43 <@root> resource_select = `priority'
00:43 <@root> server = `localhost'
00:43 <@root> ssl = `true'
00:43 <@root> tls = `try'
00:43 <@root> xmlconsole = `true'

Finally, here is the xmlconsole spew (note: I had to replace the beginning of URLs with XXXX's to avoid the spam filter!)

00:39 -!- Irssi: Starting query in localhost with xmlconsole
00:39 <xmlconsole> TX: <?xml version='1.0' ?><stream:stream to="" xmlns="jabber:client" xmlns:stream="" 
00:39 <xmlconsole> RX: <stream:features xmlns:stream=""><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>GSSAPI</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><auth xmlns=""/></stream:features>
00:39 <xmlconsole> TX: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/>00:39 <xmlconsole> RX: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">bm9uY2U9ImxJb2FKdHNTdUk1V0JrbGpRNHZnc1l5am1Ybjl4dUwxVjcybGo4SUJadW89IixyZWFsbT0ic3dlY2hhdC5hcHBsZS5jb20iLHFvcD0iYXV0aCIsbWF4YnVmPTY1NTM2LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
00:39 <xmlconsole> TX: <response 
00:39 <xmlconsole> RX: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0xOTZlNThlMjVlMjU4YWYxNTI4ZThhOWVjNTYwZmVlZA==</challenge>
00:39 <xmlconsole> TX: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
00:39 <xmlconsole> RX: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
00:39 <xmlconsole> TX: <?xml version='1.0' ?><stream:stream to="" xmlns="jabber:client" xmlns:stream="" 
00:39 <xmlconsole> RX: <stream:features xmlns:stream=""><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><required/></bind><unbind 
                   xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>
00:39 <xmlconsole> TX: <iq type="set" id="BeeCHB/N/2TlQ2T5L+VZ"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Bitlbee</resource></bind></iq>
00:39 <xmlconsole> TX: <iq type="set" id="BeeCqATjqgQ+Lpy85A93"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
00:39 <xmlconsole> RX: <stream:error xmlns:stream=""><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-streams"/><text 
                   xmlns="urn:ietf:params:xml:ns:xmpp-streams">stanza sent before session start</text></stream:error>
00:39 <xmlconsole> TX: </stream:stream>

Attachments (0)

Change History (3)

comment:1 Changed at 2010-03-14T17:46:30Z by wilmer

Sorry about that spam filter, spam is such a pain in the hole here that my anti-spam measures are getting in the way of legitimate use. :-((

I've heard of this problem before, it's extremely annoying and the debate about who's wrong is tedious. I guess I'll just make BitlBee wait for a response to the bind first...

changeset:devel,505 should fix this.

comment:2 Changed at 2010-03-14T17:46:37Z by wilmer

Resolution: fixed
Status: newclosed

comment:3 in reply to:  1 Changed at 2010-03-17T06:27:12Z by thecloud

Replying to wilmer:

changeset:devel,505 should fix this.

Indeed it does!!! No problems connecting now. Thank you very much.

Host localhost is running BitlBee bzr-492 Darwin/i386.

Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.