-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Punjab fails on localhost (500 Internal Server Error), using Strophe.js #26
Comments
What version of python? It may be a recent bug in twisted with python 3. |
Hi, I've mentioned it in the previous post, I uninstalled python and related stuff, and reinstalled python 2.7 32-bit and the dependencies (32-bit). Still does not work. I searched on the net, and it seemed like DNS problems...I added the following line in punjab.tac Now, the call goes on forever, and I'm stuck with connecting stage in the app. 2013-01-09 11:22:13+0530 [HTTPChannel,0,127.0.0.1] HEADERS 1357710733.45: ===== 1357710733.46 connect to jabber.org:5222 =================================2013-01-09 11:22:13+0530 [HTTPChannel,0,127.0.0.1] Starting factory <punjab.sess 6282116a86daefb19b05dd25 1357710763.34 startup timeout =========================2013-01-09 11:22:43+0530 [-]
2013-01-09 11:22:43+0530 [-] |
The bug mentioned by @twonds is indeed the cause here, as the SRV lookup fails, for Twisted 12.3.0. The fix is now in review, and hopefully we can get a bugfix release 12.3.1 for it. |
Just wanted to post an update. I used Twisted 12.2.0, and punjab is working fine now. |
@HyprGeek you might want to check this workaround. Obviously it doesn't work with IDN domain names, but it never did before. As it is really an application issue how to work with IDN domain names, I did resolve that in Wokkel. |
Hi Im seeing a similar issue, Im using punjab with twisted 14.02 version. Below is the log Any help would be of great favour |
I do not see an error in the log provided. Can you include the error? Also, it looks like this may be a separate issue than the issue here because Punjab is making an attempt to connect. Do you mind creating a new issue or sending an email? |
Using Strophe.js to initiate a connection.
Running punjab on Windows 7 64-bit, using python 2.7 64-bit and installed other dependencies (win32 api as well).
Added proxy to apache server
(in httpd.conf)
ProxyPass /bosh http://localhost:5280/http-bind
ProxyPassReverse /bosh http://localhost:5280/http-bind
Calling http://localhost/bosh in browser returns XEP-0124 - BOSH.
When connecting to http://bosh.metajack.im:5280/xmpp-httpbind, it works both using the url and the proxy.
ProxyPass /bosh http://bosh.metajack.im:5280/xmpp-httpbind
ProxyPassReverse /bosh http://bosh.metajack.im:5280/xmpp-httpbind
Initialization of punjab:
2013-01-08 22:35:44+0530 [-] Log opened.
2013-01-08 22:35:44+0530 [-] twistd 12.3.0 (C:\Python27\python.exe 2.7.3) starti
ng up.
2013-01-08 22:35:44+0530 [-] reactor class: twisted.internet.selectreactor.Selec
tReactor.
2013-01-08 22:35:44+0530 [-] Site starting on 5280
2013-01-08 22:35:44+0530 [-] Starting factory <twisted.web.server.Site instance
at 0x032306C0>
Connecting using strophe:
2013-01-08 22:36:22+0530 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [08/Jan/2013:17
:06:21 +0000] "GET /http-bind HTTP/1.1" 200 170 "-" "Mozilla/5.0 (Windows NT 6.1
; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0"
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] HEADERS 1357664790.65:
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] <twisted.web.http_headers._Di
ctHeaders object at 0x02EADFD0>
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] HTTPB POST :
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1]
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] Session Created : 2fc05a71502
bb9b0e74d709f9dba1deaf8b3f64d 1357664790.67
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] =============================
===== 1357664790.67 connect to jabber.org:5222 =================================
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] Starting factory <punjab.sess
ion.Session object at 0x0323D310>
2013-01-08 22:36:30+0530 [HTTPChannel,0,127.0.0.1] Unhandled Error
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\twisted\web\http.py", line 1394, i
n dataReceived
finishCallback(data[contentLength:])
File "C:\Python27\lib\site-packages\twisted\web\http.py", line 1623, i
n _finishRequestBody
self.allContentReceived()
File "C:\Python27\lib\site-packages\twisted\web\http.py", line 1686, i
n allContentReceived
req.requestReceived(command, path, version)
File "C:\Python27\lib\site-packages\twisted\web\http.py", line 790, in
requestReceived
self.process()
--- (exception caught here) ---
File "C:\Python27\lib\site-packages\twisted\web\server.py", line 192,
in process
self.render(resrc)
File "C:\Python27\lib\site-packages\twisted\web\server.py", line 241,
in render
body = resrc.render(self)
File "C:\Python27\lib\site-packages\twisted\web\resource.py", line 250
, in render
return m(request)
File "D:\punjab-master\punjab\httpb.py", line 4
12, in render_POST
s, d = self.service.startSession(body_tag, xmpp_elements)
File "D:\punjab-master\punjab\httpb.py", line 6
70, in startSession
return self.make_session(self, body.attributes)
File "D:\punjab-master\punjab\session.py", line
79, in make_session
connector.connect()
File "C:\Python27\lib\site-packages\twisted\names\srvconnect.py", line
78, in connect
self.domain))
File "C:\Python27\lib\site-packages\twisted\names\client.py", line 795
, in lookupService
return getResolver().lookupService(name, timeout)
File "C:\Python27\lib\site-packages\twisted\names\common.py", line 171
, in lookupService
return self._lookup(name, dns.IN, dns.SRV, timeout)
File "C:\Python27\lib\site-packages\twisted\names\resolve.py", line 44
, in _lookup
q = dns.Query(name, type, cls)
File "C:\Python27\lib\site-packages\twisted\names\dns.py", line 484, i
n init
self.name = Name(name)
File "C:\Python27\lib\site-packages\twisted\names\dns.py", line 357, i
n init
raise TypeError("%r is not a byte string" % (name,))
exceptions.TypeError: u'_xmpp-client._tcp.jabber.org' is not a byte stri
ng
The text was updated successfully, but these errors were encountered: