3

I've installed punjab with (python 2.7.2).

To further ensure SRV isn't the issue, I've included:

connect_srv = False

in punjab.tac.

The server seems to start fine, and I can access :5280/http-bind but any connection I try to make fails. It seems to be a DNS issue, but I've verified the server can see jabber.org (via ping). Here are logs from startup to attempting a login to a jabber.org account:

2012-02-19 21:10:21-0500 [-] Log opened.
2012-02-19 21:10:21-0500 [-] twistd 12.0.0 (/root/bin/python 2.7.2) starting up.
2012-02-19 21:10:21-0500 [-] reactor class: twisted.internet.pollreactor.PollReactor.
2012-02-19 21:10:21-0500 [-] Site starting on 5280
2012-02-19 21:10:21-0500 [-] Starting factory <twisted.web.server.Site instance at 0xb7813d4c>
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] xx.xx.xx.110 - - [20/Feb/2012:02:10:31 +0000] "OPTIONS /http-bind HTTP/1.1" 200 - "http://xmpp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gec
ko) Version/5.1.3 Safari/534.53.10"
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] /etc/resolv.conf changed, reparsing
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] Resolver added ('xx.xx.xx.129', 53) to server list
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] Resolver added ('xx.xx.xx.129', 53) to server list
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] DNSDatagramProtocol starting on 29018
2012-02-19 21:10:32-0500 [HTTPChannel,0,xx.xx.xx.110] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc16c>
2012-02-19 21:10:32-0500 [-] (UDP Port 29018 Closed)
2012-02-19 21:10:32-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc16c>
2012-02-19 21:10:35-0500 [-] DNSDatagramProtocol starting on 36425
2012-02-19 21:10:35-0500 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc62c>
2012-02-19 21:10:35-0500 [-] (UDP Port 36425 Closed)
2012-02-19 21:10:35-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc62c>
2012-02-19 21:10:43-0500 [-] DNSDatagramProtocol starting on 33640
2012-02-19 21:10:43-0500 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc50c>
2012-02-19 21:10:43-0500 [-] (UDP Port 33640 Closed)
2012-02-19 21:10:43-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0xb77bc50c>
2012-02-19 21:11:00-0500 [-] xx.xx.xx.110 - - [20/Feb/2012:02:10:59 +0000] "POST /http-bind HTTP/1.1" 200 105 "http://xmpp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/5
34.53.10"
jopke
  • 1,186
  • 6
  • 18

2 Answers2

1

I guess you need SRV records for your server.

Some general info here. A workaround if you use localhost without a proper DNS here.

Community
  • 1
  • 1
ggozad
  • 13,105
  • 3
  • 40
  • 49
  • I am not following. I am not trying to connect to my own local XMPP server, I'm trying to connect to jabber.org. Do I need a DNS entry to map to outside services? – jopke Feb 21 '12 at 06:32
  • Aha. PunJab does try to do SRV lookups at least it used to. To be honest I don't know why, I would guess it's unnecessary. If you do a `dig` on the server you connect for the XMPP SRV records can you get them? – ggozad Feb 21 '12 at 07:30
  • I'm no sysadmin, so forgive me if I'm doing it wrong... `dig +short -t SRV _xmpp-server._tcp.jabber.org` returns `30 30 5269 hermes.jabber.org.` – jopke Feb 21 '12 at 08:30
  • This sounds right to me. In that case my answer probably does not cover you, sorry :) – ggozad Feb 21 '12 at 12:09
1

Try to add this line in punjab.tac for a right DNS looking

bosh.connect_srv = False

just after this line

bosh = HttpbService(1)

An restart punjab like this

twistd -y punjab.tac
EtreRe
  • 23
  • 6
  • Everyone notes to start punjab by "twistd punjab" or "twistd punjab --verbose", etc. This is the first post that mentions "-y punjab.tac" and it seemed to kick the configs into punjab -- THANK YOU! – Beshoy Girgis Feb 19 '13 at 15:01