oreilly.comSafari Books Online.Conferences.
Articles Radar Books  

Installing the Jabber Server
Pages: 1, 2, 3, 4

Starting and Stopping the Jabber Server

At this stage, we have a Jabber server with enough basic configuration to be able to start it up and have it do something useful (like accept client connections). If you're curious about the rest of the configuration you encountered while editing the jabber.xml file, you can jump to Chapter 4. Otherwise, let's start it up!

Starting the Server

The basic invocation looks like this:

yak:~/jabber-1.4.1$ ./jabberd/jabberd

but if you haven't bothered to change localhost anywhere in the configuration (as described earlier), you can use the -h switch to specify the hostname:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak

As it stands, there's a directive in the standard jabber.xml configuration file that specifies that any server error messages are to be written out to STDERR:

<log id='elogger'>
  <format>%d: [%t] (%h): %s</format>

So either comment the directive out:

Or redirect STDERR to /dev/null:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak 2>/dev/null

You won't lose the error messages -- as you can see they're also written to the error.log file.

Assuming you wish to free up the terminal session after starting the server, you can send it to the background:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak 2>/dev/null &

Connecting a Client

Once the server is started, you're ready to start up a client and make a connection. The thing to rcodecodeber at this point, when specifying which server to connect to, is to use the same hostname as you specified in the <host/> part of the configuration, described earlier in "Configuring the Jabber Server."

NOTE: If your client supports the <alias/> mechanism, described in the section "Customer Configuration" in Chapter 4, this may not be necessary.

Stopping the Server

To stop the server, just kill the processes, and it will shut down:

yak:~/jabber-1.4.1$ killall jabberd


yak:~/jabber-1.4.1$ kill `cat jabber.pid`

jabberd Command-Line Switches

We've seen the -h switch to specify the host when starting the server up. There are other switches available on the command line, too; they are listed in Table 3-1.

Table 3-1. Command-line switches


Relating to



Alternate configuration

Use this to specify an alternative configuration file if you don't want to use jabber.xml.


Debugging info

Specifying this switch will cause (a large amount of) debugging information to be sent to STDERR.



The hostname of the Jabber server.


Home folder

Used to specify "home" folder or directory.


Spool area

The directory where the Jabber server stores data via the xdb_file module.


Show version

Reports Jabber server version and exits.


Show version

Same as -v.


Debugging info

Limits the debugging information to certain "zones" (comma-separated).[3]

Starting the Jabber server with any unrecognized switches will cause it to show you a list of valid switches:

[yak: ~/jabber-1.4.1]$ ./jabberd/jabberd -badswitch
jabberd &
 Optional Parameters:
 -c             configuration file
 -D             enable debug output
 -H             location of home folder
 -v             server version
 -V             server version

Yes, the list that it shows isn't complete. If the common switch -h were present in the list, we could almost consider the unlisted switches as undocumented, but it isn't present, so we won't.

Pages: 1, 2, 3, 4

Next Pagearrow

P2P Weblogs

Richard Koman Richard Koman's Weblog
Supreme Court Decides Unanimously Against Grokster
Updating as we go. Supremes have ruled 9-0 in favor of the studios in MGM v Grokster. But does the decision have wider import? Is it a death knell for tech? It's starting to look like the answer is no. (Jun 27, 2005)

> More from O'Reilly Developer Weblogs

More Weblogs
FolderShare remote computer search: better privacy than Google Desktop? [Sid Steward]

Data Condoms: Solutions for Private, Remote Search Indexes [Sid Steward]

Behold! Google the darknet/p2p search engine! [Sid Steward]

Open Source & The Fallacy Of Composition [Spencer Critchley]