11 Replies Latest reply on May 4, 2008 1:11 PM by seaq

    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: -

       

       

      (level 2) func: unknown

      jid: testuser@jwchat.dev1.com/jwchat

      pass: &lt;removed&gt;

      (level 2) func: unknown

      registered handler for event 'iq'

      (level 2) func: unknown

      registered handler for event 'presence'

      (level 2) func: unknown

      registered handler for event 'message'

      (level 2) func: unknown

      registered handler for event 'message'

      (level 2) func: unknown

      registered handler for event 'ondisconnect'

      (level 2) func: unknown

      registered handler for event 'onconnect'

      (level 2) func: unknown

      registered handler for event 'onerror'

      (level 3) func: unknown

      incoming event 'onstatuschanged'

      (level 3) func: unknown

      incoming event 'status_changed'

      (level 2) func: unknown

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

      (level 4) func: unknown

      1: b30c5a02f23294fc2bbe1c5de35197c2d882f421

      (level 4) func: unknown

      2: 60919b3eba42f9b11abcf957957061674d89f278

      (level 4) func: unknown

      3: 058704c45b1dbc313ea934bdd4c63216bbf6cf1c

      (level 4) func: unknown

      4: c945f2c57892239f8fa21c78a1235a316ff6aa78

      (level 4) func: unknown

      5: 9cad1be271d3dbea1e597f389fbdd8168bc51f0a

      (level 4) func: unknown

      6: e11e305f00fce25566b53c6038d701913cce0ff7

      (level 4) func: unknown

      7: d94bf59372939a02c85ff0b444dc3489a6758324

      (level 4) func: unknown

      8: 40cba61f0657ea19d78ed781d8a116c9d9648719

      (level 4) func: unknown

      9: e9519dae8990ec93d592a78ef7f98719a6e829e3

      (level 4) func: unknown

      10: 9586c330647e4c5e2baeff52734df0bd78614759

      (level 4) func: unknown

      11: 6be7149240de6fb9f0090f512f408018ed65d6fa

      (level 4) func: unknown

      12: b34beb92bdfc68f940af44dce3d8888a26eb4760

      (level 4) func: unknown

      13: 6ea96658073cfb534b9801d064beb6d2b3c9312a

      (level 4) func: unknown

      14: 886c14f49691b9dccc69e4d5b41ff58c57bc2914

      (level 4) func: unknown

      15: a4a54aa6b3ab9244a71a4e920b9c3d47f51d0f3d

      (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;

      (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;

       

      (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 

       

       

      (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;

       

      (level 1) func: unknown

      initial response broken (status: 404)

      (level 3) func: unknown

      incoming event 'onerror'

      (level 2) func: unknown

      handling event 'onerror'

       

      -


      Firefox: -

       

      (level 2) func: init

      jid: testuser@jwchat.dev1.com/jwchat

      pass: &lt;removed&gt;

      (level 2) func: unknown

      registered handler for event 'iq'

      (level 2) func: unknown

      registered handler for event 'presence'

      (level 2) func: unknown

      registered handler for event 'message'

      (level 2) func: unknown

      registered handler for event 'message'

      (level 2) func: unknown

      registered handler for event 'ondisconnect'

      (level 2) func: unknown

      registered handler for event 'onconnect'

      (level 2) func: unknown

      registered handler for event 'onerror'

      (level 3) func: unknown

      incoming event 'onstatuschanged'

      (level 3) func: unknown

      incoming event 'status_changed'

      (level 2) func: JSJaCHBCConnect

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

      (level 1) func: JSJaCHBCSetupRequest

      Permission denied to call method XMLHttpRequest.open

      (level 4) func: JSJaCKeys

      15: 639a72a7a4a72ff01bfd02ced59359d27762acea

      (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 -->

       

       

        • Re: Openfire 3.4.5 with JWChat

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

            • Re: Openfire 3.4.5 with JWChat

               

              Nope, no dice.

               

               

              Should I be able to pull up the http-bind directory in my browser?  i.e. should something show up when I go to jwchat.dev1.com/http-bind/? 

               

               

              For jwchat.dev1.com/http-bind/   I get a 404 error

              For jwchat.dev1.com:5280/http-bind/  I get a 400 'Bad Request' error

               

               

                • 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".

                    • Re: Openfire 3.4.5 with JWChat

                      Sorry.  Unfortunatly it won't let me edit my original post.

                       

                       

                      If I go to jwchat.dev1.com:5280, I get a 404 error.  So I guess that's an Apache problem then?  I'll try re-posting my http.conf file:

                       

                      -


                      Directory Section

                       

                       

                      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

                       

                       

                      /code

                        • 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/

                            • Re: Openfire 3.4.5 with JWChat

                              The 404 says Jetty.  So I guess that's good.

                               

                              I edited my config.js file to match yours better, but still no go.  I get 'Service Unavailable' in JWChat.  The hardware guys don't get here for another hour or so to modify the http.conf file, so I'll have them change it once they do.

                               

                              You said:

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

                               

                              I'm not quite sure what you mean.  If I go to jwchat.dev1.com:8080/http-bind/, I get the Jetty 404 error.

                              • Re: Openfire 3.4.5 with JWChat

                                OK, we updated Apache, but still no go.  Here's the results from the Apache error log:

                                 

                                 

                                [Wed Mar 19 12:39:55 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed
                                
                                [Wed Mar 19 12:39:55 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed, referer: http://jwchat.dev1.com:8080/jwchat.html
                                
                                [Wed Mar 19 12:39:55 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed, referer: http://jwchat.dev1.com:8080/jwchat.html
                                
                                [Wed Mar 19 12:39:55 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed, referer: http://jwchat.dev1.com:8080/roster.html
                                
                                [Wed Mar 19 12:39:56 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed
                                
                                [Wed Mar 19 12:39:56 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed, referer: http://jwchat.dev1.com:8080/Debugger.html
                                
                                [Wed Mar 19 12:39:56 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed, referer: http://jwchat.dev1.com:8080/Debugger.html
                                
                                [Wed Mar 19 12:40:02 2008] [warn] [client ] mod_include: Options +Includes (or IncludesN
                                
                                oExec) wasn't set, INCLUDES filter removed
                                
                                [Wed Mar 19 12:40:06 2008] [error] [client ] File does not exist: /var/www/jwchat/jwchat
                                
                                _1/JHB, referer: http://jwchat.dev1.com:8080/jwchat.html
                                
                                [Wed Mar 19 12:40:06 2008] [error] [client ] File does not exist: /var/www/jwchat/jwchat
                                
                                _1/error, referer: http://jwchat.dev1.com:8080/jwchat.html
                                

                                 

                                  • 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.

                                     

                                     

                                    (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.

                                     

                                     

                                      • 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

                                          • Re: Openfire 3.4.5 with JWChat

                                            It's been a while, but this was never resolved. Since my last message, we've moved Openfire and JWChat to a different server (the one one was just a development box). We've fiddled around with some things, and now we have a new error to deal with. Here's the current config.js:

                                             

                                            -


                                             

                                            config.js

                                            -


                                             

                                            var SITENAME = "jwchat.rpt01.com"; 
                                             
                                            var BACKENDS =  
                                            [ 
                                            { 
                                            name:"Native Binding", 
                                            description:"Ejabberd's native HTTP Binding backend", 
                                            httpbase:"http://127.0.0.1:5280/http-bind/", 
                                            type:"binding", 
                                            servers_allowed:[SITENAME] 
                                            }, 
                                            ] 
                                            

                                            -


                                             

                                            Here is the JWChat debug messages:

                                            -


                                             

                                             
                                            [Thursday, April 24, 2008 10:51:51 AM] (level 2) func: unknown 
                                            jid: dav4@jwchat.rpt01.com/jwchat 
                                            pass: <removed> 
                                            [Thursday, April 24, 2008 10:51:51 AM] (level 2) func: unknown 
                                            registered handler for event 'iq' 
                                            [Thursday, April 24, 2008 10:51:51 AM] (level 2) func: unknown 
                                            registered handler for event 'presence' 
                                            [Thursday, April 24, 2008 10:51:51 AM] (level 2) func: unknown 
                                            registered handler for event 'message' 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 3) func: unknown 
                                            incoming event 'onstatuschanged' 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 3) func: unknown 
                                            incoming event 'status_changed' 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 2) func: unknown 
                                            httpbase: http://127.0.0.1:5280/http-bind/domain:jwchat.rpt01.com 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 1) func: unknown 
                                            null 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            1: 215523228b02edfddab97bda982aa42a5a8f191f 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            2: 506f8d517971e13007b94563a60f80a5f454ffb2 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            3: cfa355a51845cc94def1236c0b7e1a87540703c5 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            4: 13f0c2c1b96d4fe0bdd122cbec920a59fcac78a6 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            5: 9c3ac50e5b32bd4e28be8890ceea5097c99c900f 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            6: eddb094036697048e45cfff831ee1ad35503913c 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            7: 2c44a39723573f4843dc0a0a54ec7a38b92c39a4 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            8: 522dc21ec226384ce2912aa10c9824e14e52a402 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            9: 9a7aa465a5a71668c06525ae59b4e7184411dbec 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            10: 43e0b77664d8bc518373f26e65dcb63c588fca3e 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            11: 2de6b2bf996050e5b862377f6d747f24c9fa89a5 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            12: 5edb23e9bbee88b8dd2c44f5ab3e8884bd47af70 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            13: fa1c18ae7fa7bf729f67a93db63fd35f97d1a021 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            14: 839d54b4ab761f40576956798576bb12b2a5fff0 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            15: 84fea5352ff7b21f2279b4393335ce6bae06daeb 
                                            [Thursday, April 24, 2008 10:51:52 AM] (level 4) func: unknown 
                                            <body hold='1' xmlns='http://jabber.org/protocol/httpbind' to='jwchat.rpt01.com' wait='300' rid='315232' newkey='84fea5352ff7b21f2279b4393335ce6bae06daeb' ver='1.6' xmpp:xmlns='urn:xmpp:xbosh' xmpp:version='1.0'></body> 
                                            

                                             

                                            Obviously the line:

                                             

                                            (level 1) func: unknown

                                            null

                                             

                                            Is not good, but what does it mean?