Problem setting up jwchat using http://ejabberd.jabber.ru/jwchat

I am trying to get jwchat working with ejabber on my Mandrake 10 box.

I have ejabber up and running -
Erlang (BEAM) emulator version 5.4.5
ejabberd 0.9
apache -
Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6mdk)
mod_perl/1.99_11 Perl/v5.8.3 mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4

I also have jwchat up and running. I am able to access it by going to chat.clamlinux.com and I can login. The prolem is, I am not logging into anything. The ejabber web admin shows nobody logged in, and I can use any username password combination I choose. Also, I cannot communicate with other users.

The best clue that I have to what is going on is an error in my apache log:

[Wed May 11 11:34:03 2005] [error] [client 192.168.23.100] 
  client denied by server configuration: proxy:http://clamlinux.attap.com:5280/http-poll/

Here is the relevant section of my httpd2.conf file:

<IfModule mod_proxy.c>
    ProxyRequests Off
    ProxyPass /var/www/jwchat/htdocs/http-poll/ http://chat.attap.com:5280/http-poll/
    <Directory proxy:*>
        Order Deny,Allow
        Deny from all
        Allow from all
   </Directory>
</IfModule>

Options +MultiViews

NameVirtualHost *:80

<VirtualHost *:80>
 ServerName clamlinux.attap.com
 DocumentRoot /var/www/html/
 AddDefaultCharset UTF-8
</VirtualHost>


<VirtualHost *:80>
  Servername chat.attap.com
  DocumentRoot /var/www/jwchat/htdocs
  AddDefaultCharset UTF-8
  RewriteEngine On
  RewriteRule ^/http-poll/ http://clamlinux.attap.com:5280/http-poll/ [P]
  <Directory /var/www/jwchat/htdocs>
    Options +MultiViews
  </Directory>
</VirtualHost>

Any help is appreciated!
Peter

So, the URL where ejabberd

So, the URL where ejabberd is listening for HTTP-Poll connections is http://clamlinux.attap.com:5280/http-poll/ , right? This means that your Jabber server is clamlinux.attap.com.

If that is right, try to login with a 'desktop' client using HTTP-Poll (Psi and Tkabber allows this possibility). If it succeded, check what appears on the ejabberd log, and then compare that with the logs when jwchat tries.

I installed psi, but can't

I installed psi, but can't get it to connect either. Any help is appreciated. This technology seems awesome, if only I can get it working properly!

The account is:
admin@clamlinux.attap.com
Resource: HTTP-Poll
Priority: 5

The rest I left as default values.

When I try to connect I get the error: There was an error communicating with the jabber server: Details: Authentication Error: Not Authorized.

This is what I get in the terminal where I ran ejabberd:
=INFO REPORT==== 11-May-2005::18:29:01 ===
I(<0.214.0>:ejabberd_listener:90): (#Port<0.285>) Accepted connection {{192,168,23,100},34648} -> {{192,168,23,100},5222}

=INFO REPORT==== 11-May-2005::18:29:01 ===
I(<0.287.0>:ejabberd_c2s:368): (#Port<0.285>) Failed legacy authentication for admin@clamlinux.attap.com/HTTP-Poll

Here is the ejabberd.cfg:

% $Id: ejabberd.cfg.example 314 2005-04-18 18:41:57Z alexey $

override_acls.

% Users that have admin access. Add line like one of the following after you
% will be successfully registered on server to get admin access:
%{acl, admin, {user, "aleksey"}}.
{acl, admin, {user, "admin", "clamlinux"}}.
%{acl, admin, {user, "peter"}}.

% Blocked users:
%{acl, blocked, {user, "test"}}.

% Local users:
{acl, local, {user_regexp, ""}}.

% Another examples of ACLs:
%{acl, jabberorg, {server, "jabber.org"}}.
%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
%{acl, test, {user_regexp, "^test"}}.
%{acl, test, {user_glob, "test*"}}.

% Only admins can use configuration interface:
{access, configure, [{allow, admin}]}.

% Every username can be registered via in-band registration:
{access, register, [{allow, all}]}.

% After successful registration user will get message with following subject
% and body:
{welcome_message,
{"Welcome!",
"Welcome to Jabber Service. "
"For information about Jabber visit http://jabber.org"}}.
% Replace them with 'none' if you don't want to send such message:
%{welcome_message, none}.

% List of people who will get notifications about registered users
{registration_watchers, ["peter@attap.com"]}.

% Only admins can send announcement messages:
{access, announce, [{allow, admin}]}.

% Only non-blocked users can use c2s connections:
{access, c2s, [{deny, blocked},
{allow, all}]}.

% Set shaper with name "normal" to limit traffic speed to 1000B/s
{shaper, normal, {maxrate, 1000}}.

% Set shaper with name "fast" to limit traffic speed to 50000B/s
{shaper, fast, {maxrate, 50000}}.

% For all users except admins used "normal" shaper
{access, c2s_shaper, [{none, admin},
{normal, all}]}.

% For all S2S connections used "fast" shaper
{access, s2s_shaper, [{fast, all}]}.

% Admins of this server are also admins of MUC service:
{access, muc_admin, [{allow, admin}]}.

% All users are allowed to use MUC service:
{access, muc, [{allow, all}]}.

% This rule allows access only for local users:
{access, local, [{allow, local}]}.

% Authentification method. If you want to use internal user base, then use
% this line:
{auth_method, internal}.

% For LDAP authentification use these lines instead of above one:
%{auth_method, ldap}.
%{ldap_servers, ["localhost"]}. % List of LDAP servers
%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory

% For authentification via external script use the following:
%{auth_method, external}.
%{extauth_program, "/path/to/authentification/script"}.

% For authentification via ODBC use the following:
%{auth_method, odbc}.
%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.

% Host name:
{hosts, ["clamlinux.attap.com"]}.

% Default language for server messages
{language, "en"}.

% Listened ports:
{listen,
[{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper},
starttls, {certfile, "./ssl.pem"}]},
{5223, ejabberd_c2s, [{access, c2s},
tls, {certfile, "./ssl.pem"}]},
% Use these two lines instead if TLS support is not compiled
%{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]},
%{5223, ejabberd_c2s, [{access, c2s}, ssl, {certfile, "./ssl.pem"}]},
{5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]},
{5280, ejabberd_http, [http_poll, web_admin]},
{8888, ejabberd_service, [{access, all},
{hosts, ["icq.localhost", "sms.localhost"],
[{password, "secret"}]}]}
]}.

% If SRV lookup fails, then port 5269 is used to communicate with remote server
{outgoing_s2s_port, 5269}.

% Used modules:
{modules,
[
{mod_register, [{access, register}]},
{mod_roster, []},
{mod_privacy, []},
{mod_configure, []},
{mod_configure2, []},
{mod_disco, []},
{mod_stats, []},
{mod_vcard, []},
{mod_offline, []},
{mod_announce, [{access, announce}]},
{mod_echo, [{host, "echo.clamlinux.attap.com"}]},
{mod_private, []},
{mod_irc, []},
% Default options for mod_muc:
% host: "conference." ++ ?MYNAME
% access: all
% access_create: all
% access_admin: none (only room creator has owner privileges)
{mod_muc, [{access, muc},
{access_create, muc},
{access_admin, muc_admin}]},
{mod_pubsub, []},
{mod_time, []},
{mod_last, []},
{mod_version, []}
]}.

% Local Variables:
% mode: erlang
% End:

Here is the log of opening the ejabber server:

Erlang (BEAM) emulator version 5.4.5 [source] [hipe]

Eshell V5.4.5 (abort with ^G)
(ejabberd@clamlinux)1>
=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.47.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.48.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.46.0>},
{name,sasl_safe_sup},
{mfa,{supervisor,
start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.49.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
application: sasl
started_at: ejabberd@clamlinux

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.53.0>},
{name,dets_sup},
{mfa,{dets_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.54.0>},
{name,dets},
{mfa,{dets_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.62.0>},
{name,mnesia_event},
{mfa,{mnesia_sup,start_event,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.64.0>},
{name,mnesia_monitor},
{mfa,{mnesia_monitor,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.65.0>},
{name,mnesia_subscr},
{mfa,{mnesia_subscr,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.66.0>},
{name,mnesia_locker},
{mfa,{mnesia_locker,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.67.0>},
{name,mnesia_recover},
{mfa,{mnesia_recover,start,[]}},
{restart_type,permanent},
{shutdown,180000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.72.0>},
{name,disk_log_sup},
{mfa,{disk_log_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.73.0>},
{name,disk_log_server},
{mfa,{disk_log_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.74.0>},
{name,pg2},
{mfa,{pg2,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.85.0>},
{name,timer_server},
{mfa,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.68.0>},
{name,mnesia_tm},
{mfa,{mnesia_tm,start,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.86.0>},
{name,mnesia_checkpoint_sup},
{mfa,{mnesia_checkpoint_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.87.0>},
{name,mnesia_snmp_sup},
{mfa,{mnesia_snmp_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.88.0>},
{name,mnesia_controller},
{mfa,{mnesia_controller,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.89.0>},
{name,mnesia_late_loader},
{mfa,{mnesia_late_loader,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.63.0>},
{name,mnesia_kernel_sup},
{mfa,{mnesia_kernel_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
application: mnesia
started_at: ejabberd@clamlinux

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,crypto_sup}
started: [{pid,<0.166.0>},
{name,crypto_server},
{mfa,{crypto_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
application: crypto
started_at: ejabberd@clamlinux

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.173.0>},
{name,ssl_server},
{mfa,{ssl_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.174.0>},
{name,ssl_broker_sup},
{mfa,{ssl_broker_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
application: ssl
started_at: ejabberd@clamlinux

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.191.0>},
{name,ejabberd_hooks},
{mfa,{ejabberd_hooks,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.192.0>},
{name,stringprep},
{mfa,{stringprep,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.195.0>},
{name,ejabberd_router},
{mfa,{ejabberd_router,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.196.0>},
{name,ejabberd_sm},
{mfa,{ejabberd_sm,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.198.0>},
{name,ejabberd_s2s},
{mfa,{ejabberd_s2s,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.201.0>},
{name,ejabberd_local},
{mfa,{ejabberd_local,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.203.0>},
{name,ejabberd_c2s_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_c2s_sup,ejabberd_c2s]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.205.0>},
{name,ejabberd_s2s_in_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_s2s_in_sup,ejabberd_s2s_in]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.206.0>},
{name,ejabberd_s2s_out_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_s2s_out_sup,ejabberd_s2s_out]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.209.0>},
{name,ejabberd_service_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_service_sup,ejabberd_service]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.210.0>},
{name,ejabberd_http_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_http_sup,ejabberd_http]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.211.0>},
{name,ejabberd_http_poll_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_http_poll_sup,ejabberd_http_poll]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_sup}
started: [{pid,<0.212.0>},
{name,ejabberd_iq_sup},
{mfa,{ejabberd_tmp_sup,
start_link,
[ejabberd_iq_sup,gen_iq_handler]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.214.0>},
{name,5222},
{mfa,{ejabberd_listener,
start,
[5222,
ejabberd_c2s,
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"./ssl.pem"}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.215.0>},
{name,5223},
{mfa,{ejabberd_listener,
start,
[5223,
ejabberd_c2s,
[{access,c2s},tls,{certfile,"./ssl.pem"}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.216.0>},
{name,5269},
{mfa,{ejabberd_listener,
start,
[5269,ejabberd_s2s_in,[{shaper,s2s_shaper}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]

=PROGRESS REPORT==== 11-May-2005::18:25:38 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.217.0>},
{name,5280},
{mfa,{ejabberd_listener,
start,
[5280,ejabberd_http,[http_poll,web_admin]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]

I got psi to work - I was

I got psi to work - I was able to register a new user, and it is communicating with ejabber properly.

owever, jwchat is still not working. I am still getting the same error in my apache error log:
[Thu May 12 11:47:54 2005] [error] [client 192.168.23.100] client denied by server configuration: proxy:http://clamlinux.attap.com:5280/http-poll/

Any help appreciated!
Peter

Solution found

I posted the solution as a reply to the original tutorial found here:

http://www.ejabberd.im/jwchat

Thanks!

Please tell me the solution

Can you please send me the solution??

Pratik

Syndicate content