This site uses cookies. Continue to use the site as normal if you are happy with this, or read more about cookies and how to manage them.

×

This site uses cookies. Continue to use the site as normal if you are happy with this, or read more about cookies and how to manage them.

×

Jabber Chat Rooms Persistence Problems

When our chat server machine was re-booted the other day some of the persistent chat rooms didn't recover correctly. Most clients got a "404" error but the owner was able to connect but always got a message saying the room was locked: This room is locked from entry until configuration is confirmed.

The machine is running Ubuntu 9.10 with jabber2 and jabber-muc and is configured to use LDAP for user authentication. There were no errors that I could see in the logs, so it was all very peculiar.

The root of the problem was, I think, down to an installation/configuration issue of the Multi-User Conference component. It uses a "spool" directory to store room related data. The directory is defined in /etc/jabberd2/muc.xml

...
/var/spool/jabber-muc/rooms/ <!-- directory containing the rooms data -->
...

I'm not sure if it was me or the install process, but /var/spool/jabber-muc was correctly owned by the user running the jabber process, but rooms was owned by root and was not writeable by the jabber process. As a result, rooms that were supposed to be persistent appeared to work fine until we needed to restart the server.

After the server restart the first client that attempted to join a previously 'persistent' room would dynamically create a new room with the same name. The process for creating a new room requires the client to complete the room's configuration before it is unlocked. In Pidgin you get a window that asks you to confirm the rooms configuration, and until that confirmation is provided, the room remains locked to all other visitors.

I suspect that after our server was restarted, a client automatically connected to some of the persistent rooms, but the configuration was not completed, so the room got into a locked state.

After changing the permissions to ensure the spool directory is writeable to the jabber process, there are now a bunch of xml files in the spool directory that describe the configuration of our rooms, and after a machine restart all the rooms remain available. Hooray!