Random Disconnection on jsjac + openfire

Hi,

i’ve successfully installed jsjac 1.2.2 + openfire 3.4.4 on my mac. jsjac’s simpleclient.html can connect and chat with another user (using spark). But when i’m sending frequent short message to jsjac client from the other user (using spark), the jsjac simpleclient.html is suddenly and randomly exitting with last debug string:

[Thu Feb 7 02:10:05 2008] (level 3) func: unknown
*/*/* => match for handler function handleMessage(aJSJaCPacket) {
var html = "";
html += "<div class=\"msg\"><b>Received Message from " + aJSJaCPacket.getFromJID() + ":</b><br/>";
html += aJSJaCPacket.getBody().htmlEnc() + "</div>";
document.getElementById("iResp").innerHTML += html;
document.getElementById("iResp").lastChild.scrollIntoView();
}
[Thu Feb 7 02:10:05 2008] (level 2) func: unknown
Found working slot at 0
[Thu Feb 7 02:10:06 2008] (level 4) func: unknown
sending: <body rid='134362' sid='12dedc2e' xmlns='http://jabber.org/protocol/httpbind' key='86f9f51e54bf6b944df933c2d55e26d1b752f4c9'></body>
[Thu Feb 7 02:10:06 2008] (level 4) func: unknown
async recv: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 403 FORBIDDEN</title>           //====>> I got 403 forbidden here ! ==========
</head>
<body><h2>HTTP ERROR: 403</h2><pre>FORBIDDEN</pre>
<p>RequestURI=/http-bind/</p><p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>
<br/>
<br/>                                    //==== --> many <br/> lines here ==== </body>
</html>
[Thu Feb 7 02:10:06 2008] (level 3) func: unknown
incoming event 'onstatuschanged'
[Thu Feb 7 02:10:06 2008] (level 3) func: unknown
incoming event 'status_changed'
[Thu Feb 7 02:10:06 2008] (level 2) func: unknown
handling event 'status_changed'
[Thu Feb 7 02:10:07 2008] (level 0) func: handleStatusChanged
status changed: aborted
[Thu Feb 7 02:10:07 2008] (level 1) func: unknown
Disconnected.

Anyone ever got same “strange” behaviour like this ? any solution ?

I’ve tried to reduce JSJAC_CHECKINQUEUEINTERVAL from 1 msec to 100 msec but to no avail.

But when i’m using jsjac 0.6 within jsjabber (http://jo-hely.hu/~aadaam/jsjabber), everything work fine! jsjabber using 100 msec for checkqueueinterval.

Message was edited by: chenull, unmarkup the debug output

I’m having a similar problem. I can log on to Openfire successfully with JsJAC but invariably I will be didconnected a few minutes later. The problem seems to have something to do with some kind of spurious response to a HTTP request;

http://yourserver.com/http-bind/

The request headers are;

Host

yourserver.com

User-Agent

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12

Accept

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8, image/png,/;q=0.5

Accept-Language

en-us,en;q=0.5

Accept-Encoding

gzip,deflate

Accept-Charset

ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive

300

Connection

keep-alive

Content-Type

text/xml; charset=utf-8

Content-Length

127

Cookie

btype=binding; JSJaC_State=

Pragma

no-cache

Cache-Control

no-cache

Then the response is “Error 403 FORBIDDEN”. I am thinking it has something to do with the Apache configuration for http-bind,

but if that wasn’t working then how am I able to log on to Openfire at all?

I just posted a question on a similar issue: http://www.igniterealtime.org/community/message/171248#171248 and am hoping for some feedback too … It seems that there’s some bug in the Openfire-Jetty chain that causes Jetty to throw this error. For awhile I thought it was my jsjac client, but it seems to happen when Openfire is passing a message out along the proxy chain, like so:

<message> path:

External iChat client -


> Openfire:5222 -


> Connection Manager -


> —> Jetty -


> Apache Proxy:8080 -


> Apache:80 -


> jsjac client

Replacing Openfire with ejabberd 2.0, as a test, eliminated the error. That does not necessarily mean everything else is hunkey-dorey, but it does indicate some kind of glitch in that area.

Sorry for the rather crude diagram.

Aaron

I’ve managed to eliminate the disconnect problem with my setup after sifting through some other posts on the forum;

Logged on to the administrative website

associated with Openfire as admin (http://127.0.0.1:9090),

select the ‘server’ tab and then server->server manager->system properties and add two new system

properties;

xmpp.httpbind.client.requests.polling with a value of 0

xmpp.httpbind.client.requests.wait with a value of 60

Why we need those properties I have no idea.