esl / MongooseIM

MongooseIM is Erlang Solutions' robust, scalable and efficient XMPP server, aimed at large installations. Specifically designed for enterprise purposes, it is fault-tolerant and can utilise the resources of multiple clustered machines.
Other
1.67k stars 427 forks source link

MySQL Linking Issue with MongooseIM #1026

Closed vickydhas closed 8 years ago

vickydhas commented 8 years ago

MongooseIM version: (put the version) Installed from: (source or pkg) Erlang/OTP version: (put the version)

Getting this error on setting the mysql with mod_auth method set to odbc and mysql line with my database username and password.

2016-10-12 12:23:59.302 [critical] <0.860.0>@ejabberd_check:check_modules:70 ejabberd is configured to use 'mysql', but the following Erlang modules are not installed: '[mysql,mysql_auth,mysql_conn,mysql_recv]' 2016-10-12 12:23:59.305 [error] <0.859.0> CRASH REPORT Process <0.859.0> with 0 neighbours exited with reason: database_module_missing in application_master:init/4 line 133 2016-10-12 12:23:59.305 [info] <0.693.0> Application ejabberd exited with reason: database_module_missing

michalwski commented 8 years ago

Hi @vickydhas,

How did you build MongooseIM. It looks like mysql driver was not included in the release. Could you check if you have configure.out file? What's inside?

vickydhas commented 8 years ago

I build with the latest MAC OS DMG File given with the preconfigured MIM, I followed this link to install the MIM to mac and make local hosting.

Michal, this is another issue so started a new thread where I am making the procedure to connect MySQL instead of Mnesia server for my db but I still see this linkage not happening.

Here are the links for reference:

MIM Setup Installed version 1.5.1

For the My SQL Setup I did following changes in ejabberd.cfg file 1) Log Level to 5 for more information @ ##87 {loglevel, 5}.

2) Made the MySQL Database settings in below lines

%%
%% MySQL server:
%%
 {odbc_server, {mysql, "localhost", 3306, "ejabberd", "root", "abcd@123"}}.

3)Installed mysql and workbench and ran the mysql script with new schema ejabberd from file provided by this gitHub Source MongooseIM-master/apps/ejabberd/priv

Then run mongooseim start , mongooseimctl register command and i get users and start chat. But I know that point 2 is meaningless as i have not yet assigned mysql database to default so I read on internet to find this line have to be updated.

4) %% Authentication : I see that the stack guys asking to make the 310 line uncomment if using another database than mnesia and so If I make the 218 commented and 310 used I get the above issue as reported, else everything works fine but mysql linking is not happening.

##281 {auth_method, internal }.
##310 %%{auth_method, odbc}.

Am i doing this correctly. ???

michalwski commented 8 years ago

You are doing everything correct. The problem is in the dmg image, it doesn't contain required Erlang driver for MySQL. This is my fault, I understand this may be disappointing.

I suggest focusing on compile MongooseIM from master on your machine (#1024). Then you will have all required binaries to talk to MySQL.

vickydhas commented 8 years ago

No worries Michael I am thankful with your guidance and superb docs I was able to do it my self.

I wanna learn this MIM and but of coding where I can add and plug and play modules.

Once in another thread we settle the installation and compile issue I'll take this. As for now I am okay to see my data in Mnesia.

Should I close this thread and come back with new again or keep this open on github.

Thanks for your great support.

On Wednesday, 12 October 2016, Michał Piotrowski notifications@github.com wrote:

You are doing everything correct. The problem is in the dmg image, it doesn't contain required Erlang driver for MySQL. This is my fault, I understand this may be disappointing.

I suggest focusing on compile MongooseIM from master on your machine (

1024 https://github.com/esl/MongooseIM/issues/1024). Then you will

have all required binaries to talk to MySQL.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/esl/MongooseIM/issues/1026#issuecomment-253171045, or mute the thread https://github.com/notifications/unsubscribe-auth/AAy8Zw4gtDW0vE8dB9sToVTi7tl-Vtapks5qzK-fgaJpZM4KUXEn .

Sent from my iPhone6+

michalwski commented 8 years ago

I'm glad I was helpful :)

Let's close this issue and reopen or create new one when you need.

vickydhas commented 8 years ago

Ok closing this issue and keeping noted to link this thread when new issue is generated after compilation work is done for MIM source.