HTTP Binding doesn't work with 3.8.1

Hi,

does anybody got an idea?

We use Smack’s BOSHConnection (http://svn.igniterealtime.org/svn/repos/smack/branches/bosh/)

With 3.7.1 it worked quite well. But now with 3.8.1 the login fails.

In this method (in SASLAuthentication class), after the authenticate call, the connection.isConnected() return false and therefore crashes later. At the beginning of this method the connection was connected.

public String authenticateAnonymously() throws XMPPException {

try {

currentMechanism = new SASLAnonymous(this);

currentMechanism.authenticate(null,null,"");

// Wait until SASL negotiation finishes

synchronized (this) {

}

}

Does anybody have an idea?

I also tested for non-anonymous logins, but I also get the “not connected to server” error after a while.

I get the following error in the logs:

2013.04.04 16:19:58 org.eclipse.jetty.servlet.ServletHandler - /http-bind/
java.util.concurrent.RejectedExecutionException: Task org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender@7f9122 rejected from java.util.concurrent.ThreadPoolExecutor@15b8be9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.init(HttpSes sionManager.java:417)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.access$200(H ttpSessionManager.java:405)
at org.jivesoftware.openfire.http.HttpSessionManager.forwardRequest(HttpSessionMan ager.java:319)
at org.jivesoftware.openfire.http.HttpBindServlet.handleSessionRequest(HttpBindSer vlet.java:254)
at org.jivesoftware.openfire.http.HttpBindServlet.parseDocument(HttpBindServlet.ja va:176)
at org.jivesoftware.openfire.http.HttpBindServlet.doPost(HttpBindServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 5)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:94 1)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186 )
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875 )
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.j ava:936)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51 )
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.jav a:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java :44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598 )
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)

Anybody got idea, please?

Hi,

I’m also having the same problem with the same version 3.8.1 while it was working for me with version 3.7.1 and Gajim clients.

Same error

2013.04.18 16:12:54 org.eclipse.jetty.servlet.ServletHandler - /http-bind/
java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1760)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.init(HttpSessionManager.java:417)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.access$200(HttpSessionManager.java:405)
at org.jivesoftware.openfire.http.HttpSessionManager.forwardRequest(HttpSessionManager.java:319)
at org.jivesoftware.openfire.http.HttpBindServlet.handleSessionRequest(HttpBindServlet.java:254)
at org.jivesoftware.openfire.http.HttpBindServlet.parseDocument(HttpBindServlet.java:176)
at org.jivesoftware.openfire.http.HttpBindServlet.doPost(HttpBindServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:619)

The BOSH worker thread pool appears to be empty. Try setting the following system property:

xmpp.httpbind.worker.threads=16

You should set this value to a sufficiently high number to handle the BOSH load on your server. Note also if this property is missing, Openfire will use the following “legacy” property as a default:

xmpp.client.processing.threads=16

If either of these properties are set to zero in your deployment, you will not be able to use the BOSH component.

Thanks, it works now for me!

But the strange thing is, I removed the property again (and completely restarted Openfire) and it still works…

Indeed it works for me now as well. Thx!

Nonetheless, the setup was from scratch and it did not work before this addition. There might be a small initialization bug somewhere…

I am getting this error again:

2013.05.23 17:09:08 org.eclipse.jetty.servlet.ServletHandler - /http-bind/
java.util.concurrent.RejectedExecutionException: Task org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender@6fa5fb rejected from java.util.concurrent.ThreadPoolExecutor@8d5433[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.init(HttpSes sionManager.java:417)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.access$200(H ttpSessionManager.java:405)
at org.jivesoftware.openfire.http.HttpSessionManager.forwardRequest(HttpSessionMan ager.java:319)
at org.jivesoftware.openfire.http.HttpBindServlet.handleSessionRequest(HttpBindSer vlet.java:254)
at org.jivesoftware.openfire.http.HttpBindServlet.parseDocument(HttpBindServlet.ja va:176)
at org.jivesoftware.openfire.http.HttpBindServlet.doPost(HttpBindServlet.java:145)

ALTHOUGH I have both the properties set to 16.

It worked in the past, but suddenly it doesn’t anymore. Even if I restart Openfire.

Please help. Any idea?