JWChat client, 502 Bad Gateway

Hi all,

I’m trying to setup an OpenFire chat server. To test out my OpenFire chat server, I downloaded and tested the Spark desktop client and also was able to install and test the SparkWeb client. So my OpenFire chat server is functioning at least for those to clients. Right now I’m prototyping the JWChat client. I’ve been mucking around with it on and off for the past week and can’t get it to work. I think I have some fundamental problem but not sure what it could be. I think I have a binding problem but not sure how to debug or what to try next. I’ve posted/searched in the JWChat forums on sourceforge.net along with searching all over google and these forums and still can’t get it to work. But in the process of reading all the countless threads/discussions/howtos, I’ve tried dozens of different things. So I’ll try to explain my current configuration as best I can along with the current issue I’m seeing. Maybe someone here will be able to help me!

Setup

Server Domain http://chat.DOMAIN_A.com setup on an Amazon ec2 account
Client Domain www.DOMAIN_B.com/projects/jwchat setup on a MediaTemple gs account

**Versions
**Debian 4.0, Apache 2.0.54, JWChat 1.0, OpenFire 3.6.4

Main HowTos I used

JWChat Instructions http://blog.jwchat.org/jwchat/download/
OpenFire -> JWChat Instructions http://chromus.kajigger.com/blog/2007/03/22/making-jwchat-work-with-openfire/
OpenFire Forum http://www.igniterealtime.org/community/message/175193#175193

Apache Configuration

.htaccess http://www.DOMAIN_B.com/projects/jwchat/src

RewriteEngine On RewriteRule http-bind/ [http://chat.DOMAIN_B.com/http-bind/](http://chat.DOMAIN_B.com/http-bind/) [P]

JWChat Configuration

config.js var SITENAME = “chat.DOMAIN_B.com”;
var BACKENDS =
[
{
name:“Native Binding”,
description:“OpenFire’s native HTTP Binding backend”,
httpbase:“chat.DOMAIN_B.com/http-bind/”,
type:“binding”,
servers_allowed:[SITENAME]
}
];
var DEFAULTRESOURCE = “jwchat”;
var DEFAULTPRIORITY = “10”;
var DEFAULTCONFERENCEROOM = “Pool”;
var DEFAULTCONFERENCESERVER = “conference.”+SITENAME;
var DEBUG = true; // turn debugging on
var DEBUG_LVL = 4; // debug-level 0…4 (4 = very noisy)
var USE_DEBUGJID = false; // if true only DEBUGJID gets the debugger
var DEBUGJID = “admin@”+SITENAME; // which user get’s debug messages
var timerval = 2000; // poll frequency in msec
var stylesheet = “jwchat.css”;
var THEMESDIR = “themes”;
var GUEST_ACC = “”;
var GUEST_PWD = “”;

**OpenFire Configuration
**System Properties

xmpp.httpbind.client.requests.polling 0
xmpp.httpbind.client.requests.wait 10
HTTP-Binding Settings

Enabled
HTTP-Binding 7070
HTTP-Binding (Secure) 7443
Script Syntax

Enabled

Current Issue

When I go to the following URL, I get a 502 Bad Gateway error

http://www.DOMAIN_B.com/projects/jwchat/src/http-bind/

Bad Gateway

The proxy server received an invalid response from an upstream server.

Ugh… that was annoying. I think I found my bug.

This:


.htaccess http://www.DOMAIN_B.com/projects/jwchat/src

RewriteEngine On RewriteRule http-bind/ http://chat.DOMAIN_B.com/http-bind/ [P]

Should be:


.htaccess http://www.DOMAIN_B.com/projects/jwchat/src

RewriteEngine On RewriteRule http-bind/ http://chat.DOMAIN_B.com:7070/http-bind/ [P]

I know at one point I had the :7070 port there, all the debugging I must have accidentally removed it.

Now I get this error but reading the forums, I think this is okay.

http://www.DOMAIN_B.com/projects/jwchat/src/http-bind/

HTTP ERROR: 400

BAD_REQUEST

RequestURI=/http-bind/