powered by Jive Software

JabberHTTPBind Servlet terminates with remote-stream-error

I am using the JHBServlet to connect JSJaC to OpenFire. The initial connection and sending messages back and forth works normally. However, after an idle period a remote-stream-error will occur which will terminate the connection. I am including a typical log of traffic when left idle. Each stanza contains the POST, response, HTTP response code and time of the request/response round trip.

<body rid='615968' sid='C9IU2QwsMfHqHBNorotGSZxA' xmlns='http://jabber.org/protocol/httpbind' key='0c86ef70a936ee904ca9914c73a540e1717420a9'
<body xmlns="http://jabber.org/protocol/httpbind"/>
200 OK - 5.01m

<body rid='615969' sid='C9IU2QwsMfHqHBNorotGSZxA' xmlns='http://jabber.org/protocol/httpbind' key='af93a42c03dcb830965eb4e4681f03cd0a4de08d'
<body xmlns="http://jabber.org/protocol/httpbind" condition="remote-stream-error" type="terminate"/>
200 OK - 53.86s

<body rid='615970' sid='C9IU2QwsMfHqHBNorotGSZxA' xmlns='http://jabber.org/protocol/httpbind' key='700d54fb9bf5eb4a1dc3f5699d156a9f1120490d'
    <title>Apache Tomcat/6.0.18 - Error report</title>
    <h1>HTTP Status 404</h1>
    <p><b>description</b> <u>The requested resource () is not available.</u></p>
404 Not Found - 52ms

After 5 minutes, a time-out occurs and a new POST is made.  However, after about 50 seconds, the response contains a remote-stream-error termination. It appears that the JHB session is terminated at this point, so the next request gets the HTTP 404 from Tomcat.  Note that I have already set the xmpp.httpbind.client.idle to several different values but there has been no change to the behavior.  So, what is going on here?  Why is the remote-stream-error occurring and better yet, how can I fix it?

I have used the binding that comes in OpenFire and have not had this type of problem.  After a time-out, a new connection is made and it runs normally.  I am not using the built-in OpenFire binding because I was hoping to modify the JHBServlet code to handle other tasks.  If necessary, I will revert to using OpenFire binding on port 7070, but I would like to know what is going on with JHB.


Apologies for the sideways scrolling. Apparently copying and pasting into the text window causes weirdness?

It turns out the problem was with the xmpp.client.idle setting in OpenFire. I had missed this because I had only set the xmpp.httpbind.client.idle.