旁遮普无法连接外部服务

时间:2012-02-20 02:23:19

标签: python xmpp twisted bosh punjab

我已经安装了punjab和(python 2.7.2)。

为了进一步确保SRV不是问题,我已经包括:

connect_srv = False

在punjab.tac。

服务器似乎启动正常,我可以访问:5280 / http-bind,但我尝试的任何连接都失败了。这似乎是一个DNS问题,但我已经验证了服务器可以看到jabber.org(通过ping)。以下是从启动到尝试登录jabber.org帐户的日志:

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"

2 个答案:

答案 0 :(得分:1)

我猜你的服务器需要SRV记录。

一些一般信息here。 如果您在没有正确的DNS here的情况下使用localhost,则需要解决方法。

答案 1 :(得分:1)

尝试在punjab.tac中添加此行以获得正确的DNS查找

bosh.connect_srv = False

就在这一行之后

bosh = HttpbService(1)

像这样重启旁遮普

twistd -y punjab.tac