0

I'm trying to integrate MySQL into Ejabberd but I'm constantly facing problem with it. I'm working in AWS EC2 environment and I have 1 EC2 instance that has MySQL, Ejabberd and latest Erlang (Version 17) installed. Then I have exactly followed steps specified in this link: https://www.ejabberd.im/Using%20ejabberd%20with%20MySQL%20native%20driver However, when I view erlang.log and ejabberd.log files, it indicates there is MySQL module missing issue:

=CRASH REPORT==== 10-Jun-2015::06:05:28 === crasher: initial call: application_master:init/4 pid: <0.41.0> registered_name: [] exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]}, {'EXIT',database_module_missing}}} in function application_master:init/4 (application_master.erl, line 133) ancestors: [<0.40.0>] messages: [] links: [<0.40.0>,<0.42.0>,<0.7.0>] dictionary: [] trap_exit: true status: running heap_size: 610 stack_size: 27 reductions: 101 neighbours:

I have downloaded and tried out various modules but all of them have failed. For example, Link from this blog post http://stefan-strigler.de/2009/01/14/ejabberd-mysql-drivers-for-debian-and-ubuntu/

Doesn't work at all. And when I ./build.sh the following module: https://svn.process-one.net/ejabberd-modules/mysql/trunk/ It creates nothing inside ebin/ folder of it.

I have done everything that is specified in this turorial: https://www.ejabberd.im/Using%20ejabberd%20with%20MySQL%20native%20driver except for the very first part (driver part). Can you please suggest me how to solve this or any alternative (easy) way to achieve this? Thank you.

Jason
  • 101
  • 1

2 Answers2

0

It would seem that the Erlang VM is unable to either find or access one of mysql.beam, mysql_auth.beam, mysql_conn.beam or mysql_recv.beam. Make sure those are all in the appropriate ebin directory and readable as the user ejabberd runs as.

Joe
  • 166
  • 4
0

The post you are referring to are obsolete.

To use ejabberd with native Erlang MySQL driver, this is now very easy and quite straightforward. Only two steps are required:

  1. Make sure you have an ejabberd with MySQL support enabled. Two way to have that:

    • Download a binary installer or RPM / DEB package. The needed MySQL component is included. Installer and packages can be downloaded from ejabberd official download page.
    • Build ejabberd from source and make sure it is configured with the --enable-mysql configure option. You can refer to ejabberd documentation for details on how to build ejabberd: Installing ejabberd from Source Code.
  2. Create MySQL database schema. The latest version of the schema for MySQL is available here: https://raw.githubusercontent.com/processone/ejabberd/master/sql/mysql.sql

  3. You need to configure ejabberd to use MySQL. You first need to configure the database at the root level of the config file as described here: ejabberd Database and LDAP Configuration. Once database configured, you can select on a module by module basis, which backend you want to use. For user base, you need to define the odbc auth_method. For other modules, you need to pass the option db_type with the value odbc. Here is example documentation for contact list mod_roster.