Candy and HTTP Bind Settings

Hey,

I am using http://amiadogroup.github.com/candy/ with Openfire

I have a question about the HTTP Bind Settings.

Default Port in Openfire is set to 7070.

The RewriteRule for http-bind in the .htaccess of Candy however points to port 5280 :

RewriteRule http-bind/ http://mydomain.tld:5280/http-bind/ [P]

http://mydomain.tld/candy/example/ a black dialog appears : ‘Connecting…’

When i change the line in the .htaccess to:

RewriteRule http-bind/ http://mydomain.tld:7070/http-bind/ [P]

http://mydomain.tld/candy/example/ an empty lightgrey screen, no error.

Can anyone explain the grey screen, i have no clue what is wrong.

Openfire shows Active Client Sessions.

When i access http://myipaddress:7070/http-bind/ directly:


HTTP ERROR 404

Problem accessing /http-bind/. Reason:

  • Not Found*

Powered by Jetty://

---------------------------

Help appreciated!

Regards,

David van der Tuijn

Hello,

Port 5280 is typically used by punjab, which is a good way of connecting bosh clients to openfire as it avoids openfire’s httpbind stuff.

daryl

I found this in the Log Viewer (warn.log) :

*2011.08.21 23:33:09 /http-bind/ *

*java.lang.IllegalStateException: IDLE,initial *

*at org.eclipse.jetty.server.AsyncContinuation.suspend(AsyncContinuation.java:280) *

*at org.eclipse.jetty.server.AsyncContinuation.suspend(AsyncContinuation.java:776) *

*at org.jivesoftware.openfire.http.HttpConnection.waitForResponse(HttpConnection.ja va:202) *

*at org.jivesoftware.openfire.http.HttpConnection.getResponse(HttpConnection.java:1 44) *

*at org.jivesoftware.openfire.http.HttpSession.getResponse(HttpSession.java:589) *

*at org.jivesoftware.openfire.http.HttpSession.getResponse(HttpSession.java:573) *

*at org.jivesoftware.openfire.http.HttpBindServlet.isContinuation(HttpBindServlet.j ava:181) *

*at org.jivesoftware.openfire.http.HttpBindServlet.doPost(HttpBindServlet.java:133) *

*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:530) *

*at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216) *

*at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.j ava:110) *

*at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187) *

*at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425) *

*at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 1) *

*at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362) *

*at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 ) *

*at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) *

*at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:183) *

*at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126) *

*at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) *

*at org.eclipse.jetty.server.Server.handleAsync(Server.java:377) *

*at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:564) *

*at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:390) *

*at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62) *

*at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) *

*at java.lang.Thread.run(Unknown Source) *

2011.08.21 23:33:09 Client provided invalid session: eab7ce6e. [myipaddress]

What does it mean ?

Hi David

The grey screen is because you don’t autojoin any rooms. See https://github.com/amiadogroup/candy/wiki/Installing-a-Jabber-server for more information.

We get the same errors using Candy (and other BOSH-based clients) with Openfire. I recommend you to use https://github.com/twonds/punjab as connection manager since the HTTP-Bind module of Openfire is buggy. This error usually occurs when the connection between client and server is slightly unstable (delay, slowness, packet loss, …).

The setup of punjab is painless and the software is very stable and efficient.

Cheers,

Patrick

In index.html autojoin was set to true, and it didnt work:

autojoin: true

I changed it to **[‘test@conference.myhostname’] **and success!

autojoin: [‘test@conference.myhostname’]

Thanks Patrick