[ejabberd] Need help on Clustering

Badlop badlop at gmail.com
Tue May 27 22:18:15 MSD 2008


On Tue, May 27, 2008 at 6:53 PM, ts-onlyfree Admin-eMail
<admin at ts-onlyfree.de> wrote:
> answered cluster-question with yes and set jab.ts-onlyfree.org as host.
>
> on second i set jab2.ts-onlyfree.org

It seems you confuse 'Jabber domain' with 'Erlang node name'.

Let's see: 'If you have two nodes on the cluster, both of them should
serve the same Jabber domain. If you want a Jabber server called
"jabber.example.org", then both nodes should have this as hosts on
their ejabberd.cfg.' [1]

You can also check the forum thread:
Clustering - Replicating User Accounts
http://www.ejabberd.im/node/3039


Now, regarding the error report:

> /ejabberd-2.0.1/bin# erl -sname ejabberd \
> -mnesia extra_db_nodes "['ejabberd at jab.ts-onlyfree.org']" \
> -s mnesia
> Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0]
> [kernel-poll:false]
>
> Eshell V5.5.2  (abort with ^G)
> (ejabberd at Debian-40-etch-32-minimal)1>
> =ERROR REPORT==== 27-May-2008::18:39:02 ===
> ** System NOT running to use fully qualified hostnames **
> ** Hostname jab.ts-onlyfree.org is illegal **


Use the -sname option when you use short node names:

$ erl -sname test at some-machine
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2]
[async-threads:0] [kernel-poll:false]
Eshell V5.6.2  (abort with ^G)
(test at some-machine)1>

$ erl -sname test at some-machine -mnesia extra_db_nodes "['test2 at some-machine']"
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2]
[async-threads:0] [kernel-poll:false]

Eshell V5.6.2  (abort with ^G)
(test at some-machine)1>


Use the -name option when you use long node names:

$ erl -name test at some-machine.net
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2]
[async-threads:0] [kernel-poll:false]
Eshell V5.6.2  (abort with ^G)
(test at in.some-machine)1> q().

$ erl -name test at some-machine.net -mnesia extra_db_nodes
"['test2 at some-machine.net']"
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2]
[async-threads:0] [kernel-poll:false]

Eshell V5.6.2  (abort with ^G)
(test at some-machine.net)1>


Bad idea: Use the -sname option when you plan to use long node
names... it crashes:

$ erl -sname test at some-machine.net
{error_logger,{{2008,5,27},{18,57,27}},"Can't set short node name!\nPlease check
 your configuration\n",[]}
...

$ erl -sname test at some-machine.net -mnesia extra_db_nodes
"['test2 at some-machine.net']"
{error_logger,{{2008,5,27},{19,15,21}},"Can't set short node
name!\nPlease check your configuration\n",[]}
...


If you plan to deploy all nodes in a LAN, then you better use short node names.


[1] http://www.ejabberd.im/node/1592#comment-26669


More information about the ejabberd mailing list