migrating mnesia to pgsql and other issues

Hi there,

i'm running out of ideas.

i finally installed ejabberd on debian with apt-get and after some failures i got it to work. i compiled the erlang pgsql modules from this site http://frihjul.net/pgsql
so that i can start ejabberd without failures. i createt an admin user "admin" with passwort "login123" and tried to login via http://jabberserver:5280/admin

i get a password prompt and i type in admin@jabber.domain.tld with password login123 and it doesnt log in... :( if i take a look in /var/log/ejabberd/ejabberd.log i get the following output:

=ERROR REPORT==== 2010-06-03 13:51:21 ===
** Generic server <0.1089.0> terminating
** Last message in was {sql_query,["select password from users where username='",
"admin","';"]}
** When Server state == {state,<0.1090.0>,pgsql}
** Reason for termination ==
** {badarg,[{erlang,list_to_tuple,[{<<"login123">>}]},
{ejabberd_odbc,'-pgsql_item_to_odbc/1-lc$^0/1-1-',1},
{ejabberd_odbc,pgsql_item_to_odbc,1},
{ejabberd_odbc,handle_call,3},
{gen_server,handle_msg,5},
{proc_lib,init_p,5}]}

i cant imagine why i cant login, it seems that he can read the database, but it didnt compare correct?!?!?! it would be great if anybody could say me what to do!!! :/

and the other question is, how can i migrate the mnesia database from the old server to the new jabberserver with pgsql ? i didnt find anything, and for now backup and restore didnt work ^^

i hope anybody can help me.

best regards

export2odbc, dont work

ok, i found a way it should work.

i try this:
ejabberdctl export2odbc jabber.domain.tld /var/lib/ejabberd/

but i get only following output:
Trying to export Mnesia table 'vcard_search' on server 'jabber.domain.tld' to file '/var/lib/ejabberd/vcard_search.txt'
Result: {aborted,
{undef,
[{exmpp_stringprep,nameprep,["jabber.domain.tld"]},
{ejd2odbc,'-export_common/4-fun-1-',4},
{mnesia_tm,apply_fun,3},
{mnesia_tm,execute_transaction,5},
{mod_ctlextra,'-ctl_process/2-fun-0-',3},
{lists,foreach,2},
{mod_ctlextra,ctl_process,2},
{ejabberd_hooks,run_fold1,4}]}}

the files get created, but they are empty. so i dont know right know what to do.

the DAT and DCD files have content in it.

the server on which i try it is new and i loaded a dump of the live system. and then i try the export. is this possible? hope so :/

regards

Are you sure that is ejabberd 2?

ragged wrote:

but i get only following output:
Trying to export Mnesia table 'vcard_search' on server 'jabber.domain.tld' to file '/var/lib/ejabberd/vcard_search.txt'
Result: {aborted,
{undef,
[{exmpp_stringprep,nameprep,["jabber.domain.tld"]},
{ejd2odbc,'-export_common/4-fun-1-',4},
{mnesia_tm,apply_fun,3},
{mnesia_tm,execute_transaction,5},
{mod_ctlextra,'-ctl_process/2-fun-0-',3},
{lists,foreach,2},
{mod_ctlextra,ctl_process,2},
{ejabberd_hooks,run_fold1,4}]}}

It seems you don't have installed ejabberd 2. It seems you have installed ejabberd from the Git repository, 'master' branch; and that is a code still in development.

ragged wrote: i compiled the

ragged wrote:

i compiled the erlang pgsql modules from this site http://frihjul.net/pgsql

For ejabberd, you must get the pgsql available in the ejabberd-modules SVN.

hi badlop, the ejabberd

hi badlop,

the ejabberd installation is from the debian sources. i compiled in the erlang modules for postgres/mysql and ejd2odbc.

could there be the problem?

would like to tell you the version number, but ejabberd dont have an options for that. :/

here are the mysql files i compiled in

https://svn.process-one.net/ejabberd-modules/mysql/trunk/src/

This is probably the problem, easy to solve

ragged wrote:

the ejabberd installation is from the debian sources. i compiled in the erlang modules for postgres/mysql and ejd2odbc.

could there be the problem?

If you downloaded some source code files from http://github.com/processone/ejabberd/tree/master/src/odbc/ then compiled them and installed in your ejabberd 2.1.*, you will get problems like the one you described, because you mix files from ejabberd 3 with ejabberd 2.

Better get the files from here (notice those are for ejabberd 2):
http://github.com/processone/ejabberd/tree/2.1.x/src/odbc

Syndicate content