HTTP Binding problems

Hi,

I have been working on getting HTTP Binding working with Wildfire…

I am using the JSJAC libraries. I can connect, chat etc… everything is good for awhile.

Then randomly I start getting issues with the connection to Wildfire which result in bound http connections not being freed up when they should. This error is caught in the Debug log:

java.io.IOException: An existing connection was forcibly closed by the remote host

at sun.nio.ch.SocketDispatcher.read0(Native Method)

at sun.nio.ch.SocketDispatcher.read(Unknown Source)

at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)

at sun.nio.ch.IOUtil.read(Unknown Source)

at sun.nio.ch.SocketChannelImpl.read(Unknown Source)

at org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:129)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:277)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

I don’'t forcibly close connections… unless…

Internet Explorer

Apache (Running on Windows)

Apache Proxy

Firewall

or Wildfire is doing it? After the error occurs I have to restart Wildfire or binding won’'t work for future sessions.

If I don’'t restart the error keeps on re-occuring over and over.

I have been struggling with this problem for days!

Any help would be great. Please let me know what further information is required?

Could it be a build issue? I am using wildfire_2007-03-02. Should I go back to the last release?

Thanks

Daniel

I tried this with release 3.2.2 - still getting the same problem but couldn’'t see the exception error in the debug log? Maybe not related?

Also it seems that Firefox generally doesn’'t have this problem which suggests a client side issue…

but restarting the wildfire server always corrects the issue for awhile so I am very confused?

I have no idea?!

Thanks again,

Daniel

So, can you double check to make sure this is only occurring with Firefox? Looks like Apache maybe closing the connections, do you have a hold time on your reverse proxy? Whats your hold time on http-binding? I found the sweet spot with apache to be 10 seconds.

Thanks,

Alex

I tried changing the apache and wildfire timeouts and didn’'t help.

Been looking into the apache service more and noticed that there are errors:

“POST /http-bind/ HTTP/1.1” 500 537

For some reason wildfire is returning a 500 error which Firefox handles ok,

but Internet Explorer doesn’‘t release the connection - ie onreadystate doesn’'t trigger

on the httpxmlrequest.

So the issue is wildfire returning http 500 errors - about every 1 in 20 requests.

Why would it do this? is it related to the jetty service and is there any config I could try?

Thanks

Daniel

Firefox receives the following from the Apache proxy:

Proxy Error

The proxy server received an invalid

response from an upstream server.

The proxy server could not handle the request **

POST /http-bind/

.

Reason: Error reading from remote server


This all points me in the direction of a Wildfire problem however… If I run fiddler (which is effectively a proxy) on the client computer then this whole problem never occurs.

What is it about the IE xmlhttprequest’'s that could cause the 500 error in apache?

Just not making sense?!

Thanks

Message was edited by: StaticVortex

I was experiencing the same issue before, the only reason I could discover was that Wildfire was holding the connection open too long, Apache didn’'t like this so it would return an error. When I changed the hold value to 10 in Wildfire this problem went away, so I stopped worrying about it.

Thanks,

Alex

I have tried setting the wait to 10 seconds, but that is almost like polling - however it isn’'t stopping the issue.

xmpp.httpbind.client.idle 3600

xmpp.httpbind.client.requests.max 2

xmpp.httpbind.client.requests.polling 2

xmpp.httpbind.client.requests.wait 10

I know I am getting something wrong. The client should be reflecting these values.

It always ends up in an invalid RID error because one of the bound often connections doesn’'t release when it should.

Is there anything else you can suggest with those values? Thanks.

Is xmpp.httpbind.client.requests.polling actually used when you are using a http-bind connection?

I have also tried setting the polling to 0 and the wait to 60. Seems more stable but still getting disconnected.

I am also getting errors trying to login with blank being sent back. Have to try a couple of times before I can login? Have you seen that problem before. Thanks.

Message was edited by: StaticVortex

I am getting the same proxy error after being connected for a several minutes. Have you found a solution to this yet? I’'m using Openfire 3.3.0.

Are you using JWChat to connect to Openfire as well?

Thanks,

Alex

Yes I am using the JSJAC libraries - don’'t seem to be getting this error anymore.

Unfortunately not sure why that is.

What apache conf are you using for the proxy?

Yes, I get the error after a while after using both JWChat and some code I’'m writing using the JSJaC library.

The Apache directive I’'m using for the proxy is:

RewriteRule /bind/ http://servername:8080/http-bind/