twonds / punjab

BOSH connection manager
MIT License
183 stars 49 forks source link

Punjab Integration problem #25

Closed pawanyanky closed 11 years ago

pawanyanky commented 11 years ago

Hi, i have installed punjab and its running successfully at port 5281 as given below

    C:\Program Files\punjab-master>twistd.py -y punjab.tac
    2012-12-18 11:13:10+0530 [-] Log opened.
    2012-12-18 11:13:10+0530 [-] twistd 12.2.0 (C:\Python27\python.exe 2.7.3) starting up.
    2012-12-18 11:13:10+0530 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
    2012-12-18 11:13:10+0530 [-] Site starting on 5281
    2012-12-18 11:13:10+0530 [-] Starting factory <twisted.web.server.Site instance at 0x013B0C88>

but I don`t know how to configure punjab to work with ejabberd xmpp server. My ejabberd server is running on port number 5280.

I have used below given softwares : apache as web server candy chat candy as chat client ejabberd as xmpp server punjab as bosh connection manager

please help me to integrate punjab with my application .

twonds commented 11 years ago

If you run punjab on the same host as ejabberd then you have to change the port on punjab or ejabberd. You can use 5281 or something. Why are you not using ejabberd's bosh module?

rohittailor commented 11 years ago

Hi,

I am also facing the same issue while using punjab with Ejabberd and with Gtalk.

Following is the Error log of punjab:

2013-01-25 05:25:44+0000 [HTTPChannel,10,61.246.241.34] 61.246.241.34 - - [25/Ja n/2013:05:25:44 +0000] "POST /http-bind/ HTTP/1.1" 500 11115 "http://ec2-50-17-2 2-111.compute-1.amazonaws.com/x/examples/basic.html" "Mozilla/5.0 (Windows NT 6. 1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17" 2013-01-25 05:25:53+0000 [HTTPChannel,10,61.246.241.34] 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() --- --- 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 "C:\Python27\lib\site-packages\punjab-0.15-py2.7.egg\punjab\httpb .py", line 412, in render_POST s, d = self.service.startSession(body_tag, xmpp_elements) File "C:\Python27\lib\site-packages\punjab-0.15-py2.7.egg\punjab\httpb .py", line 670, in startSession return self.make_session(self, body.attributes) File "C:\Python27\lib\site-packages\punjab-0.15-py2.7.egg\punjab\sessi on.py", line 86, 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.gmail.com' is not a byte strin g

2013-01-25 05:25:53+0000 [HTTPChannel,10,61.246.241.34] 61.246.241.34 - - [25/Ja n/2013:05:25:52 +0000] "POST /http-bind/ HTTP/1.1" 500 11115 "http://ec2-50-17-2 2-111.compute-1.amazonaws.com/x/examples/basic.html" "Mozilla/5.0 (Windows NT 6. 1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"

Please help

twonds commented 11 years ago

@rohittailer please try the latest master branch of Punjab. Or Change your twisted version. See https://github.com/twonds/punjab/pull/27

rohittailor commented 11 years ago

Thanks Twonds. My problem was solved on the same day by updating the Twisted version. Sorry for late response here.