Hi,
I have ejabberd running fine when using the internal database but am getting the error below when trying to access MySQL.
Versions i'm using are:
ejabberd v1.1.1
MyQSL v5.0.21
Server: Dual AMD Opteron 250 - 4 Gig memory
Os Fedora Core 5 x86_64
The command line I'm using is:
erl -pa /var/lib/ejabberd/ebin -sname ejabberd -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\"
This is a quick run-down how I configured MySQL:
I downloaded the latest erl files for MySQL.
Compiled them using the Erl compiler c(module).
Copied the beam files to the same place as ejabberd beam files. (/var/lib/ejabberd/ebin/)
-rw-r--r-- 1 root root 2868 Jun 4 03:18 mysql_auth.beam
-rw-r--r-- 1 root root 6268 Jun 4 03:18 mysql.beam
-rw-r--r-- 1 root root 8176 Jun 4 03:18 mysql_conn.beam
-rw-r--r-- 1 root root 2020 Jun 4 03:18 mysql_recv.beam
Created the tables with the supplied MySQL.sql file.
Added necessary rights ( as per instructions )
Here is a link to the MySQL config page I followed:
Modified my ejabberd.cfg file with the following entries:
---- ejabberd.cfg entries ----
{auth_method, odbc}.
{odbc_server, {mysql, "localhost", "ejabberd", "ejabberd", "mypass"}}.
added odbc to the following entries:
{mod_roster_odbc, []},
{mod_vcard_odbc, []},
{mod_offline_odbc, []},
{mod_last_odbc, []},
---- ejabberd.cfg entries ----
Forgive me but I don't know much about Erlang. If anyone can shed some light on this I would really appreciate it.
Thank you in advance.
Phil
---- Error ----
=INFO REPORT==== 5-Jun-2006::17:49:33 ===
I(<0.225.0>:ejabberd_listener:90): (#Port<0.335>) Accepted connection {{192,168,68,150},1128} -> {{192,168,68,102},5222}
(ejabberd@zeus)1>
=ERROR REPORT==== 5-Jun-2006::17:49:33 ===
** State machine <0.272.0> terminating
** Last event in was {xmlstreamelement,
{xmlelement,"response",
[{"xmlns",
"urn:ietf:params:xml:ns:xmpp-sasl"}],
[{xmlcdata,
<<"dXNlcm5hbWU9InBoaWwiLHJlYWxtPSIiLG5vbmNlPSIxODYzNzI3MTg0Iixjbm9uY2U9IjM0MDRhWI1Pa1Vjg0ZA1OTRiY2U5NDc2zRlYmMyYTBmNGYzM2UxM2UiLG5jPTAwMDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvY2hhdGluYWJveC5jb20iLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9MTdmZGE0ODI0OGE5NzNkOWJmZDJiMjllMTk4NGJkYWQ=">>}]}}
** When State == wait_for_sasl_response
** Data == {state,{tlssock,#Port<0.335>,#Port<0.345>},
<0.273.0>,
tls,
"2367574715",
{sasl_state,"jabber",
"mydomain.com",
[],
#Fun,
#Fun,
cyrsasl_digest,
{state,
3,
"1863727184",
undefined,
undefined,
#Fun}},
c2s,
c2s_shaper,
false,
true,
false,
true,
[{certfile,"/etc/ejabberd/server.pem"}],
false,
undefined,
[],
"chatinabox.com",
[],
undefined,
{0,nil},
{0,nil},
{0,nil},
{0,nil},
undefined,
undefined,
undefined,
false,
none,
"en"}
** Reason for termination =
** {'module could not be loaded',[{ejabberd_odbc,escape,["phil"]},
{ejabberd_auth_odbc,get_password,2},
{lists,foldl,3},
{cyrsasl_digest,mech_step,2},
{cyrsasl,server_step,2},
{ejabberd_c2s,wait_for_sasl_response,2},
{gen_fsm,handle_msg,7},
{proc_lib,init_p,5}]}
---- Error ----
Maybe ejabberd_odbc could
Am I missing something?
I thought the latest version of ejabberd came with native mysql support. I didn't realise I needed odbc for this to work.
Here are the beam files I installed for mysql:
mysql.beam
mysql_auth.beam
mysql_conn.beam
mysql_recv.beam
I followed the instructions here:
Any assistance would be greatly appreciated!
TIA
Phil
I have same
I have same problem.
"ejabberd_odbc.beam" finded in "/var/lib/ejabberd/ebin", "lib/erlang/ejabberd-/ebin" and "/usr/ports/net-im/ejabberd/work/ejabberd-1.1.1/src/". "mysql*.beam" finded in "/usr/local/lib/erlang/lib/ejabberd-1.1.1/ebin"
In ejabberd.cfg:
{auth_method, odbc}.
{odbc_server, {mysql, "localhost", "jabber", "jabber", "********"}}.
In log on login:
=INFO REPORT==== 2006-07-04 10:59:50 ===
I(<0.215.0>:ejabberd_listener:90): (#Port<0.335>) Accepted connection {{83,149,96,147},1054} -> {{195,182,132,130},5223}
=INFO REPORT==== 2006-07-04 10:59:52 ===
I(<0.314.0>:ejabberd_c2s:417): ({tlssock,#Port<0.335>,#Port<0.338>}) Failed legacy authentication for shumkov@geometria.ru/Miranda
=INFO REPORT==== 2006-07-04 11:12:13 ===
I(<0.215.0>:ejabberd_listener:90): (#Port<0.319>) Accepted connection {{83,149,96,147},1199} -> {{195,182,132,130},5223}
=INFO REPORT==== 2006-07-04 11:12:14 ===
I(<0.279.0>:ejabberd_c2s:417): ({tlssock,#Port<0.319>,#Port<0.322>}) Failed legacy authentication for shumkov@geometria.ru/Miranda
In log on register:
=INFO REPORT==== 2006-07-04 11:15:23 ===
I(<0.215.0>:ejabberd_listener:90): (#Port<0.347>) Accepted connection {{83,149,96,147},1203} -> {{195,182,132,130},5223}
Miranda say "Error 409: Conflict"
Where my mistake?
How did you compile ejabberd ?
Did you use the option ?
./configure --enable-odbc
otherwise the ejabberd_odbc module are not compiled and they are needed as an abstraction layer even in native mode.
--
http://www.process-one.net/
Mickaël Rémond