Punjab bug ?

69 views
Skip to first unread message

Woodgate

unread,
Apr 3, 2012, 9:41:39 AM4/3/12
to punja...@googlegroups.com
Hello,

First, thank's for reading my message - I'm working with Punjab for several weeks and I found it very helpful.

I am working on a webchat based on Jabber and I use Openfire and Punjab (StropheJS for the HTTP).

I had no problem on my mac, that was my openfire server and apache server for my webchat. With the Apache Proxy module, both with OpenFire HTTP Bind (7070 port) or with Punjab.

But now I would like to install my openfire server on a different computer, a CentOS server based on my network.

The server starts correctly and has exactly the same configuration as the openfire server on my mac.

The problem is that when I connect with my script and Punjab, the response is not complete and the script stops after few requests.

On my Mac, I sent :

<body rid='12280337' xmlns='http://jabber.org/protocol/httpbind' to='192.168.3.19' 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' route='xmpp:192.168.3.19:5222'/>


And received :

<body xmlns='http://jabber.org/protocol/httpbind' inactivity='60' secure='true' authid='fa9f1480' content='text/xml; charset=utf-8' window='3' polling='15' sid='0243dfbe037378336c987619e1d780c1314f7e2d' requests='2' wait='60'><stream:features xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features></body>

(notice that I added an attribute "route").

The response I received after about 100ms. And the connection works great after that.

On the CentOS server, I sent :

<body rid='3437025422' xmlns='http://jabber.org/protocol/httpbind' to='192.168.3.164' 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' route='xmpp:192.168.3.164:5222'/>

And the response is :

<body xmlns='http://jabber.org/protocol/httpbind' inactivity='60' secure='true' authid='5d33a1d9' content='text/xml; charset=utf-8' window='3' polling='15' sid='9b41950633542eff7e22eb8b02c025ff882476a6' requests='2' wait='60'/>

And after that, I have maybe 2 or 3 queries made, including pings, and the connections stops with this response :

<body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-connection-failed'/>

Does anybody have any idea?

Thank you very much for your answers !

Woodgate

unread,
Apr 4, 2012, 9:31:40 AM4/4/12
to punja...@googlegroups.com
After an update of Punjab, Python and OpenFire, I send this request :

<body rid='1862477924' xmlns='http://jabber.org/protocol/httpbind' to='192.168.3.164' 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' route='xmpp:192.168.3.164:5222'/>

And obtain this answer after 27 or 29 seconds :


<body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-connection-failed'/>

Directly.

And it's my last answer... the script stops.

Any idea?

Christopher Zorn

unread,
Apr 4, 2012, 12:34:01 PM4/4/12
to punja...@googlegroups.com
The 'to' attribute should be a name for the xmpp server you are gonna use and not an IP. You will need to change that.

--
You received this message because you are subscribed to the Google Groups "Punjab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/punjab-xmpp/-/z33cDvqcEXEJ.

To post to this group, send email to punja...@googlegroups.com.
To unsubscribe from this group, send email to punjab-xmpp...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/punjab-xmpp?hl=en.

Woodgate

unread,
Apr 13, 2012, 4:23:18 AM4/13/12
to punja...@googlegroups.com
Hi,

Thank's for your answer.

This is my configuration :

- I host my webchat on my computer, a Mac Mini. The local IP is 192.168.3.19. The script is heberged on MAMP.

- The server is a virtual server (CentOS) and the XMPP server is Openfire. The local IP is 192.168.3.164. The name of this server is "openfire.example.local".

- I used the proxy_module of MAMP on my Mac Mini to redirect http://192.168.3.19/http-bind/ on http://192.168.3.164:5280/http-bind/. The URL I call for the connexion is http://192.168.3.19/http-bind/.

- The webchat uses jQuery and StropheJS.

This is the request that I sent :

<body rid='3089996168' xmlns='http://jabber.org/protocol/httpbind' to='openfire.example.local' 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' route='xmpp:192.168.3.164:5222'/>

But I have no answer from the server. It waits maybe 29 or 30 seconds, and stops...

What is wrong with this configuration ?

When I go with my web browser on http://192.168.3.164:5280/http-bind/, I have the message "XEP-0124 - BOSH".

When I change the Apache proxy_module to redirect on the port 7070 (the OpenFire HTTP Binding) instead of 5280, and change the name of the server by its IP address (192.168.3.164), it works perfectly. But I have SID errors when I refresh the page, that's why I won't use HTTP-Binding but Punjab...

Ths request is then also :

<body rid='3037512468' xmlns='http://jabber.org/protocol/httpbind' to='192.168.3.164' 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' route='xmpp:192.168.3.164:5222'/>

Any idea ?

Thank you very much
To unsubscribe from this group, send email to punjab-xmpp+unsubscribe@googlegroups.com.

Woodgate

unread,
Apr 16, 2012, 3:18:06 AM4/16/12
to punja...@googlegroups.com
Help ?




Le mardi 3 avril 2012 15:41:39 UTC+2, Woodgate a écrit :

Christopher Zorn

unread,
Apr 16, 2012, 7:29:28 PM4/16/12
to punja...@googlegroups.com
On Fri, Apr 13, 2012 at 1:23 AM, Woodgate <cafei...@gmail.com> wrote:
Hi,

Thank's for your answer.

This is my configuration :

- I host my webchat on my computer, a Mac Mini. The local IP is 192.168.3.19. The script is heberged on MAMP.

- The server is a virtual server (CentOS) and the XMPP server is Openfire. The local IP is 192.168.3.164. The name of this server is "openfire.example.local".

- I used the proxy_module of MAMP on my Mac Mini to redirect http://192.168.3.19/http-bind/ on http://192.168.3.164:5280/http-bind/. The URL I call for the connexion is http://192.168.3.19/http-bind/.

- The webchat uses jQuery and StropheJS.

This is the request that I sent :

<body rid='3089996168' xmlns='http://jabber.org/protocol/httpbind' to='openfire.example.local' 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' route='xmpp:192.168.3.164:5222'/>

But I have no answer from the server. It waits maybe 29 or 30 seconds, and stops...

What is wrong with this configuration ?

It does not look wrong. Punjab should attempt a connection to 192.168.3.164 port 5222. You may want to turn on verbose logging in Punjab to see what is happening. Do you require tls on your XMPP server? ssl/tls has been problematic for people in the past. 

 
To view this discussion on the web visit https://groups.google.com/d/msg/punjab-xmpp/-/QnM-KQueO2sJ.

To post to this group, send email to punja...@googlegroups.com.
To unsubscribe from this group, send email to punjab-xmpp...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages