This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (5 pts)
11 Replies Last post: May 4, 2008 3:11 PM by Andres Mujica  
bearcathk Bronze 6 posts since
Mar 17, 2008
Currently Being Moderated

Mar 17, 2008 10:50 AM

Openfire 3.4.5 with JWChat

 

Hey everyone,

 

 

Myself, and the rest of the IT department here at my job are trying to get Openfire and JWChat working together.  We've got Openfire up and running, and have been able to connect to it with Miranda just fine.  The problem lays in connecting via http-bind with JWChat.  I'll copy and paste the settings and log files below.  We're at our wit's end, we've been working on this for quite some time, and are no closer to getting it to work than when we started.  Thanks so much for any and all help.

 

 

 

 

-


httpd.conf: -

-


Directory Section

 

<Directory "/var/www/jwchat/jwchat_1">

 

Options +Includes

 

Options +Indexes +MultiViews

 

Options ExecCGI FollowSymLinks

 

Order allow,deny

 

Allow from all

 

</Directory>

 

AddHandler cgi-wrapper .cgi .pl

 

AddHandler cgi-script .cgi .pl

 

AddHandler server-parsed .shtml

 

AddType text/html .shtml

 

AddOutputFilter INCLUDE .shtml

 

XBitHack on

 

 

 

-


Virtual Hosts Section

 

<VirtualHost 150.20.55.66:8080>

 

ServerName jwchat.dev1.com

 

DocumentRoot "/var/www/jwchat/jwchat_1"

 

DirectoryIndex index.php index.html index.htm index.shtml

 

ProxyPass /http-bind/ http://127.0.0.1:5280/http-bind/

 

ErrorLog "/var/log/httpd/jwchat.error_log"

 

RewriteEngine on

 

</VirtualHost>

 

-


OpenFire Settings: -

 

Server Ports Interface      Port             Type      Description All addresses      5222           Client to Server All addresses      5223           Client to Server All addresses      9090           Admin Console All addresses      9091           Admin Console All addresses      5280           HTTP Binding All addresses      8483           HTTP Binding All addresses      3478 & 3479      STUN Service All addresses      5229           Flash Cross Domain <!-- google_ad_section_end -->

 

 

-


config.js: -

var SITENAME = "jwchat.dev1.com";

 

var BACKENDS = 

[

];

 

 

Here are the logs we get from JWChat when we run it in debug mode.  They're different depending on what browser we're using:

 

 

 

 

-


IE: -

 

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

jid: testuser@jwchat.dev1.com/jwchat

pass: &lt;removed&gt;

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'iq'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'presence'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'message'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'message'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'ondisconnect'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'onconnect'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

registered handler for event 'onerror'

Friday, March 14, 2008 9:48:15 AM (level 3) func: unknown

incoming event 'onstatuschanged'

Friday, March 14, 2008 9:48:15 AM (level 3) func: unknown

incoming event 'status_changed'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

httpbase: http://jwchat.dev1.com/http-bind/domain:jwchat.dev1.com

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

1: b30c5a02f23294fc2bbe1c5de35197c2d882f421

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

2: 60919b3eba42f9b11abcf957957061674d89f278

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

3: 058704c45b1dbc313ea934bdd4c63216bbf6cf1c

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

4: c945f2c57892239f8fa21c78a1235a316ff6aa78

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

5: 9cad1be271d3dbea1e597f389fbdd8168bc51f0a

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

6: e11e305f00fce25566b53c6038d701913cce0ff7

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

7: d94bf59372939a02c85ff0b444dc3489a6758324

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

8: 40cba61f0657ea19d78ed781d8a116c9d9648719

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

9: e9519dae8990ec93d592a78ef7f98719a6e829e3

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

10: 9586c330647e4c5e2baeff52734df0bd78614759

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

11: 6be7149240de6fb9f0090f512f408018ed65d6fa

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

12: b34beb92bdfc68f940af44dce3d8888a26eb4760

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

13: 6ea96658073cfb534b9801d064beb6d2b3c9312a

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

14: 886c14f49691b9dccc69e4d5b41ff58c57bc2914

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

15: a4a54aa6b3ab9244a71a4e920b9c3d47f51d0f3d

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

&lt;body hold='1' xmlns='http://jabber.org/protocol/httpbind'

to='jwchat.dev1.com' wait='300' rid='171828'

route='xmpp:jwchat.dev1.com:8080'

newkey='a4a54aa6b3ab9244a71a4e920b9c3d47f51d0f3d' ver='1.6'

xmpp:xmlns='urn:xmpp:xbosh' xmpp:version='1.0'/&gt;

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

async recv: &lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;

&lt;html&gt;&lt;head&gt;

&lt;title&gt;404 Not Found&lt;/title&gt;

&lt;/head&gt;&lt;body&gt;

&lt;h1&gt;Not Found&lt;/h1&gt;

&lt;p&gt;The requested URL /http-bind/ was not found on this server.&lt;/p&gt;

&lt;p&gt;Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.&lt;/p&gt;

&lt;/body&gt;&lt;/html&gt;

 

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

Date: Fri, 14 Mar 2008 14:48:15 GMT 

Server: GetLost/1.0 

Content-Length: 327 

Keep-Alive: timeout=15, max=100 

Connection: Keep-Alive 

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

 

 

Friday, March 14, 2008 9:48:15 AM (level 4) func: unknown

&lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;

&lt;html&gt;&lt;head&gt;

&lt;title&gt;404 Not Found&lt;/title&gt;

&lt;/head&gt;&lt;body&gt;

&lt;h1&gt;Not Found&lt;/h1&gt;

&lt;p&gt;The requested URL /http-bind/ was not found on this server.&lt;/p&gt;

&lt;p&gt;Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.&lt;/p&gt;

&lt;/body&gt;&lt;/html&gt;

 

Friday, March 14, 2008 9:48:15 AM (level 1) func: unknown

initial response broken (status: 404)

Friday, March 14, 2008 9:48:15 AM (level 3) func: unknown

incoming event 'onerror'

Friday, March 14, 2008 9:48:15 AM (level 2) func: unknown

handling event 'onerror'

 

-


Firefox: -

 

Friday, March 14, 2008 9:37:53 AM (level 2) func: init

jid: testuser@jwchat.dev1.com/jwchat

pass: &lt;removed&gt;

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'iq'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'presence'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'message'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'message'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'ondisconnect'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'onconnect'

Friday, March 14, 2008 9:37:53 AM (level 2) func: unknown

registered handler for event 'onerror'

Friday, March 14, 2008 9:37:53 AM (level 3) func: unknown

incoming event 'onstatuschanged'

Friday, March 14, 2008 9:37:53 AM (level 3) func: unknown

incoming event 'status_changed'

Friday, March 14, 2008 9:37:53 AM (level 2) func: JSJaCHBCConnect

httpbase: http://jwchat.dev1.com/http-bind/domain:jwchat.dev1.com

Friday, March 14, 2008 9:37:53 AM (level 1) func: JSJaCHBCSetupRequest

Permission denied to call method XMLHttpRequest.open

Friday, March 14, 2008 9:37:53 AM (level 4) func: JSJaCKeys

15: 639a72a7a4a72ff01bfd02ced59359d27762acea

Friday, March 14, 2008 9:37:54 AM (level 4) func: JSJaCHBCConnect

&lt;body hold='1' xmlns='http://jabber.org/protocol/httpbind'

to='jwchat.dev1.com' wait='300' rid='872669'

route='xmpp:fenmrdev01.maritz.com:5280'

newkey='639a72a7a4a72ff01bfd02ced59359d27762acea' ver='1.6'

xmpp:xmlns='urn:xmpp:xbosh' xmpp:version='1.0'/&gt;

 

So, in Firefox I get an XMLHttpRequest.open error, and in IE I get a 404 error on /http-bind/<!-- google_ad_section_end -->

 

 

Sabine Dinis Blochberger Gold 285 posts since
Oct 21, 2005
Currently Being Moderated
Mar 18, 2008 5:12 AM in response to: bearcathk
Re: Openfire 3.4.5 with JWChat

Try setting httpbase in config.js to only /http-bind/ .

Sabine Dinis Blochberger Gold 285 posts since
Oct 21, 2005
Currently Being Moderated
Mar 18, 2008 7:42 AM in response to: bearcathk
Re: Openfire 3.4.5 with JWChat

Hm, sorry. The above post is a little hard to read because of the bright green font. You can also format the code parts using tags (see help).

 

Anyway, the error seems to be in your Apache configuration (since it's Apache giving the error).

 

If you try to access bla.yoursite.com:binding_port (no /http-bind/), you should get a page saying something like "Openfire HTTP binding".

Sabine Dinis Blochberger Gold 285 posts since
Oct 21, 2005
Currently Being Moderated
Mar 19, 2008 5:16 AM in response to: bearcathk
Re: Openfire 3.4.5 with JWChat

You did change the binding port in Openfire to 5280?

 

Does the 404 say Apache or jetty? if it's jetty, it means it's Openfire responding.

 

Here's the example from my (now very old) how-to:


LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost *:9000>
  Servername jabber.myserver.com
  DocumentRoot WebRoot/jwchat
  AddDefaultCharset UTF-8

  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  
  ProxyPass /JHB/ http://jabber.myserver.com:port/JHB/
  ProxyPassReverse /JHB/ http://jabber.myserver.com:port/JHB/
  
</VirtualHost>

 

and config.js:


var SITENAME = "jabber.myserver.com"
var DEFAULTCONFERENCESERVER = "conference.jabber.myserver.com";
var DEBUGJID = "admin@jabber.myserver.com"; // which user get's debug messages

var BACKENDS = 
[
  {
    name:"My server",
    description:"HTTP Binding backend of my server",
    httpbase:"/JHB/",
    type:"binding",
    default_server: SITENAME,
    servers_allowed: 
  }
];

var timerval = 2000; // poll frequency in msec

 

Edit: in your setup you have to access to http://server.com:8080/http-bind/

alan Bronze 1 posts since
Mar 19, 2008
Currently Being Moderated
Mar 19, 2008 1:24 PM in response to: bearcathk
Re: Openfire 3.4.5 with JWChat

 

 

 

I work with bearcathk, and we are trying to see what could possibly give us the mod_include errors in apache although mod include was defined and loaded, yet we get jwchat errors.

 

 

Our latest debug info indicates the following when trying to simply update the status on the jwchat pop-up.

 

 

Wednesday, March 19, 2008 1:13:02 PM (level 2) func: unknown httpbase: /JHB/domain:jwchat.dev1.com   [

 

 

Wednesday, March 19, 2008 1:13:02 PM] (level 4) func: unknown &lt;body hold='1' xmlns='http://jabber.org/protocol/httpbind' to='jwchat.dev1.com' wait='300' rid='122116' route='xmpp:jwchat.dev1.com:8080' newkey='892ed58ef4062ce80a0342b5238e29bc17255db2' ver='1.6' xmpp:xmlns='urn:xmpp:xbosh' xmpp:version='1.0'/&gt;

 

 

Some additional things to be noted;

 

 

We have dedicated proxy servers in DMZ so proxy pass is not really needed but I have tried with and without it - same error. Is there something in the Jabber configuration that needs to be included for JWChat or vice versa in order for us to get this to work.

 

 

 

 

Any help is appreciated. Thanks.

 

 

Sabine Dinis Blochberger Gold 285 posts since
Oct 21, 2005
Currently Being Moderated
Mar 20, 2008 5:07 AM in response to: alan
Re: Openfire 3.4.5 with JWChat

Ah yea. Replace /JHB/ with /http-bind/ in all instances, as that example was using a servlet still (Wildfire did not support HTTP binding at the time). And IIRC this can't be customized in Openfire.

 

It's a little confusing that you use the default HTTP binding port for yur virtual host instead, but it should work regardless (unless there's some bug in Openfire and changing its HTTP binding port)...

 

You shouldn't have to worry about Openfire at all in setting up JwChat with Apache. Apache needs to redirect requests to the right /http-bind/.

 

Keep at it. Once it's running you'll wonder why it was being so difficult

Andres Mujica Bronze 20 posts since
Mar 28, 2008
Currently Being Moderated
May 4, 2008 3:11 PM in response to: bearcathk
Re: Openfire 3.4.5 with JWChat

 

Hi i've managed to get working jwchat....

 

 

 

 

My  http-bind config is described here

 

 

 

 

http://www.igniterealtime.org/community/thread/32418

 

 

 

 

with this i could make sparkweb work.

 

 

Now for jwchat this is the config i'm using:

 

 

 

 

in config.js

 

 

var SITENAME = "mychatserver";

 

 

 

 

var BACKENDS =

[

             &n bsp;  ,

 

 

in  jsjacs.js

 

 

var JSJACHBC_USE_BOSH_VER  = false; //true

 

 

and removed all the charset='utf-8ยด instances for that file (not pretty sure if this is needed..)

 

 

in jwchat.html

 

 

     oArg.authtype = 'nonsasl';

        con.connect(oArg);

 

 

And it worked automagically...

 

 

I've got some bits for this from here:

 

 

http://www.linuxquestions.org/questions/linux-server-73/authentication-error-ope nfirejwchat-http-binding-612818/

 

 

 

 

hope it helps

 

 

More Like This

  • Retrieving data ...