[ejabberd] freebsd upgrade and now auth failures

Christoph Mewes christoph.mewes at freiheit.com
Thu Apr 9 18:15:15 MSD 2009


so far, all this has nothing to do with mnesia.

it might all be pretty confusing if you don't now much about erlang and 
i also had my share of fun over this exact problem.

> work0.psg.com:/root# ejabberdctl mnesia
> RPC failed on the node 'ejabberd at jabber.psg.com': nodedown
> =ERROR REPORT==== 9-Apr-2009::13:28:41 ===
> Error in process <0.33.0> on node 'ejabberdctl at work0.psg.com' with exit value: {badarg,[{erlang,list_to_existing_atom,["ejabberd at localhost"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}

ejabberdctl just connects to your ejabberd via a normal erlang remote 
shell connect. the message is erlang telling you, that the name of the 
process it tries to connect to is not the one you have given in your 
connection attempt via ejabberdctl (see the script for how it does this).

> why is it saying on node 'ejabberdctl at work0.psg.com' when
> ejabberdctl.cfg says
>     ERLANG_NODE=ejabberd at jabber.psg.com
> and where is it getting localhost?!?
> something else to think about
> % host jabber.psg.com
> jabber.psg.com has address
> % host work0.psg.com
> work0.psg.com has address
> work0.psg.com has IPv6 address 2001:418:1::35
> i.e. the node name is one of the names of the host, but not the primary
> one

by "chance", all the names resolv to the same machine. however erlang 
will only connect, if the hostname you (via ejabberdctl) have given it 
to connect to matches with the one given to ejabberd on startup (via 
ejabberdctl as well?).

in your case:
  - ejabberdctl connects to "ejabberd at localhost" (as seen in the error)
  - ejabberd is started as "ejabberd at jabber.psg.com"
  - the name resolved for the node is 'ejabberdctl at work0.psg.com'

from my experience, the startup scripts for debian started ejabberd with 
the 'wrong' hostname.

> it there a way to get the mnesia database to just tell me what the hell
> it wants 
>   the jabber host name to be, and
>   the erlang node name to be
> in order to match the database and allow auth to the existing accounts?

as described in the migration guide, if you change the hostname, you 
have to start ejabberd with the old hostname, dump the db, and reimport 
it into your new running db on the new hostname, since the db contains 
the hostname and won't run on a new hostname (as you prolly can see in 
the startup logs of ejabberd).

as said, i all did this manually after a while because i couldn't get 
the script provided with debian to do it right.


Christoph Mewes

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20
HRB Hamburg 70814

FE97 1705 44D3 ED72 1E59  7F3E 2D93 C469 042A 43CD
Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20090409/5dea7512/attachment-0001.pgp>

More information about the ejabberd mailing list