Problem connecting to Openfire server on HTTPS connection

Hi All,

I’ve been having this problem for quite awhile now and haven’t been able to solve this problem.

Without giving too much boring detail, I have a XMPP web client trying to connect to the Openfire server. Everything works great on a HTTP connection. The problem is when the client is running on a HTTPS connection. When this happens, the Openfire server shows the following exception in the “Warn” logs:

java.io.IOException: FULL head
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:274)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)…

From some research, it appears that Jetty is throwing this when the header is too big. The purposed solution is to call “connector.setHeaderBufferSize(int bytes)”.

Being an Openfire numbie, I’m not sure if anyone has seen this before or knows a solution. From searching on this forum, I didn’t see a thread about this topic.

If anybody had any suggestions, it would be greatly appreciated! Let me know if you would like more details of my setup.

Thanks.

I am seeing this also. Oddly, it happens intermittantly and for unknown reasons but when it does happen it prevents me from successfully logging in to Openfire from the particular affected client machine. I can log on from other machines. Sometimes when I reboot the client machine (but not the one Openfire is running on) the problem will go away for a while. I have no idea what to do about this, good to know someone else is seeing the problem as well.

I think I did identify the problem and may have a workaround but you need to have built openfire from source in order to add the fix.

In the sources look for HttpBindManager.java and see the createConnector() method. It turns out that the default header buffer size is 4032 which, for some reason, is sometimes too small. Just above the call to connector.setHost() add the line;

connector.setHeaderBufferSize(8032);

Now you will only get the exception if the header is twice as large as 4032, ha. A real fix would have handled the exception properly I guess, and increased the header buffer size as required.