Sparkweb basic HTTP-BIND issues

I’m trying to get Sparkweb working with Openfire 3.8.0.

I’m running on CentOS, usign apache for Sparkweb.html file, but using Openfire’s built-in web server for everything else.

I have SparkWeb working if I use “socket” connections on port 5222.

However, my goal is to get SparkWeb working using “https” connections.

When I try to use “http” or “https” bindings in SparkWeb, it just hangs after entering login credentials.

Debugging “https” is painful, so I stepped back to “http” to see if it’s a general http-bind issue. It appears it is. The same thing happens (hangs after entering credentials) when I use http.

I have done a packet capture (using wireshark) when attempting to login with Sparkweb, and I encounter a “Server error”.

Below is the relevant piece of SparkWeb.html (the rest of the file is unaltered from the SparkWeb download package):

Here is the packet capture (capturing only port 7070) (red is sent from client to server, blue is sent from server to client):

POST /http-bind/ HTTP/1.0

Accept: /

Accept-Language: en-US

Referer: http://{servername-omitted}/sparkweb/SparkWeb.swf

x-flash-version: 11,6,602,171

Content-Type: text/xml

Content-Length: 193

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; MS-RTC EA 2; .NET4.0C; .NET4.0E)

Host: {servername-omitted}:7070

Connection: Keep-Alive

Pragma: no-cache

HTTP/1.1 200 OK

Content-Type: text/xml;charset=UTF-8

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST

Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control

Access-Control-Max-Age: 86400

Content-Length: 573

Connection: keep-alive

Server: Jetty(7.x.y-SNAPSHOT)

PLAINzlib

POST /http-bind/ HTTP/1.0

Accept: /

Accept-Language: en-US

Referer: http://{servername-omitted}/sparkweb/SparkWeb.swf

x-flash-version: 11,6,602,171

Content-Type: text/xml

Content-Length: 213

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; MS-RTC EA 2; .NET4.0C; .NET4.0E)

Host: meltdown.oati.net:7070

Connection: Keep-Alive

Pragma: no-cache

ZXJpa2FAbWVsdGRvd24ub2F0aS5uZXQAZXJpa2EAY29hY2hPVUNIIQ==

HTTP/1.1 500 Server Error

Cache-Control: must-revalidate,no-cache,no-store

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 1283

Connection: keep-alive

Server: Jetty(7.x.y-SNAPSHOT)

Error 500 Server Error

HTTP ERROR: 500

Problem accessing /http-bind/. Reason:

    Server Error

Powered by Jetty:// POST /http-bind/ HTTP/1.0

Accept: /

Accept-Language: en-US

Referer: http://meltdown.oati.net/sparkweb/SparkWeb.swf

x-flash-version: 11,6,602,171

Content-Type: text/xml

Content-Length: 97

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; MS-RTC EA 2; .NET4.0C; .NET4.0E)

Host: meltdown.oati.net:7070

Connection: Keep-Alive

Pragma: no-cache

HTTP/1.1 200 OK

Content-Type: text/xml;charset=UTF-8

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST

Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control

Access-Control-Max-Age: 86400

Content-Length: 74

Connection: keep-alive

Server: Jetty(7.x.y-SNAPSHOT)

This also shows up in the ‘warn.log’ file:

2013.02.28 15:25:09 org.eclipse.jetty.servlet.ServletHandler - /http-bind/

java.util.concurrent.RejectedExecutionException

    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)

Is there something special I have to do to get basic http-bind working? I have ticked the radio button in the admin console for enabling http-bind, but it seems this path “/http-bind/” is not liked by the server. What else must I do to get this working?

Any assistance would be greatly appreciated.

Thanks - Erik

AH HA!

I fixed this. I was running Openfire 3.8.0 on CentOS 64-bit. So, suspecting the 64-bit OS was an issue (as Openfire appears to be only fully supported in 32-bit OSes), I built a new VM in 32-bit. However, when I went to install OpenFire this morning, I looked online just incase a new version was out, and look! 3.8.1 is out now. How nice. So, I installed 3.8.1 and setup Sparkweb and Apache, and it works great! no more HTTP-BIND issues. Not sure if the issue was 64-bit OS, or OF 3.8.0, but either way, it’s fixed.

  • Erik

Erik,

A number of folks on the forums, including me, run Openfire on 64bit linux. With the rpm, you have the choice of running openfire with the bundled 32bit JRE or specifying a operating system provided JRE. This is configured in the /etc/sysconfig/openfire file.

daryl

1 Like