If Your Server Doesn’t Start
A number of likely candidates might have prevented your server from starting.
- Bad XML configuration
It is not difficult to make errors (typographical or otherwise) in the server configuration. The first line of defense is to be careful when editing your jabber.xml file. After that, the Jabber server isn’t going to be too forthcoming with information if you have broken the well-formedness of the XML:
yak:~/jabber-1.4.1$
./jabberd/jabberd -h yakConfiguration parsing using jabber.xml failedHelp is at hand in the shape of Perl and the
XML::Parsermodule, which is a wrapper around the XML parser, expat.Providing you have Perl and the
XML::Parsermodule installed, you can get expat to give you a clue where the XML is broken:yak:~/jabber-1.4.1$ perl -MXML::Parser -e 'XML::Parser->new->parsefile("jabber.xml", ErrorContext => 3)' not well-formed (invalid token) at line 47, column 35, byte 1750: be on one line, the server doesn't like it otherwise! :) --> <host><jabberd:cmdline flag="h"yak</jabberd:cmdline></host> ==================================^ <!-- This is the custom configuration section for the at /usr/local/lib/perl5/site_perl/5.6.0/i586-linux/XML/Parser.pm line 185 yak:~/jabber-1.4.1$This shows us exactly where the problem is.[4] In this case, the close-tag symbol (>) had been inadvertently removed when replacing localhost with yak.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access