powered by Jive Software

Failed to connect to Openfire by websocket

OF version:3.9.1, I can use pidgin to log on.

When using strophe.js, I tried BOSH first, but it fails, probably I didn’t get apache settings right. Then I decide to try websockets, and this is my preferred option, however, I got the following error message:

WebSocket connection to ‘ws://ikan.tk:7070/ws/server’ failed: WebSocket is closed before the connection is established.

then the status is “connecting” always.

Questions:

  1. what’s the URL for websocket? using http-bind port (7070), or the client port (5222)? Any path (like /ws/server) to be followed ?

  2. I’m using OF 3.9.1 on windows, no plugin installed. Does OF 3.9.1 support WS by default, or I have to install some plugin, or there’s some configuration items I need to do?

Thanks in advance!

Openfire does not have built-in support for websockets. See this, especially the article linked in the second paragraph:

http://community.igniterealtime.org/blogs/ignite/2012/02/14/webrtc-websockets-an d-openfire

Thanks for answering my question. It’s better to document this fact somewhere.

Openfire has had a websockets implementation before an XMPP standard was proposed or implemented. I don’t think anyone has the appetite right now to implement it in the Openfire core until the xmpp websockets draft become a formal standard.

Now that we are on GitHub, lets see if someone out there will make a pull request with the changes

As a followup to my last post. There is actually a Jetty implementation of the xmpp websockets draft specification. If any one wishes to tackle this and graft it into Openfire, then the code here is waiting for them