Confused about nodes and hostnames

I have successfully compiled ejabberd on a Redhat Linux box and it seems to run well enough to let me create new users - even from the outside world so DNS, host names, routing, firewalls, etc. are all working properly.

However, I'm really confused about the terminology about NODEs and that's causing me various problems. Somehow it seems my system is not configured to use fully qualified host names, and I can't figure out how to do that.

I have a public server so it has a real name like jabber.mydomain.com

The host name is defined in the config file like this:

% Host name:
{hosts, ["jabber.mydomain.com"]}.

I start ejabberd with this script:

#!/bin/bash

erl -pa /var/lib/ejabberd/ebin \
-name ejabberd@jabber.mydomain.com \
-s ejabberd \
-ejabberd config \"/etc/ejabberd/ejabberd.cfg\" \
log_path \"/var/log/ejabberd/ejabberd.log\" \
-sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} \
-mnesia dir \"/var/lib/ejabberd/spool\" \
-detached

The ejabberdctl script contains this:

#!/bin/sh
exec erl -pa /var/lib/ejabberd/ebin -noinput -sname ejabberdctl -s ejabberd_ctl -extra $@

So now I'm thinking that my NODE name is ejabberd@jabber.mydomain.com but when I do this:

ejabberdctl ejabberd@jabber.myjabber.com status

All I get is errors like this:

Can't get node 'ejabberd@jabber.usabusiness.net' status: nodedown

=ERROR REPORT==== 23-Sep-2005::23:06:44 ===
** System NOT running to use fully qualified hostnames **
** Hostname jabber.mydomain.com is illegal **

Everything else I try to do with ejabberctl gives the same kind of errors.

I also have to import a bunch of users from an old jabberd 1.4.x system. I've tried, but again, without the proper node name it doesn't work.

This seems like such a simple, obvious configuration problem, but I've looked all over and can't find any answers.

Hope someone can help me.

Thanks in advance.

I guess there is a problem

I guess there is a problem in your startup script. Instead of using the full hostname to start ejabberd (jabber.mydomain.com), you should put there what you get when you do "hostname -s". Then the error about the illegal hostname should disappear.

You also should use this smaller hostname in the ejabberdctl command of course. If ejabberdctl still gives problems, it is probably because you try to run that script as a different user than the user who started ejabberd (different Erlang cookies).

--
sander

Import users into proper node/host

Thank you, this has solved some problems for me.

On my machine when I enter hostname -s I get back 'arthur' so I changed my startup script to:

#!/bin/bash

erl -pa /var/lib/ejabberd/ebin \
-sname arthur \
-s ejabberd \
-ejabberd config \"/etc/ejabberd/ejabberd.cfg\" \
log_path \"/var/log/ejabberd/ejabberd.log\" \
-sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} \
-mnesia dir \"/var/lib/ejabberd/spool\" \
-detached

And now the control script works properly like this:

ejabberdctl arthur@arthur status

Node arthur@arthur is started. Status: started

However, I still have at least one problem somewhere. I have to import users from our old jabberd 1.4 installation. It worked, but they did not get added to the proper node, or hostname. I execute a command like this:

ejabberdctl arthur@arthur import-dir /home/ejabberd/oldspool

There are no errors and the users are imported, but the users seem to be added to the wrong place so I get this:

ejabberdctl arthur@arthur registered-users

ejabberd@jabber.mydomain.com
michael@spool
andy@spool

The ejabberd user is one I created with a normal jabber client. That user works and I can use that password for the web admin interface. Michael and Andy users were imported.

Why are the imported users added to spool? Does that indicate a configuration or startup script problem? How do I get them into jabber.mydomain.com?

Thanks again for the help.

Import user problem solved

Solved my own problem. The directory name for the jabberd 1.4 user directory must be the actual host name. My mistake was that I wanted to work with a copy of the original directory for safety, and I renamed it when copying.

Syndicate content