Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure multi-user chat for ejabberd on Centos 5. I just can't get it working.

I can use Psi to create a group chat room, but don't seem able to join it from another account.

I installed ejabberd from an rpm and have basically just configured the host name.

User-to-user instant messaging works, but not MUC. I've open ports 5222 and 5223 for SSL. Does MUC run over a different port or something?

Also, when I create the chat room on one client, I have to use service discovery in another client, and try specific nodes 1 through to 5. This is only going to be used for a small corporate messaging system, so is there anyway to get ejabberd to only create 1 node?

share|improve this question
add comment

1 Answer

It would be best to see your actual configuration, but MUCs normally have to be enabled as services. The service discovery is indeed the way to discover the MUC service and browse chat rooms, but the client should be able to bookmark them or put them on the roster for use next time.

Anyway, in /etc/ejabberd/ejabberd.cfg have you enabled mod_muc? If so, could you paste the settings. On my ejabberd server I use:

  {mod_muc,      [
                  %%{host, "conference.@HOST@"},
                  {access, muc},
                  {access_create, muc},
                  {access_persistent, muc},
                  {access_admin, muc_admin},
                  {history_size, 50},
                  {max_users, 500},
                  {default_room_options,
                        [
                          {allow_change_subj, true},
                          {allow_private_messages, true},
                          {allow_user_invites, true},
                          {anonymous, true},
                          {logging, true},
                          {members_by_default, true},
                          {persistent, true},
                          {public, true},
                          {public_list, false}
                        ]}
                 ]},
  {mod_muc_log,  [
                  {access_log, muc},
                  {dirtype, plain},
                  {dirname, room_jid},
                  {outdir, "/var/www/muclogs"},
                  {timezone, universal},
                  {spam_prevention, true}
                 ]},

In your access rules you should also include:

%% 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}]}.

It works perfectly fine for me this way. Of course you may not want the log files or so, just adjust the respective settings. The ejabberd homepage has a thorough documentation of the available options.

share|improve this answer
    
can please tell me hat what would the value of room_jid , does it <roomname>@example.com ? –  Hunt Feb 10 '12 at 14:33
    
@Hunt: to my knowledge it's a placeholder for the JID (Jabber ID) of the MUC, i.e. the room name. Form would be something like myroom@conference.mydomain.tld in the above example. –  0xC0000022L Feb 10 '12 at 15:32
    
@STAUS_ACCESS_DENIED , can you please look at this question stackoverflow.com/questions/9226737/… –  Hunt Feb 10 '12 at 16:18
    
@0xC0000022L How can I set history_size value to last login time of the member by the default?. Your answer is very helpful to me. Thanks –  redV Jun 3 at 7:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.