How to whitelist IP addresses instead of domains.

46 views
Skip to first unread message

Rodolfo Gonzalez

unread,
Mar 15, 2014, 4:03:26 AM3/15/14
to punja...@googlegroups.com
Hi,

I'm implementing converse.js + lighttpd proxy + punjab + jabberd2 in a Amazon Web Services Virtual Private Cloud (VPC). The web servers are behind a load balancer, and use only IP addresses, in the 10.0.0.0/24 subnet. The jabber instance is named "example.com" in the logs and has the corresponding SVR records. When they connect to punjab, I get:

2014-03-15 01:55:26-0600 [HTTPChannel,2,10.0.4.235] ================================== 1394870126.05 connect to example.com:5222 ==================================
2014-03-15 01:55:26-0600 [HTTPChannel,2,10.0.4.235] Starting factory <punjab.session.Session object at 0x30c0310>
2014-03-15 01:55:26-0600 [HTTPChannel,2,10.0.4.235] DNSDatagramProtocol starting on 50550
2014-03-15 01:55:26-0600 [HTTPChannel,2,10.0.4.235] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x30c01d0>
2014-03-15 01:55:26-0600 [-] (UDP Port 50550 Closed)
2014-03-15 01:55:26-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x30c01d0>
2014-03-15 01:55:26-0600 [Uninitialized] SID: a8959bb3d1dc2794870e88afd3832462c8b5ed5a => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-15 01:55:26-0600 [XmlStream,client] SID: a8959bb3d1dc2794870e88afd3832462c8b5ed5a => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='pzosym83c69xsicewrhfr648rb0i0jeqj3jiprl2' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-15 01:55:26-0600 [XmlStream,client] HTTPB Error 200
2014-03-15 01:55:26-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-15 01:55:26-0600 [XmlStream,client] 10.0.4.235 - - [15/Mar/2014:07:55:25 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-15 01:55:26-0600 [XmlStream,client] expire (a8959bb3d1dc2794870e88afd3832462c8b5ed5a)
2014-03-15 01:55:26-0600 [XmlStream,client] 0
2014-03-15 01:55:26-0600 [XmlStream,client] SESSION -> We have expired a8959bb3d1dc2794870e88afd3832462c8b5ed5a 9421928728 []
2014-03-15 01:55:26-0600 [XmlStream,client] SID: a8959bb3d1dc2794870e88afd3832462c8b5ed5a => SEND: '</stream:stream>'
2014-03-15 01:55:26-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x30c0310>


I have tried this in my punjab.tac:

bosh = HttpbService(1)
bosh.white_list = ['10.0.', '.example.com']

But I'm still getting the same error. I'm not sure if it is caused by example.com or by the IP. Any hint is appreciated.

Regards.

Christopher Zorn

unread,
Mar 18, 2014, 12:57:52 PM3/18/14
to punja...@googlegroups.com
This error is coming from your server. It does not know the xmpp server you are trying to establish a session with. Can you share the part of the log where you create the BOSH session?


--
You received this message because you are subscribed to the Google Groups "Punjab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to punjab-xmpp...@googlegroups.com.
To post to this group, send email to punja...@googlegroups.com.
Visit this group at http://groups.google.com/group/punjab-xmpp.
For more options, visit https://groups.google.com/d/optout.

Rodolfo Gonzalez

unread,
Mar 19, 2014, 4:57:42 PM3/19/14
to punja...@googlegroups.com
Hi Christopher, this is the full log, just for one test. The first connection is from the pre-bind script, and the second one from converse.js, I guess :)

2014-03-19 14:51:07-0600 [-] Log opened.
2014-03-19 14:51:07-0600 [-] twistd 11.1.0 (/usr/bin/python 2.7.3) starting up.
2014-03-19 14:51:07-0600 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2014-03-19 14:51:07-0600 [-] Site starting on 5280
2014-03-19 14:51:07-0600 [-] Starting factory <twisted.web.server.Site instance at 0x2ddc3f8>
root@jabber:/gnt/punjab/gnt# tail -n 100 twistd.log 
2014-03-19 14:51:07-0600 [-] Log opened.
2014-03-19 14:51:07-0600 [-] twistd 11.1.0 (/usr/bin/python 2.7.3) starting up.
2014-03-19 14:51:07-0600 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2014-03-19 14:51:07-0600 [-] Site starting on 5280
2014-03-19 14:51:07-0600 [-] Starting factory <twisted.web.server.Site instance at 0x2ddc3f8>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HEADERS 1395262282.19:
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] {'content-length': '247', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151137" xml:lang="en" hold="1" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>

2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Session Created : 427898f0034e28245d68396bc8dd3b440e4f4102 1395262282.19
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] ================================== 1395262282.19 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /usr/local/lib/python2.7/dist-packages/punjab/session.py:85: exceptions.UserWarning: Domain argument to XMPPClientConnector should be bytes, not unicode
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /etc/resolv.conf changed, reparsing
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Resolver added ('10.0.0.2', 53) to server list
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] DNSDatagramProtocol starting on 11174
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 11174 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.43 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (427898f0034e28245d68396bc8dd3b440e4f4102)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired 427898f0034e28245d68396bc8dd3b440e4f4102 8516151138 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HEADERS 1395262282.22:
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] {'content-length': '301', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151138" xml:lang="en"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ZXZhenF1ZXpAZGVtbzQuYXRoZW5lYS5jb20ubXgvREVNTzQAZXZhenF1ZXoAZGVtbw==</auth></body>

2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB Error 400
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] 10.0.4.27 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 400 - "-" "-"
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HEADERS 1395262282.23:
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] {'content-length': '229', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151139" xml:lang="en" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/>

2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Session Created : efa64cdafaee7af0ea748879ab8652c5bb56899c 1395262282.23
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] ================================== 1395262282.23 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting factory <punjab.session.Session object at 0x2df9310>
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] DNSDatagramProtocol starting on 39639
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 39639 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.157 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (efa64cdafaee7af0ea748879ab8652c5bb56899c)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired efa64cdafaee7af0ea748879ab8652c5bb56899c 8516151140 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2df9310>
root@jabber:/gnt/punjab/gnt# tail -n 100 twistd.log 
2014-03-19 14:51:07-0600 [-] Log opened.
2014-03-19 14:51:07-0600 [-] twistd 11.1.0 (/usr/bin/python 2.7.3) starting up.
2014-03-19 14:51:07-0600 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2014-03-19 14:51:07-0600 [-] Site starting on 5280
2014-03-19 14:51:07-0600 [-] Starting factory <twisted.web.server.Site instance at 0x2ddc3f8>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HEADERS 1395262282.19:
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] {'content-length': '247', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151137" xml:lang="en" hold="1" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>

2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Session Created : 427898f0034e28245d68396bc8dd3b440e4f4102 1395262282.19
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] ================================== 1395262282.19 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /usr/local/lib/python2.7/dist-packages/punjab/session.py:85: exceptions.UserWarning: Domain argument to XMPPClientConnector should be bytes, not unicode
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /etc/resolv.conf changed, reparsing
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Resolver added ('10.0.0.2', 53) to server list
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] DNSDatagramProtocol starting on 11174
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 11174 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.43 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (427898f0034e28245d68396bc8dd3b440e4f4102)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired 427898f0034e28245d68396bc8dd3b440e4f4102 8516151138 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HEADERS 1395262282.22:
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] {'content-length': '301', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151138" xml:lang="en"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ZXZhenF1ZXpAZGVtbzQuYXRoZW5lYS5jb20ubXgvREVNTzQAZXZhenF1ZXoAZGVtbw==</auth></body>

2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB Error 400
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] 10.0.4.27 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 400 - "-" "-"
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HEADERS 1395262282.23:
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] {'content-length': '229', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151139" xml:lang="en" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/>

2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Session Created : efa64cdafaee7af0ea748879ab8652c5bb56899c 1395262282.23
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] ================================== 1395262282.23 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting factory <punjab.session.Session object at 0x2df9310>
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] DNSDatagramProtocol starting on 39639
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 39639 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.157 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (efa64cdafaee7af0ea748879ab8652c5bb56899c)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired efa64cdafaee7af0ea748879ab8652c5bb56899c 8516151140 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2df9310>
root@jabber:/gnt/punjab/gnt# 
root@jabber:/gnt/punjab/gnt# 
root@jabber:/gnt/punjab/gnt# cat twistd.log 
2014-03-19 14:51:07-0600 [-] Log opened.
2014-03-19 14:51:07-0600 [-] twistd 11.1.0 (/usr/bin/python 2.7.3) starting up.
2014-03-19 14:51:07-0600 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2014-03-19 14:51:07-0600 [-] Site starting on 5280
2014-03-19 14:51:07-0600 [-] Starting factory <twisted.web.server.Site instance at 0x2ddc3f8>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HEADERS 1395262282.19:
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] {'content-length': '247', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151137" xml:lang="en" hold="1" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60"/>

2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Session Created : 427898f0034e28245d68396bc8dd3b440e4f4102 1395262282.19
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] ================================== 1395262282.19 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /usr/local/lib/python2.7/dist-packages/punjab/session.py:85: exceptions.UserWarning: Domain argument to XMPPClientConnector should be bytes, not unicode
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] /etc/resolv.conf changed, reparsing
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Resolver added ('10.0.0.2', 53) to server list
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] DNSDatagramProtocol starting on 11174
2014-03-19 14:51:22-0600 [HTTPChannel,0,10.0.4.43] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 11174 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2dea4d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.43 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (427898f0034e28245d68396bc8dd3b440e4f4102)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired 427898f0034e28245d68396bc8dd3b440e4f4102 8516151138 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: 427898f0034e28245d68396bc8dd3b440e4f4102 => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2ddff90>
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HEADERS 1395262282.22:
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] {'content-length': '301', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151138" xml:lang="en"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ZXZhenF1ZXpAZGVtbzQuYXRoZW5lYS5jb20ubXgvREVNTzQAZXZhenF1ZXoAZGVtbw==</auth></body>

2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] HTTPB Error 400
2014-03-19 14:51:22-0600 [HTTPChannel,1,10.0.4.27] 10.0.4.27 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 400 - "-" "-"
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HEADERS 1395262282.23:
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] {'content-length': '229', 'x-host': 'example.com', 'x-forwarded-port': '80', 'x-forwarded-for': 'aaa.bbb.ccc.ddd, 10.0.6.164', 'accept': '*/*', 'host': 'example.com', 'x-forwarded-proto': 'http, http', 'content-type': 'text/xml charset=utf-8'}
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] HTTPB POST : 
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] <?xml version="1.0" encoding="UTF-8"?>
        <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="8516151139" xml:lang="en" to="example.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true"/>

2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Session Created : efa64cdafaee7af0ea748879ab8652c5bb56899c 1395262282.23
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] ================================== 1395262282.23 connect to example.com:5222 ==================================
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting factory <punjab.session.Session object at 0x2df9310>
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] DNSDatagramProtocol starting on 39639
2014-03-19 14:51:22-0600 [HTTPChannel,2,10.0.4.157] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [-] (UDP Port 39639 Closed)
2014-03-19 14:51:22-0600 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x2df91d0>
2014-03-19 14:51:22-0600 [Uninitialized] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='example.com' version='1.0'>"
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => RECV: "<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='example.com' version='1.0' id='u6hs54tte7ls7z7c4k242xd6lwpuamz4thxymqs1' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>"
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Error 200
2014-03-19 14:51:22-0600 [XmlStream,client] HTTPB Return Error: 200 -> <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-stream-error'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></body>
2014-03-19 14:51:22-0600 [XmlStream,client] 10.0.4.157 - - [19/Mar/2014:20:51:21 +0000] "POST /http-bind HTTP/1.0" 200 335 "-" "-"
2014-03-19 14:51:22-0600 [XmlStream,client] expire (efa64cdafaee7af0ea748879ab8652c5bb56899c)
2014-03-19 14:51:22-0600 [XmlStream,client] 0
2014-03-19 14:51:22-0600 [XmlStream,client] SESSION -> We have expired efa64cdafaee7af0ea748879ab8652c5bb56899c 8516151140 []
2014-03-19 14:51:22-0600 [XmlStream,client] SID: efa64cdafaee7af0ea748879ab8652c5bb56899c => SEND: '</stream:stream>'
2014-03-19 14:51:22-0600 [XmlStream,client] Stopping factory <punjab.session.Session object at 0x2df9310>

Christopher Zorn

unread,
Mar 20, 2014, 11:40:48 AM3/20/14
to punja...@googlegroups.com
Yeah, so it looks like you do not have the correct hostname setup in jabberd2 so you can not initiate a session. You should double check your configuration. 

Rodolfo Gonzalez

unread,
Mar 20, 2014, 3:03:53 PM3/20/14
to punja...@googlegroups.com
You're right, I was using the old hostname from before I setup the SRV record. But now I'm getting this:

2014-03-20 12:56:22-0600 [HTTPChannel,3,10.0.4.244] SID: 07549593d6211fc7ae6e3b26721bb6c1d6176a64 => SEND: "<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>JDZhG44FTTM24pAZGVtbzQuYXRoZW5lYS55b20ubZgvREVTTT33MAZFZhenF1ZXoAYm9za22xNA==</auth>"
2014-03-20 12:56:22-0600 [XmlStream,client] SID: 07549593d6211fc7ae6e3b26721bb6c1d6176a64 => RECV: "<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><malformed-request/></failure>"
2014-03-20 12:56:22-0600 [XmlStream,client] 

        RETURN HTTPB 1395341782.56:
2014-03-20 12:56:22-0600 [XmlStream,client] <body xmlns='http://jabber.org/protocol/httpbind'><failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><malformed-request/></failure></body>
2014-03-20 12:56:22-0600 [XmlStream,client] 8242861507
2014-03-20 12:56:22-0600 [XmlStream,client] 10.0.4.244 - - [20/Mar/2014:18:56:22 +0000] "POST /http-bind HTTP/1.0" 200 137 "-" "-"
2014-03-20 12:57:12-0600 [XmlStream,client] SID: 07549593d6211fc7ae6e3b26721bb6c1d6176a64 => RECV: ' '
2014-03-20 12:57:22-0600 [-] SID: 07549593d6211fc7ae6e3b26721bb6c1d6176a64 => SEND: ' '

jabberd2 is configured as

    <mechanisms>
      <traditional>
        <plain/>
      </traditional>
    </mechanisms>
    <ssl-mechanisms>
      <traditional>
        <plain/>
      </traditional>
    </ssl-mechanisms>

I don't find any error message from jabberd2 in syslog. 

Thanks.


Rodolfo Gonzalez

unread,
Mar 20, 2014, 3:49:43 PM3/20/14
to punja...@googlegroups.com
Forget it, the problem was almost the same, the msgreal. Corrected and working fine. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages