strophe basic.html does not connect to remote XMPP server

206 views
Skip to first unread message

stella

unread,
Aug 19, 2011, 3:57:19 AM8/19/11
to Punjab
Hi,

I have setup Punjab. but when I test the basic example, strophe
failed to connect to remote XMPP server (Neither facebook chat nor
gtalk worked).

People say it is a dns problem. The command "host -t srv _xmpp-
client_.tcp.chat.facebook.com" gives error msg "The Host _xmpp-
client_.tcp.chat.facebook.com not found: 3(NXDOMAIN)"...

I was able to connect to facebook chat server via a stond alone php
script on this host.

Anyone has hint on how to solve this problem? Have been struggled
for this issue for days, and have read almost all the forum post...

Thanks!


==========================Log====================================================
Strophe is connecting
SENT: <body rid='1261481166' xmlns='http://jabber.org/protocol/
httpbind' to='chat.facebook.com' xml:lang='en' wait='60' hold='1'
content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0'
xmlns:xmpp='urn:xmpp:xbosh'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'
type='terminate' condition='remote connection-failed'/>
strophe failed to connect
=====================end of
log=================================================


======================Punjab log
==============================================
2011-08-18 13:05:04+0200 [-] Log opened.
2011-08-18 13:05:04+0200 [-] twistd 10.2.0 (/usr/bin/python 2.7.1)
starting up.
2011-08-18 13:05:04+0200 [-] reactor class:
twisted.internet.selectreactor.SelectReactor.
2011-08-18 13:05:04+0200 [-] twisted.web.server.Site starting on 5280
2011-08-18 13:05:04+0200 [-] Starting factory <twisted.web.server.Site
instance at 0x2575ef0>
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] HEADERS
1313666081.75:
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] {'origin': 'http://
localhost', 'content-length': '215', 'accept-encoding': 'gzip', 'x-
forwarded-host': 'localhost', 'x-forwarded-for': '127.0.0.1', 'host':
'localhost', 'accept': '*/*', 'user-agent': 'Mozilla/5.0 (X11; Linux
x86_64) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/
534.26+', 'connection': 'Keep-Alive', 'referer': 'http://localhost/
punjab/basic.html', 'x-forwarded-server': 'web-
rtc.betainnovation.com', 'content-type': 'application/xml'}
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] HTTPB POST :
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] <body
rid='1261481166' xmlns='http://jabber.org/protocol/httpbind'
to='chat.facebook.com' xml:lang='en' wait='60' hold='1' content='text/
xml; charset=utf-8' ver='1.6' xmpp:version='1.0'
xmlns:xmpp='urn:xmpp:xbosh'/>
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] Session Created :
e69aa3937d7a3b588ddc72c72dd0193e50fe8629 1313666081.76
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1]
================================== 1313666081.76 connect to
chat.facebook.com:5222 ==================================
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] Starting factory
<punjab.session.Session object at 0x2587790>
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] <class
'twisted.names.dns.DNSDatagramProtocol'> starting on 51356
2011-08-18 13:14:41+0200 [HTTPChannel,1,127.0.0.1] Starting protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x2587850>
2011-08-18 13:14:42+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
<punjab.session.XMPPClientConnector instance at 0x2614ab8> will retry
in 2 seconds
2011-08-18 13:14:42+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
Stopping factory <punjab.session.Session object at 0x2587790>
2011-08-18 13:14:42+0200 [-] (Port 51356 Closed)
2011-08-18 13:14:42+0200 [-] Stopping protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x2587850>
2011-08-18 13:14:45+0200 [-] Starting factory <punjab.session.Session
object at 0x2587790>
2011-08-18 13:14:45+0200 [-] <class
'twisted.names.dns.DNSDatagramProtocol'> starting on 5829
2011-08-18 13:14:45+0200 [-] Starting protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x25814d0>
2011-08-18 13:14:45+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
<punjab.session.XMPPClientConnector instance at 0x2614ab8> will retry
in 7 seconds
2011-08-18 13:14:45+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
Stopping factory <punjab.session.Session object at 0x2587790>
2011-08-18 13:14:45+0200 [-] (Port 5829 Closed)
2011-08-18 13:14:45+0200 [-] Stopping protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x25814d0>
2011-08-18 13:14:52+0200 [-] Starting factory <punjab.session.Session
object at 0x2587790>
2011-08-18 13:14:52+0200 [-] <class
'twisted.names.dns.DNSDatagramProtocol'> starting on 46674
2011-08-18 13:14:52+0200 [-] Starting protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x25814d0>
2011-08-18 13:14:53+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
Abandoning <punjab.session.XMPPClientConnector instance at 0x2614ab8>
after 3 retries.
2011-08-18 13:14:53+0200 [twisted.names.dns.DNSDatagramProtocol (UDP)]
Stopping factory <punjab.session.Session object at 0x2587790>
2011-08-18 13:14:53+0200 [-] (Port 46674 Closed)
2011-08-18 13:14:53+0200 [-] Stopping protocol
<twisted.names.dns.DNSDatagramProtocol object at 0x25814d0>
2011-08-18 13:15:10+0200 [-] ==================================
e69aa3937d7a3b588ddc72c72dd0193e50fe8629 1313666110.93 startup timeout
==================================
2011-08-18 13:15:10+0200 [-] HTTPB Error 200
2011-08-18 13:15:10+0200 [-] HTTPB Return Error: 200 -> <body
xmlns='http://jabber.org/protocol/httpbind' type='terminate'
condition='remote-connection-failed'/>
2011-08-18 13:15:10+0200 [-] 127.0.0.1 - - [18/Aug/2011:11:15:10
+0000] "POST /http-bind HTTP/1.1" 200 105 "http://localhost/punjab/
basic.html" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.26+
(KHTML, like Gecko) Version/5.0 Safari/534.26+"
2011-08-18 13:16:41+0200 [-] SESSION -> Terminate
2011-08-18 13:16:41+0200 [-] expire
(e69aa3937d7a3b588ddc72c72dd0193e50fe8629)
2011-08-18 13:16:41+0200 [-] 0

===================end of punjab
Log===========================================

Jack Moffitt

unread,
Feb 5, 2012, 6:38:38 PM2/5/12
to punja...@googlegroups.com
>   People say it is a dns problem. The command  "host -t srv _xmpp-
> client_.tcp.chat.facebook.com" gives error msg "The Host _xmpp-
> client_.tcp.chat.facebook.com not found: 3(NXDOMAIN)"...

You'll have to patch Strophe to pass a route attribute to Punjab, as
it can't use DNS to determine the hostname since Facebook does not
supply SRV records. See the BOSH specification for how this works.

jack.

Andy Skupen

unread,
Mar 10, 2012, 9:23:43 AM3/10/12
to Punjab
As a side note to Jack...

I've been reading his book and doing the examples using the Punjab
server he set up for that purpose. Everything was working great up
until a few days ago. The server still responds with the "XEP-0124 -
BOSH" message when you type the URL in a browser, but the BOSH
connection manager stopped working. When I installed Punjab on my
development machine and used that instead, the examples in the book
started working again.

I hope nothing terrible has happened to Jack's server!!!

Jack Moffitt

unread,
Mar 12, 2012, 12:36:41 PM3/12/12
to punja...@googlegroups.com

Sorry about that. There is enough traffic to that punjab that the
server logs fill up the disk now and then. I am usually pretty good
about watching out for that, but every once it a while it sneaks up on
me.

I need to automate the cleanup.

It should be back in business now.

jack.

Andy Skupen

unread,
Mar 12, 2012, 5:48:59 PM3/12/12
to Punjab
Jack,
Thank you, so very much! I tried it, and your BOSH server is
working again. I'll be sure and watch out for that myself, if and when
I put my own Punjab server into production.

Thank you very much,

Andy
Reply all
Reply to author
Forward
0 new messages