XMPP+BOSH connection problems

94 views
Skip to first unread message

Alexis Huxley

unread,
Sep 27, 2024, 6:05:36 AM9/27/24
to Prosody IM Users

I’m running Prosody at home, with ports open on my router/firewall for c2s and s2s. From everywhere I can connect Pidgin/XMPP to this without problems but another user’s corporate firewall has recently started allowing only outgoing http/s.

Accordingly, I’ve modified the Prosody configuration to support BOSH. On the router, I can direct XMPP traffic arriving from the internet through to the Prosody box. But I can’t direct http/s traffic directly to the Prosody box as I have other web servers all sitting behind a reverse proxy, which is what the router/firewall forwards 443 to. So I added a new vhost on  that reverse proxy, proxypass-ing through to 5280 on the Prosody box. Oh, and I copied the SSL certificate from the Prosody box (which was using it for connections coming in on 5222) over the vhost on the reverse-proxy (so that it can use it for connections coming in on 443). This seems to work: at least I can visit https://jabber.pasta.freemyip.com/http-bind and see the right thing.

So now I myself try what I expect the user behind the corporate firewall is going to have to do, namely: paste that URL into Pidgin/Advanced/BOSH-URL, save and try to connect. But when I do this it fails: the buddy list window simply says “Service unavailable” and the debug window shows the output below.

I tried also converse.js, but this just hangs.

The Prosody logs for the connection attempt, with debug enabled, are below.

Can anybody offer any advise please? Thanks!


Sep 27 12:02:16 http.server debug Firing event: POST /http-bind
Sep 27 12:02:16 mod_bosh debug Handling new request table: 0x55ff53ecce40: <body content='text/xml; charset=utf-8' secure='true' to='jabber.pasta.freemyip.com' xml:lang='en' xmpp:version='1.0' ver='1.6' xmlns:xmpp='urn:xmpp:xbosh' rid='2936150814515952' wait='60' hold='1' xmlns='http://jabber.org/protocol/httpbind'/>
----------
Sep 27 12:02:16 mod_bosh debug BOSH body open (sid: <none>)
Sep 27 12:02:16 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug BOSH session created for request from 192.168.1.35
Sep 27 12:02:16 mod_bosh info New BOSH session, assigned it sid 'c2dc62df-709c-404f-b65f-a1cf65c32862'
Sep 27 12:02:16 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug rid: 2936150814515952, sess: 2936150814515951, diff: 1
Sep 27 12:02:16 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug Not offering authentication on insecure connection
Sep 27 12:02:16 mod_bosh debug We have an open request, so sending on that
Sep 27 12:02:16 mod_bosh debug Request destroyed: table: 0x55ff543cb110
Sep 27 12:02:16 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug BOSH session marked as inactive (for 60s)
Sep 27 12:02:16 mod_bosh debug Session c2dc62df-709c-404f-b65f-a1cf65c32862 has 0 out of 1 requests open
Sep 27 12:02:16 mod_bosh debug and there are 0 things in the send_buffer:
Sep 27 12:02:17 http.server debug Firing event: POST /http-bind
Sep 27 12:02:17 mod_bosh debug Handling new request table: 0x55ff54425890: <body rid='2936150814515953' sid='c2dc62df-709c-404f-b65f-a1cf65c32862' to='jabber.pasta.freemyip.com' xml:lang='en' xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh'><iq xmlns='jabber:client' type='get' id='purple6b54f8ca'><query xmlns='jabber:iq:auth'><username>alexis</username></query></iq></body>
----------
Sep 27 12:02:17 mod_bosh debug BOSH body open (sid: c2dc62df-709c-404f-b65f-a1cf65c32862)
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug rid: 2936150814515953, sess: 2936150814515952, diff: 1
Sep 27 12:02:17 mod_bosh debug BOSH stanza received: <iq type='get' id='purple6b54f8ca' xml:lang='en'>

Sep 27 12:02:17 runnerkgttRUJKfwNW debug creating new coroutine
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug Received[c2s_unauthed]: <iq type='get' id='purple6b54f8ca' xml:lang='en'>
Sep 27 12:02:17 stanzarouter debug Unhandled c2s_unauthed stanza: iq; xmlns=jabber:iq:auth
Sep 27 12:02:17 mod_bosh debug We have an open request, so sending on that
Sep 27 12:02:17 mod_bosh debug Request destroyed: table: 0x55ff541a1d90
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug BOSH session marked as inactive (for 60s)
Sep 27 12:02:17 mod_bosh debug Session c2dc62df-709c-404f-b65f-a1cf65c32862 has 0 out of 1 requests open
Sep 27 12:02:17 mod_bosh debug and there are 0 things in the send_buffer:
Sep 27 12:02:17 http.server debug Firing event: POST /http-bind
Sep 27 12:02:17 mod_bosh debug Handling new request table: 0x55ff541641d0: <body rid='2936150814515954' sid='c2dc62df-709c-404f-b65f-a1cf65c32862' to='jabber.pasta.freemyip.com' xml:lang='en' xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh' type='terminate'></body>
----------
Sep 27 12:02:17 mod_bosh debug BOSH body open (sid: c2dc62df-709c-404f-b65f-a1cf65c32862)
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug rid: 2936150814515954, sess: 2936150814515953, diff: 1
Sep 27 12:02:17 mod_bosh debug Session c2dc62df-709c-404f-b65f-a1cf65c32862 has 1 out of 1 requests open
Sep 27 12:02:17 mod_bosh debug and there are 0 things in the send_buffer:
Sep 27 12:02:17 mod_bosh debug Have nothing to say, so leaving request unanswered for now
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug Closing session with 1 requests open
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 info BOSH client disconnected: session close
Sep 27 12:02:17 mod_bosh debug Request destroyed: table: 0x55ff543f22a0
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug BOSH session marked as inactive (for 60s)
Sep 27 12:02:17 boshc2dc62df-709c-404f-b65f-a1cf65c32862 debug Destroying unbound session for <(unknown)@jabber.pasta.freemyip.com>


--

Alexis Huxley

unread,
Sep 27, 2024, 6:41:34 AM9/27/24
to Prosody IM Users
Agggh! got it! I needed "consider_bosh_secure = true".
Reply all
Reply to author
Forward
0 new messages