My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
iJabWithOpenfire  

iJab, webim, jabber, xmpp, openfire, install
Updated May 6, 2010 by zhancaibao

### Important #####

Some of the below contents is only for iJab v0.1.7 and older.

How to configure rewrite rules works for iJab v 1.0 and later.

######################

#How to install iJab with Openfire.

This tutorial is based on this blog and it will guide you through the installation of the web-based Jabber client iJab 0.1.0 using a pre-generated package.

At the end, you will have iJab running using openfire's internal HTTP Bind support.

1.Configure openfire

Enable the http-binding
  1. goto openfire admin console
2) click on the "Server" tab 3) at the left bar click over HTTPBinding 4) enable http binding (caution: jetty uses by default the 8080 port, so probably its a good idea to choose another port i.e 8181)

With these options the URL for http-bind in your server will be: http://jabber.mycompany.com:8181/http-bind/

2.Download iJab

Download a pre-generated package of iJab and unpack it.

3.Configure iJab

You could using iJab.html or just copy contents you needed to your own html page. Config the variables according to your settings.

   var host = "samespace.anzsoft.com";
   var port = 5222;
   var domain = "anzsoft.com";

Copy iJab to www root directory.

Now you can copy the iJab directory to its final destination. On Linux it could be /var/www/iJab/ according to which web server you choose.

4.Setup webserver

You have to setup your web server, for example Apache, so that it redirects requests from the http-bind URL to an HTTP-Bind capable Jabber server component.

Those instructions are for Apache 2.

.htaccess

The easiest way to make redirection is creating a .htaccess file in the iJab directory with this content:

AddDefaultCharset UTF-8
Options +MultiViews
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule http-bind/ http://jabber.mycompany.com:8181/http-bind/ [P]
</IfModule>

In your Apache configuration file (/etc/apache2/apache2.conf) you must enable .htaccess files and proxy options:

<Directory "/var/www/iJab">
        AllowOverride All
</Directory>

Finally, enable rewrite and proxy modules for Apache:

cd /etc/apache2
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/
ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/

virtual host

<VirtualHost *:8001>
  ServerName www.mycompany.com
  DocumentRoot /var/www/html
  <Directory /var/www/html/iJab>
    Options +Indexes +Multiviews
  </Directory>
  AddDefaultCharset UTF-8
  RewriteEngine on
  RewriteRule http-bind/ http://jabber.mycompany.com:8181/http-bind/ [P]
</VirtualHost>

Restart your web server so changes take effect: apache2ctl restart

And now you can open your browser in the URL (maybe similar to http://www.mycompany.com/iJab/).

Something About JsJac with openfire http-bind

If it couldn't work, please search on openfire's forum.
  1. Christian Beckmann always got a "UserName or password error!" after install iJab. Using debug it found the problem was javax.security.sasl.SaslException: DIGEST-MD5: digest response format violation. Incompatible charset value: utf-8�� ".
  2. http://www.igniterealtime.org/community/message/156357#185787 gives the info how to fix this problem.
Welcome to share your experience configuring iJab.
Comment by moise...@gmail.com, Feb 20, 2010

Anybody has tested MUC with Ijab + OpenFire??

Comment by smg9...@gmail.com, Mar 3, 2010

I've got iJab 0.1.7 working with OpenFire? 3.6, but I do have a few questions (listed in decreasing importance) that might streamline my installation:

(1) Because I want my users to appear as "user@domain.name" but OpenFire? is running on "host.domain.name", I've defined "var host" and "var domain" separately in my index.html. The glitch is that users have to manually check the "More options" box on the login page to get access to the server. Without that box checked the "UserName? or password error" message appears. Is there any way to get the appropriate parameters passed without checking the "More options" box (or at least to have the box appear checked by default)?

(2) I'd like to (a) shrink the height of the roster box that appears after login, and (b) move it to the left side of the screen. I've tried monkeying around with iJab.css but haven't made much progress. Any suggestions would be gratefully welcomed.

(3) Is it necessary to keep all of ...cache.html files, or can some of them be deleted (I've already confirmed that I can't delete all of them)?

TIA,

Seth Green

Comment by project member zhancaibao, Mar 14, 2010

To smg9567,

(1) you need to modify openfire's config to let it serve domain.name.
(2) you should try your best on iJab.css.
(3) yes, it's GWT compiled for different borwsers.

Zhan

Comment by lerfranc...@gmail.com, Apr 22, 2010

If you get the following (No protocol handler was valid for the URL /http-bind/) then apply the following:

a) Enable Allow from <host> in your proxy.conf b) ln -s /etc/apache2/mods-available/proxy_http.load/etc/apache2/mods-enabled/

fleroux

Comment by venc...@gmail.com, May 5, 2010

Hello,I canot make it work. I use openfire 3.6.4 and http-bind at port 7070.And when I try to login with ijab,I got 400 error.I just change these lines with ijab config:

domain:"ip",
        http_bind:"http://ip:7070/http-bind/",
        host:"ip",
        port:5222,//try 7070 too
        server_type:"Openfire",
Comment by project member zhancaibao, May 5, 2010

To vencent,

change http_bind:"http://ip:7070/http-bind/" to http_bind:"/http-bind" and then set rewrite rules or proxy for /http-bind request to http://ip:7070/http-bind/

Comment by venc...@gmail.com, May 5, 2010

So I do what you said.And it now return bad request.The request was:

Request URL:http://myurl/http-bind
Request Method:POST
Status Code:400 Bad Request
Request Headers
Cache-Control:max-age=0
Content-Type:application/xml
Origin:http://myurl
Referer:http://myurl/chat/iJab.html
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2 ChromePlus/1.3.9.0
Request Payload
 <body content='text/xml; charset=utf-8' hold='1' requests='2' rid='926527' to='myip' ver='1.6' cache='on' wait='30' xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh' secure='false' xmpp:version='1.0' route='xmpp:myip:7070'/>
Response Headers
Connection:close
Content-Length:226
Content-Type:text/html; charset=iso-8859-1
Date:Wed, 05 May 2010 16:18:48 GMT
Server:Apache/2.2.15 (Win32) PHP/5.2.13

And the response is:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
Comment by project member zhancaibao, May 5, 2010

To Vencent,

What's your webserver and how do you config rewrite and proxy for http-bind request?
For more help, go to www.ijab.im and ask qeustion there.

Zhan

Comment by venc...@gmail.com, May 6, 2010

I use openfire 3.6.4 and http-bind at port 7070.And I deploy ijab in apache2 with mod_rewrite config:

AddDefaultCharset UTF-8
Options +MultiViews

RewriteEngine On
RewriteBase /
RewriteRule http-bind/ http://myip:7070/http-bind/ [PT]

ijab config:

xmpp:{
domain:"mydomain",
http_bind:"/http-bind/",
host:"ip",
port:5222,
server_type:"Openfire",
...
}
Comment by venc...@gmail.com, May 6, 2010

oh no,I have made it work.My rewrite config got a mistake. change this :

RewriteRule http-bind/ http://myip:7070/http-bind/ [PT]

to:

RewriteRule http-bind/ http://myip:7070/http-bind/ [P]

then it works.

Comment by venc...@gmail.com, May 6, 2010

But after login success,it begin to get

<body><h2>HTTP ERROR: 404</h2><pre>Invalid SID.</pre> 

error.I use chrome develop tool and i am sure the sid sended always same.

Comment by cjbro...@gmail.com, May 6, 2010

i have the same problem however im using iis. i have created a folder "http-bind" in the web root and within iis set a redirect to http://ip:7070/http-bind/. I am using firebug to see what exactly is going on. It makes the first POST request to http://localhost/http-bind which returns a 302 response. However then I get a 400 Bad Request error on the http://ip:7070/http-bind/ request that it makes as a result of the redirect i setup on this folder. Can some please explain why I cant just make a request directly to http://ip:7070/http-bind/ and why the redirect is required. - Or alternativly give me an idea what im doing wrong?

Thanks for your help.

Chris

Comment by aralking, May 6, 2010

I not have any solution I try and try with openfire and never get solve. I see all the post in Google and nothing. Really I not have more ideas

Comment by project member zhancaibao, May 6, 2010

About Invalid SID error in openfire:

I'm sure there's something different in openfire's http-bind server and we have tried to find what's wrong, but not got it. I think maybe we have to do some patch to openfire, but we don't have time to do it now. I hope somebody could debug openfire with ijab and try to find what's the real problem.
You need build openfire yourself for debugging it.

Zhan

Comment by venc...@gmail.com, May 7, 2010

Maybe it is jsjac's problem.I google that and found a bug report at #62

Comment by eddiehan...@gmail.com, Jun 3, 2010

Bump, how to configure with new version

Comment by anthonyy...@gmail.com, Jun 17, 2010

Apparently openfire http-bind server does not support the GET method so you can not use an absolute path for the http-bind url. Havent tested this yet will when I have the chance. I have been messing around with this for to long.

Comment by deniz.re...@gmail.com, Jul 27, 2010

Anybody know how to setup openfire 3.6.4 and iJab 0.1.7 to work with anonymous logins just like the demo page?

Comment by djy.maos...@gmail.com, Aug 5, 2010

how to make the search/add work well?

Comment by jame...@gmail.com, Aug 31, 2010

I got Openfire 3.6.4 to work with iJab 1.0-beta3-2. Replace HOSTNAME with your web server hostname and DOMAINNAME with the domain to login with.

iJab config:

domain:"DOMAINNAME",
http_bind:"http://HOSTNAME/http-bind/",
host:"HOSTNAME",
port:5222,
server_type:"openfire",
enable_muc:true,
muc_servernode:"conference.DOMAINNAME",

Apache configuration:

<IfModule mod_proxy.c>
  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyVia On

  # XMPP proxy rule
  ProxyPass /http-bind http://localhost:7070/http-bind/
  ProxyPassReverse /http-bind http://localhost:7070/http-bind/
  ProxyPass /https-bind http://localhost:7443/http-bind/
  ProxyPassReverse /https-bind http://localhost:7443/http-bind/

  AddDefaultCharset UTF-8
</IfModule>
Comment by jmgarrid...@gmail.com, Sep 6, 2010

Hello, i probe this, but not works. Can you help me?. I use a Centos 5.4 but i don't know whats modules i need to install for apache works fine with this. I put this configuration in my httpd.conf:

<IfModule? mod_proxy.c>

ProxyRequests? Off <Proxy >
Order deny,allow Allow from all
</Proxy> ProxyVia? On

  1. XMPP proxy rule
ProxyPass? /http-bind http://localhost:7070/http-bind/ ProxyPassReverse? /http-bind http://localhost:7070/http-bind/ ProxyPass? /https-bind http://localhost:7443/http-bind/ ProxyPassReverse? /https-bind http://localhost:7443/http-bind/
AddDefaultCharset? UTF-8

</IfModule>

but don't work, maybe i need to installs some module to apache but i don't know who and how install. Thanks.

Comment by claytonh...@gmail.com, Sep 17, 2010

I'm using IIS 6.0. Openfire shows the log under warnings: "Error parsing user request." Anybody having this problem or know what I'm not setting up correctly in IIS 6.

Comment by eran...@gmail.com, Oct 9, 2010

is there anyone that success to config ijab on server 2003 on iis? I spend days for this

Comment by kamlesh....@gmail.com, Oct 13, 2010

I am getting difficulties while configuring ijab and openfire. I have installed openfire. I tried to follow things for configuration but could not. Also I have checked http-bind port on openfire server on 7070 port. And when I access http://localhost:7070/http-bind it gives me 404 error. I am first making it work on my local environment. So can anybody tell me what should be in config file of ijab?

Thanks.

Comment by egateonl...@gmail.com, Oct 25, 2010

postback problem at persist-all-min.js ???

Comment by kamlesh....@gmail.com, Oct 25, 2010

Finally I have configured ijab with openfire with group chat. Block Any user not working... or I am missing any thing???

Does it support File transfer? Can any body tell me? how I can customize the UI and some functionality. From js files its getting very much difficult to understand code. Is there any documentation available for this?? How this ijab client work???

Please help me ...

Comment by davem.2...@gmail.com, Dec 19, 2010

anyone willing to setup an openfire server with ijab for me will pay if needed

Comment by wlode...@gmail.com, Jan 19, 2011

can we set the size of the chat window?

Comment by triax...@gmail.com, Feb 20, 2011

iJab with nginx is dead simple. Configure OpenFire? for http-bind then the nginx config is simply:

location = /http-bind/ {
proxy_pass http://<your_jabber_server>:<http_bind_port>;
}
Comment by oliver.f...@gmail.com, Feb 27, 2011

:> great. i have 2 servers with it . one is apache and teh second is nginx both working. but: in ie9 if a bug with the login. after refresh he is disconnected. Any input?

Comment by aralking, Mar 25, 2011

Uhmm I get always in Openfire error logs 2011.03.26 01:45:04 Error parsing user request. Any idea why? I never login with Ijab. Openfire 3.7.0

Comment by stelmoba...@gmail.com, Apr 10, 2011

If you use this configuration like Jame said,

iJab config:

domain:"DOMAINNAME",

http_bind:"http://HOSTNAME/http-bind/",

host:"HOSTNAME",

port:5222,

server_type:"openfire",

enable_muc:true,

muc_servernode:"conference.DOMAINNAME",

Apache configuration:

<IfModule? mod_proxy.c>

ProxyRequests? Off
<Proxy >
Order deny,allow Allow from all
</Proxy>

ProxyVia? On

# XMPP proxy rule

ProxyPass? /http-bind http://localhost:7070/http-bind/

ProxyPassReverse? /http-bind http://localhost:7070/http-bind/

ProxyPass? /https-bind http://localhost:7443/http-bind/

ProxyPassReverse? /https-bind http://localhost:7443/http-bind/

AddDefaultCharset??? UTF-8

</IfModule>

Then you need enable this module:

ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load

Comment by stelmoba...@gmail.com, Apr 10, 2011

With the configuration above I could get Ijab connected to Openfire but I cant get the roster.

Comment by daniel.o...@gmail.com, Aug 1, 2011

I'd like to know if exists any iJab configuration to automatic show conference room invitations.

At this time I can create a conference room, but when I invite a iJab user, he never knows...

thanks.

Comment by kra...@gmail.com, Sep 9, 2011

I try to configure the redirection without Apache, only with Tomcat and the UrlRewriteFilter? but I don't know exactly how to do that.

Anybody can help me?

Thanks

Comment by vt.ye...@gmail.com, Oct 11, 2011

I have configured iJab, roster works but i cannot search for more people to add to the roster, I have configured the vcard_search_servernode to point to search.<openfireserver> which enables the pop up for searching but nothing happens when I enter details to search on. Anyone know how this is supposed to work??

Comment by kumarbh...@gmail.com, Nov 22, 2011

i have configured ijab and working fine, but now i trying to send invitation to the other user its not happening ,.. can u help me in that..


Sign in to add a comment
Powered by Google Project Hosting