Am I going crazy or does the current version not work with MSSQL 2005?

I have spent about 6 hours trying to get this to work with mssql. But no go. I can get it to work fine with it's internal db.

I've created the database, user in sql

Commented %%{auth_method, internal}.
uncommented {auth_method, odbc}

i've uncommented and tried this first
%%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=bla"}.

then i tried this as is was searching forums i noticed someone adding the server.

%%{odbc_server, "Server=localhost;Database=ejabberd;Uid=ejabberd;Pwd=bla!"}.

No go.....

What am i doing wrong? How can I get better debugging.

Here's my last crash report

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,inet_gethost_native_sup}
             started: [{pid,<0.53.0>},{mfa,{inet_gethost_native,init,[[]]}}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.52.0>},
                       {name,inet_gethost_native_sup},
                       {mfa,{inet_gethost_native,start_link,[]}},
                       {restart_type,temporary},
                       {shutdown,1000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.57.0>},
                       {name,alarm_handler},
                       {mfa,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.59.0>},
                       {name,overload},
                       {mfa,{overload,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.56.0>},
                       {name,sasl_safe_sup},
                       {mfa,
                           {supervisor,
                               start_link,
                               [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.60.0>},
                       {name,release_handler},
                       {mfa,{release_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
         application: sasl
          started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.72.0>},
                       {name,dets_sup},
                       {mfa,{dets_sup,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:47 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.73.0>},
                       {name,dets},
                       {mfa,{dets_server,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:48 ===
          supervisor: {local,mnesia_sup}
             started: [{pid,<0.81.0>},
                       {name,mnesia_event},
                       {mfa,{mnesia_sup,start_event,[]}},
                       {restart_type,permanent},
                       {shutdown,30000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:48 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.83.0>},
                       {name,mnesia_monitor},
                       {mfa,{mnesia_monitor,start,[]}},
                       {restart_type,permanent},
                       {shutdown,3000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:48 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.84.0>},
                       {name,mnesia_subscr},
                       {mfa,{mnesia_subscr,start,[]}},
                       {restart_type,permanent},
                       {shutdown,3000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:48 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.85.0>},
                       {name,mnesia_locker},
                       {mfa,{mnesia_locker,start,[]}},
                       {restart_type,permanent},
                       {shutdown,3000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:48 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.86.0>},
                       {name,mnesia_recover},
                       {mfa,{mnesia_recover,start,[]}},
                       {restart_type,permanent},
                       {shutdown,180000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.91.0>},
                       {name,disk_log_sup},
                       {mfa,{disk_log_sup,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.94.0>},
                       {name,disk_log_server},
                       {mfa,{disk_log_server,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,kernel_safe_sup}
             started: [{pid,<0.107.0>},
                       {name,timer_server},
                       {mfa,{timer,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.87.0>},
                       {name,mnesia_tm},
                       {mfa,{mnesia_tm,start,[]}},
                       {restart_type,permanent},
                       {shutdown,30000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.108.0>},
                       {name,mnesia_checkpoint_sup},
                       {mfa,{mnesia_checkpoint_sup,start,[]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.109.0>},
                       {name,mnesia_snmp_sup},
                       {mfa,{mnesia_snmp_sup,start,[]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.110.0>},
                       {name,mnesia_controller},
                       {mfa,{mnesia_controller,start,[]}},
                       {restart_type,permanent},
                       {shutdown,3000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_kernel_sup}
             started: [{pid,<0.111.0>},
                       {name,mnesia_late_loader},
                       {mfa,{mnesia_late_loader,start,[]}},
                       {restart_type,permanent},
                       {shutdown,3000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
          supervisor: {local,mnesia_sup}
             started: [{pid,<0.82.0>},
                       {name,mnesia_kernel_sup},
                       {mfa,{mnesia_kernel_sup,start,[]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:49 ===
         application: mnesia
          started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Jul-2008::20:06:52 ===
          supervisor: {local,crypto_sup}
             started: [{pid,<0.214.0>},
                       {name,crypto_server},
                       {mfa,{crypto_server,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:52 ===
         application: crypto
          started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Jul-2008::20:06:53 ===
          supervisor: {local,ssl_sup}
             started: [{pid,<0.224.0>},
                       {name,ssl_server},
                       {mfa,{ssl_server,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:53 ===
          supervisor: {local,ssl_sup}
             started: [{pid,<0.225.0>},
                       {name,ssl_broker_sup},
                       {mfa,{ssl_broker_sup,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 30-Jul-2008::20:06:53 ===
         application: ssl
          started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Jul-2008::20:06:53 ===
          supervisor: {local,stringprep_sup}
             started: [{pid,<0.227.0>},
                       {name,stringprep},
                       {mfa,{stringprep,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,brutal_kill},
                       {child_type,worker}]

=CRASH REPORT==== 30-Jul-2008::20:06:55 ===
  crasher:
    pid: <0.39.0>
    registered_name: []
    error_info: {bad_return,
                     {{ejabberd_app,start,[normal,[]]},
                      {'EXIT',
                          {badarg,
                              [{ejabberd_check,'-get_db_used/0-fun-0-',2},
                               {lists,foldr,3},
                               {ejabberd_check,get_db_used,0},
                               {ejabberd_check,check_database_modules,0},
                               {ejabberd_app,start,2},
                               {application_master,start_it_old,4}]}}}}
    initial_call: {application_master,
                     init,
                     [<0.5.0>,
                      <0.38.0>,
                      {appl_data,
                          ejabberd,
                          [ejabberd,
                           ejabberd_sup,
                           ejabberd_auth,
                           ejabberd_router,
                           ejabberd_sm,
                           ejabberd_s2s,
                           ejabberd_local,
                           ejabberd_listeners,
                           ejabberd_iq_sup,
                           ejabberd_service_sup,
                           ejabberd_s2s_out_sup,
                           ejabberd_s2s_in_sup,
                           ejabberd_c2s_sup,
                           ejabberd_mod_roster,
                           ejabberd_mod_echo,
                           ejabberd_mod_pubsub,
                           ejabberd_mod_irc,
                           ejabberd_mod_muc,
                           ejabberd_offline,
                           random_generator],
                          undefined,
                          {ejabberd_app,[]},
                          [acl,
                           adhoc,
                           configure,
                           cyrsasl_anonymous,
                           cyrsasl,
                           cyrsasl_digest,
                           cyrsasl_plain,
                           ejabberd_admin,
                           ejabberd_app,
                           ejabberd_auth_anonymous,
                           ejabberd_auth,
                           ejabberd_auth_external,
                           ejabberd_auth_internal,
                           ejabberd_auth_ldap,
                           ejabberd_auth_odbc,
                           ejabberd_auth_pam,
                           ejabberd,
                           ejabberd_c2s,
                           ejabberd_c2s_config,
                           ejabberd_config,
                           ejabberd_ctl,
                           ejabberd_frontend_socket,
                           ejabberd_hooks,
                           ejabberd_http,
                           ejabberd_http_bind,
                           ejabberd_http_poll,
                           ejabberd_listener,
                           ejabberd_local,
                           ejabberd_logger_h,
                           ejabberd_loglevel,
                           ejabberd_node_groups,
                           ejabberd_rdbms,
                           ejabberd_receiver,
                           ejabberd_router,
                           ejabberd_s2s,
                           ejabberd_s2s_in,
                           ejabberd_s2s_out,
                           ejabberd_service,
                           ejabberd_sm,
                           ejabberd_socket,
                           ejabberd_sup,
                           ejabberd_system_monitor,
                           ejabberd_tmp_sup,
                           ejabberd_update,
                           ejabberd_web_admin,
                           ejabberd_web,
                           ejabberd_zlib,
                           ejd2odbc,
                           eldap,
                           eldap_filter,
                           eldap_pool,
                           eldap_utils,
                           'ELDAPv3',
                           extauth,
                           gen_iq_handler,
                           gen_mod,
                           gen_pubsub_node,
                           gen_pubsub_nodetree,
                           iconv,
                           idna,
                           jd2ejd,
                           jlib,
                           mod_adhoc,
                           mod_announce,
                           mod_caps,
                           mod_configure2,
                           mod_configure,
                           mod_disco,
                           mod_echo,
                           mod_http_bind,
                           mod_http_fileserver,
                           mod_irc,
                           mod_irc_connection,
                           mod_last,
                           mod_last_odbc,
                           mod_muc,
                           mod_muc_log,
                           mod_muc_room,
                           mod_offline,
                           mod_offline_odbc,
                           mod_privacy,
                           mod_privacy_odbc,
                           mod_private,
                           mod_private_odbc,
                           mod_proxy65,
                           mod_proxy65_lib,
                           mod_proxy65_service,
                           mod_proxy65_sm,
                           mod_proxy65_stream,
                           mod_pubsub,
                           mod_register,
                           mod_roster,
                           mod_roster_odbc,
                           mod_service_log,
                           mod_shared_roster,
                           mod_stats,
                           mod_time,
                           mod_vcard,
                           mod_vcard_ldap,
                           mod_vcard_odbc,
                           mod_version,
                           node_buddy,
                           node_club,
                           node_default,
                           node_dispatch,
                           node_pep,
                           node_private,
                           node_public,
                           nodetree_default,
                           nodetree_virtual,
                           p1_fsm,
                           p1_mnesia,
                           ram_file_io_server,
                           randoms,
                           sha,
                           shaper,
                           stringprep,
                           stringprep_sup,
                           tls,
                           translate,
                           xml,
                           xml_stream,
                           'XmppAddr'],
                          [],
                          infinity,
                          infinity},
                      normal]}
    ancestors: [<0.38.0>]
    messages: [{'EXIT',<0.40.0>,normal}]
    links: [<0.38.0>,<0.5.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1597
    stack_size: 21
    reductions: 2041
  neighbours:

You found a bug. Try the proposed solution.

It seems you found a bug introduced in ejabberd 2.0.1. I've just reported it here: Detect correctly MSSQL and ODBC configuration.

I tried to solve the problem. The patch is attached in that page.

I also uploaded a binary file with the patch applied, so you can simply replace this file in your installation if you prefer: http://www.ejabberd.im/files/ejabberd_check.beam

If you try this, please tell me if it finally works for you.

Thanks.

can't find the file

When I click on http://www.ejabberd.im/files/ejabberd_check.beam it says there's no file there.

I've upgraded to 2.0.2 but the issue is still there so any help would be great!

Strange. It should be fixed

polobruce wrote:

I've upgraded to 2.0.2 but the issue is still there so any help would be great!

The source code in ejabberd 2.0.2 includes the proposed patch, which was expected to solve the problem.

I tried this in ejabberd.cfg

{auth_method, odbc}.
{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.

and the error message is this one:

=ERROR REPORT==== 31-Aug-2008::00:42:50 ===
E(<0.265.0>:ejabberd_odbc:269) : ODBC connection (DSN=ejabberd;UID=ejabberd;PWD=ejabberd) failed: 
"No SQL-driver information available. Connection to database failed."

How did you install ejabberd 2.0.2 (source package, windows binary installer, ...)? You can also show your full ejabberd.cfg, and again the log file.

Here it is

I used the windows binary install

ejabberd.cfg
---------------

%%%
%%% ejabberd configuration file
%%%

%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is included in
%%% your copy of ejabberd, and is also available online at
%%% http://www.process-one.net/en/ejabberd/docs/

%%% This configuration file contains Erlang terms.
%%% In case you want to understand the syntax, here are the concepts:
%%%
%%% - The character to comment a line is %
%%%
%%% - Each term ends in a dot, for example:
%%% override_global.
%%%
%%% - A tuple has a fixed definition, its elements are
%%% enclosed in {}, and separated with commas:
%%% {loglevel, 4}.
%%%
%%% - A list can have as many elements as you want,
%%% and is enclosed in [], for example:
%%% [http_poll, web_admin, tls]
%%%
%%% - A keyword of ejabberd is a word in lowercase.
%%% The strings are enclosed in "" and can have spaces, dots...
%%% {language, "en"}.
%%% {ldap_rootdn, "dc=example,dc=com"}.
%%%
%%% - This term includes a tuple, a keyword, a list and two strings:
%%% {hosts, ["jabber.example.net", "im.example.com"]}.
%%%

%%% =======================
%%% OVERRIDE STORED OPTIONS

%%
%% Override the old values stored in the database.
%%

%%
%% Override global options (shared by all ejabberd nodes in a cluster).
%%
%%override_global.

%%
%% Override local options (specific for this particular ejabberd node).
%%
%%override_local.

%%
%% Remove the Access Control Lists before new ones are added.
%%
%%override_acls.

%%% =========
%%% DEBUGGING

%%
%% loglevel: Verbosity of log files generated by ejabberd.
%% 0: No ejabberd log at all (not recommended)
%% 1: Critical
%% 2: Error
%% 3: Warning
%% 4: Info
%% 5: Debug
%%
{loglevel, 4}.

%%
%% watchdog_admins: If an ejabberd process consumes too much memory,
%% send live notifications to those Jabber accounts.
%%
%%{watchdog_admins, ["admin@secretdomain.com"]}.

%%% ================
%%% SERVED HOSTNAMES

%%
%% hosts: Domains served by ejabberd.
%% You can define one or several, for example:
%% {hosts, ["example.net", "example.com", "example.org"]}.
%%
{hosts, ["secretdomain.com"]}.

%%
%% route_subdomains: Delegate subdomains to other Jabber server.
%% For example, if this ejabberd serves example.org and you want
%% to allow communication with a Jabber server called im.example.org.
%%
%%{route_subdomains, s2s}.

%%% ===============
%%% LISTENING PORTS

%%
%% listen: Which ports will ejabberd listen, which service handles it
%% and what options to start it with.
%%
{listen,
[

{5222, ejabberd_c2s, [
{certfile, "C:\\Program Files\\ejabberd-2.0.2\\conf\\server.pem"}, starttls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},

%%
%% To enable the old SSL connection method in port 5223:
%%
{5223, ejabberd_c2s, [
{certfile, "C:\\Program Files\\ejabberd-2.0.2\\conf\\server.pem"}, tls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},

{5269, ejabberd_s2s_in, [
{shaper, s2s_shaper},
{max_stanza_size, 131072}
]},

%%
%% ejabberd_service: Interact with external components (transports...)
%%
%%{8888, ejabberd_service, [
%% {access, all},
%% {shaper_rule, fast},
%% {ip, {127, 0, 0, 1}},
%% {hosts, ["icq.example.org", "sms.example.org"],
%% [{password, "secret"}]
%% }
%% ]},

{5280, ejabberd_http, [
http_bind,
http_poll,
web_admin
]}

]}.

%%
%% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
%% Allowed values are: true or false.
%% You must specify a certificate file.
%%
{s2s_use_starttls, true}.

%%
%% s2s_certfile: Specify a certificate file.
%%
{s2s_certfile, "C:\\Program Files\\ejabberd-2.0.2\\conf\\server.pem"}.

%%
%% domain_certfile: Specify a different certificate for each served hostname.
%%
%%{domain_certfile, "example.org", "C:\\Program Files\\ejabberd-2.0.2\\conf\\example_org.pem"}.
%%{domain_certfile, "example.com", "C:\\Program Files\\ejabberd-2.0.2\\conf\\example_com.pem"}.

%%
%% S2S whitelist or blacklist
%%
%% Default s2s policy for undefined hosts.
%%
{s2s_default_policy, allow}.

%%
%% Allow or deny communication with specific servers.
%%
%%{{s2s_host, "goodhost.org"}, allow}.
%%{{s2s_host, "badhost.org"}, deny}.

%%% ==============
%%% AUTHENTICATION

%%
%% auth_method: Method used to authenticate the users.
%% The default method is the internal.
%% If you want to use a different method,
%% comment this line and enable the correct ones.
%%
%%{auth_method, internal}.

%%
%% Authentication using external script
%% Make sure the script is executable by ejabberd.
%%
%%{auth_method, external}.
%%{extauth_program, "\\path\\to\\authentication\\script"}.

%%
%% Authentication using ODBC
%% Remember to setup a database in the next section.
%%
{auth_method, odbc}.

%%
%% Authentication using PAM
%%
%%{auth_method, pam}.
%%{pam_service, "pamservicename"}.

%%
%% Authentication using LDAP
%%
%%{auth_method, ldap}.
%%
%% List of LDAP servers:
%%{ldap_servers, ["secretdomain.com"]}.
%%
%% LDAP attribute that holds user ID:
%%{ldap_uids, [{"mail", "%u@mail.example.org"}]}.
%%
%% Search base of LDAP directory:
%%{ldap_base, "dc=example,dc=com"}.
%%
%% LDAP manager:
%%{ldap_rootdn, "dc=example,dc=com"}.
%%
%% Password to LDAP manager:
%%{ldap_password, "******"}.

%%
%% Anonymous login support:
%% auth_method: anonymous
%% anonymous_protocol: sasl_anon | login_anon | both
%% allow_multiple_connections: true | false
%%
%%{host_config, "public.example.org", [{auth_method, anonymous},
%% {allow_multiple_connections, false},
%% {anonymous_protocol, sasl_anon}]}.
%%
%% To use both anonymous and internal authentication:
%%
%%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}.

%%% ==============
%%% DATABASE SETUP

%% ejabberd uses by default the internal Mnesia database,
%% so you can avoid this section.
%% This section provides configuration examples in case
%% you want to use other database backends.
%% Please consult the ejabberd Guide for details about database creation.

%%
%% MySQL server:
%%
%%{odbc_server, {mysql, "server", "database", "username", "password"}}.
%%
%% If you want to specify the port:
%%{odbc_server, {mysql, "server", 1234, "database", "username", "password"}}.

%%
%% PostgreSQL server:
%%
%%{odbc_server, {pgsql, "server", "database", "username", "password"}}.
%%
%% If you want to specify the port:
%%{odbc_server, {pgsql, "server", 1234, "database", "username", "password"}}.
%%
%% If you use PostgreSQL, have a large database, and need a
%% faster but inexact replacement for "select count(*) from users"
%%
%%{pgsql_users_number_estimate, true}.

%%
%% ODBC compatible or MSSQL server:
%%
{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=password"}.

%%% ===============
%%% TRAFFIC SHAPERS

%%
%% The "normal" shaper limits traffic speed to 1.000 B/s
%%
{shaper, normal, {maxrate, 1000}}.

%%
%% The "fast" shaper limits traffic speed to 50.000 B/s
%%
{shaper, fast, {maxrate, 50000}}.

%%% ====================
%%% ACCESS CONTROL LISTS

%%
%% The 'admin' ACL grants administrative privileges to Jabber accounts.
%% You can put as many accounts as you want.
%%
{acl, admin, {user, "admin", "secretdomain.com"}}.

%%
%% Blocked users
%%
%%{acl, blocked, {user, "baduser", "example.org"}}.
%%{acl, blocked, {user, "test"}}.

%%
%% Local users: don't modify this line.
%%
{acl, local, {user_regexp, ""}}.

%%
%% More examples of ACLs
%%
%%{acl, jabberorg, {server, "jabber.org"}}.
%%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
%%{acl, test, {user_regexp, "^test"}}.
%%{acl, test, {user_glob, "test*"}}.

%%% ============
%%% ACCESS RULES

%% Define the maximum number of time a single user is allowed to connect:
{access, max_user_sessions, [{10, all}]}.

%% This rule allows access only for local users:
{access, local, [{allow, local}]}.

%% Only non-blocked users can use c2s connections:
{access, c2s, [{deny, blocked},
{allow, all}]}.

%% For all users except admins used "normal" shaper
{access, c2s_shaper, [{none, admin},
{normal, all}]}.

%% For all S2S connections used "fast" shaper
{access, s2s_shaper, [{fast, all}]}.

%% Only admins can send announcement messages:
{access, announce, [{allow, admin}]}.

%% Only admins can use configuration interface:
{access, configure, [{allow, admin}]}.

%% Admins of this server are also admins of MUC service:
{access, muc_admin, [{allow, admin}]}.

%% All users are allowed to use MUC service:
{access, muc, [{allow, all}]}.

%% Every username can be registered via in-band registration:
%% To disable in-band registration, replace 'allow' with 'deny'.
{access, register, [{allow, all}]}.

%% Everybody can create pubsub nodes
{access, pubsub_createnode, [{allow, all}]}.

%%% ================
%%% DEFAULT LANGUAGE

%%
%% language: Default language used for server messages.
%%
{language, "en"}.

%%% =======
%%% MODULES

%%
%% Modules enabled in all ejabberd virtual hosts.
%%
{modules,
[
{mod_adhoc, []},
{mod_announce, [{access, announce}]}, % requires mod_adhoc
{mod_caps, []},
{mod_configure,[]}, % requires mod_adhoc
{mod_disco, []},
%%{mod_echo, [{host, "echo.secretdomain.com"}]},
{mod_http_bind,[]},
%%{mod_http_fileserver, [{docroot, "C:\\Program Files\\ejabberd-2.0.2\\www"}]},
{mod_irc, []},
{mod_last, []},
{mod_muc, [
%%{host, "conference.@HOST@"},
{access, muc},
{access_create, muc},
{access_persistent, muc},
{access_admin, muc_admin}
]},
%%{mod_muc_log,[]},
{mod_offline, []},
{mod_privacy, []},
{mod_private, []},
%%{mod_proxy65,[]},
{mod_pubsub, [ % requires mod_caps
{access_createnode, pubsub_createnode},
{plugins, ["default", "pep"]}
]},
{mod_register, [
%%
%% After successful registration, the user receives
%% a message with this subject and body.
%%
{welcome_message, {"Welcome!",
"Welcome to this Jabber server."}},

%%
%% When a user registers, send a notification to
%% these Jabber accounts.
%%
%%{registration_watchers, ["admin1@example.org"]},

{access, register}
]},
{mod_roster, []},
%%{mod_service_log,[]},
{mod_shared_roster,[]},
%%{mod_stats, []},
{mod_time, []},
{mod_vcard, []},
{mod_version, []}
]}.

%%% $Id: ejabberd.cfg.example 1073 2007-12-17 11:03:22Z badlop $

%%% Local Variables:
%%% mode: erlang
%%% End:
%%% vim: set filetype=erlang tabstop=8:

Sasl.log
-------------

=PROGRESS REPORT==== 30-Aug-2008::19:40:59 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.46.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.47.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.45.0>},
{name,sasl_safe_sup},
{mfa,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.48.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
application: sasl
started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.52.0>},
{name,dets_sup},
{mfa,{dets_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.53.0>},
{name,dets},
{mfa,{dets_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.61.0>},
{name,mnesia_event},
{mfa,{mnesia_sup,start_event,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.63.0>},
{name,mnesia_monitor},
{mfa,{mnesia_monitor,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.64.0>},
{name,mnesia_subscr},
{mfa,{mnesia_subscr,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.65.0>},
{name,mnesia_locker},
{mfa,{mnesia_locker,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.66.0>},
{name,mnesia_recover},
{mfa,{mnesia_recover,start,[]}},
{restart_type,permanent},
{shutdown,180000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.71.0>},
{name,disk_log_sup},
{mfa,{disk_log_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.72.0>},
{name,disk_log_server},
{mfa,{disk_log_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.89.0>},
{name,timer_server},
{mfa,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.67.0>},
{name,mnesia_tm},
{mfa,{mnesia_tm,start,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.90.0>},
{name,mnesia_checkpoint_sup},
{mfa,{mnesia_checkpoint_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.91.0>},
{name,mnesia_snmp_sup},
{mfa,{mnesia_snmp_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.92.0>},
{name,mnesia_controller},
{mfa,{mnesia_controller,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.93.0>},
{name,mnesia_late_loader},
{mfa,{mnesia_late_loader,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.62.0>},
{name,mnesia_kernel_sup},
{mfa,{mnesia_kernel_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
application: mnesia
started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,crypto_sup}
started: [{pid,<0.186.0>},
{name,crypto_server},
{mfa,{crypto_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
application: crypto
started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.192.0>},
{name,ssl_broker_sup},
{mfa,{ssl_broker_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.193.0>},
{name,ssl_manager},
{mfa,{ssl_manager,start_link,[]}},
{restart_type,permanent},
{shutdown,4000},
{child_type,worker}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,ssl_sup}
started: [{pid,<0.194.0>},
{name,ssl_connection},
{mfa,{ssl_connection_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,4000},
{child_type,supervisor}]

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
application: ssl
started_at: ejabberd@localhost

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
supervisor: {local,stringprep_sup}
started: [{pid,<0.196.0>},
{name,stringprep},
{mfa,{stringprep,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]

=CRASH REPORT==== 30-Aug-2008::19:41:00 ===
crasher:
pid: <0.35.0>
registered_name: []
exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]},
{'EXIT',database_module_missing}}}
in function application_master:init/4
initial call: application_master:init(<0.5.0>,<0.34.0>,
{appl_data,ejabberd,
[ejabberd,ejabberd_sup,
ejabberd_auth,ejabberd_router,
ejabberd_sm,ejabberd_s2s,
ejabberd_local,ejabberd_listeners,
ejabberd_iq_sup,
ejabberd_service_sup,
ejabberd_s2s_out_sup,
ejabberd_s2s_in_sup,
ejabberd_c2s_sup,
ejabberd_mod_roster,
ejabberd_mod_echo,
ejabberd_mod_pubsub,
ejabberd_mod_irc,ejabberd_mod_muc,
ejabberd_offline,random_generator],
undefined,
{ejabberd_app,[]},
[acl,adhoc,configure,
cyrsasl_anonymous,cyrsasl,
cyrsasl_digest,cyrsasl_plain,
ejabberd_admin,ejabberd_app,
ejabberd_auth_anonymous,
ejabberd_auth,
ejabberd_auth_external,
ejabberd_auth_internal,
ejabberd_auth_ldap,
ejabberd_auth_odbc,
ejabberd_auth_pam,ejabberd,
ejabberd_c2s,ejabberd_c2s_config,
ejabberd_config,ejabberd_ctl,
ejabberd_frontend_socket,
ejabberd_hooks,ejabberd_http,
ejabberd_http_bind,
ejabberd_http_poll,
ejabberd_listener,ejabberd_local,
ejabberd_logger_h,
ejabberd_loglevel,
ejabberd_node_groups,
ejabberd_rdbms,ejabberd_receiver,
ejabberd_router,ejabberd_s2s,
ejabberd_s2s_in,ejabberd_s2s_out,
ejabberd_service,ejabberd_sm,
ejabberd_socket,ejabberd_sup,
ejabberd_system_monitor,
ejabberd_tmp_sup,ejabberd_update,
ejabberd_web_admin,ejabberd_web,
ejabberd_zlib,ejd2odbc,eldap,
eldap_filter,eldap_pool,
eldap_utils,'ELDAPv3',extauth,
gen_iq_handler,gen_mod,
gen_pubsub_node,
gen_pubsub_nodetree,iconv,idna,
jd2ejd,jlib,mod_adhoc,
mod_announce,mod_caps,
mod_configure2,mod_configure,
mod_disco,mod_echo,mod_http_bind,
mod_http_fileserver,mod_irc,
mod_irc_connection,mod_last,
mod_last_odbc,mod_muc,mod_muc_log,
mod_muc_room,mod_offline,
mod_offline_odbc,mod_privacy,
mod_privacy_odbc,mod_private,
mod_private_odbc,mod_proxy65,
mod_proxy65_lib,
mod_proxy65_service,
mod_proxy65_sm,mod_proxy65_stream,
mod_pubsub,mod_register,
mod_roster,mod_roster_odbc,
mod_service_log,mod_shared_roster,
mod_stats,mod_time,mod_vcard,
mod_vcard_ldap,mod_vcard_odbc,
mod_version,node_buddy,node_club,
node_default,node_dispatch,
node_pep,node_private,node_public,
nodetree_default,nodetree_virtual,
p1_fsm,p1_mnesia,
ram_file_io_server,randoms,sha,
shaper,stringprep,stringprep_sup,
tls,translate,xml,xml_stream,
'XmppAddr'],
[],infinity,infinity},
normal)
ancestors: [<0.34.0>]
messages: [{'EXIT',<0.36.0>,normal}]
links: [<0.34.0>,<0.5.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 987
stack_size: 23
reductions: 149
neighbours:

ejabberd.log
-------------------

=INFO REPORT==== 2008-08-30 19:23:12 ===
I(<0.313.0>:mod_pubsub:154) : pubsub init "secretdomain.com" [{access_createnode,
pubsub_createnode},
{plugins,
["default","pep"]}]

=INFO REPORT==== 2008-08-30 19:23:12 ===
I(<0.313.0>:mod_pubsub:209) : ** tree plugin is nodetree_default

=INFO REPORT==== 2008-08-30 19:23:12 ===
I(<0.313.0>:mod_pubsub:213) : ** init default plugin

=INFO REPORT==== 2008-08-30 19:23:12 ===
I(<0.313.0>:mod_pubsub:213) : ** init pep plugin

=INFO REPORT==== 2008-08-30 19:23:50 ===
I(<0.271.0>:ejabberd_listener:112) : (#Port<0.405>) Accepted connection {{208,81,189,119},15538} -> {{192,168,1,110},5222}

=INFO REPORT==== 2008-08-30 19:23:52 ===
I(<0.357.0>:ejabberd_c2s:693) : ({socket_state,tls,{tlssock,#Port<0.405>,#Port<0.415>},<0.356.0>}) Accepted authentication for bruce

=INFO REPORT==== 2008-08-30 19:23:52 ===
I(<0.357.0>:ejabberd_c2s:805) : ({socket_state,tls,{tlssock,#Port<0.405>,#Port<0.415>},<0.356.0>}) Opened session for bruce@secretdomain.com/Meebo

=INFO REPORT==== 2008-08-30 19:24:00 ===
I(<0.271.0>:ejabberd_listener:112) : (#Port<0.418>) Accepted connection {{192,168,1,1},53604} -> {{192,168,1,110},5222}

=INFO REPORT==== 2008-08-30 19:24:01 ===
I(<0.359.0>:ejabberd_c2s:693) : ({socket_state,tls,{tlssock,#Port<0.418>,#Port<0.420>},<0.358.0>}) Accepted authentication for admin

=INFO REPORT==== 2008-08-30 19:24:01 ===
I(<0.359.0>:ejabberd_c2s:805) : ({socket_state,tls,{tlssock,#Port<0.418>,#Port<0.420>},<0.358.0>}) Opened session for admin@secretdomain.com/Bruce smith’s iMac

=INFO REPORT==== 2008-08-30 19:25:37 ===
I(<0.273.0>:ejabberd_listener:112) : (#Port<0.423>) Accepted connection {{72,14,252,129},18153} -> {{192,168,1,110},5269}

=INFO REPORT==== 2008-08-30 19:25:37 ===
I(<0.273.0>:ejabberd_listener:112) : (#Port<0.426>) Accepted connection {{72,14,252,129},18154} -> {{192,168,1,110},5269}

=INFO REPORT==== 2008-08-30 19:25:58 ===
I(<0.364.0>:ejabberd_s2s_out:224) : s2s connection: secretdomain.com -> gmail.com (remote server not found)

=INFO REPORT==== 2008-08-30 19:26:01 ===
I(<0.364.0>:ejabberd_s2s_out:777) : Reconnect delay expired: Will now retry to connect to gmail.com when needed.

=INFO REPORT==== 2008-08-30 19:32:20 ===
I(<0.273.0>:ejabberd_listener:112) : (#Port<0.462>) Accepted connection {{72,14,252,129},18203} -> {{192,168,1,110},5269}

=INFO REPORT==== 2008-08-30 19:32:20 ===
I(<0.273.0>:ejabberd_listener:112) : (#Port<0.464>) Accepted connection {{72,14,252,129},18204} -> {{192,168,1,110},5269}

{'EXIT',database_module_missi

{'EXIT',database_module_missing}}} means that Erlang ODBC application isn't included into ejabberd binary installer. So, you're out of luck (because now it's virtually imposiible to build ejabberd from the released source on Windows using Erlang distribution from http://www.erlang.org). Though you could try to download it (the same version as in installer), extract ODBC module and add it to your installed ejabberd. (Or ask badlop, who seems to like these quests of adding missing dependencies to the installer.)

Yahoo.... It's working Now!

Ok so i downloaded the full erlang binary windows install and installed it on my system. Then copied C:\Program Files\erl5.6.3\lib\odbc-2.10.2 to C:\Program Files\ejabberd-2.0.2\lib\odbc-2.10.2

and now we're in business!

Thanks guys!

Oh, installer forgot odbc library

polobruce wrote:

I used the windows binary install

=PROGRESS REPORT==== 30-Aug-2008::19:41:00 ===
          supervisor: {local,stringprep_sup}
             started: [{pid,<0.196.0>},
                       {name,stringprep},
                       {mfa,{stringprep,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,brutal_kill},
                       {child_type,worker}]

=CRASH REPORT==== 30-Aug-2008::19:41:00 ===
  crasher:
    pid: <0.35.0>
    registered_name: []
    exception exit: {bad_return,{{ejabberd_app,start,[normal,[]]},
                                 {'EXIT',database_module_missing}}}
      in function  application_master:init/4
    initial call: application_master:init(<0.5.0>,<0.34.0>,

As explained by Teo, it seems the installer didn't include some required ODBC library.

I've checked, and the directory ejabberd-2.0.2/lib/odbc-2.10.2 doesn't include ebin/ with the required odbc.beam, odbc_app.beam, ...

Those files were included in ejabberd 2.0.1 installer, so this seems some problem in the new installer. As mentioned by Teo, you could download the full Windows Erlang/OTP R12B-3 installer and get those files from there.

But it would be preferable if the ejabberd binary installer is complete :) so I'll report tomorrow. Once an updated installer is published, I'll add a comment here. (And let's hope after that the MSSQL connection finally works! ;)

Binary installers fixed.

badlop wrote:

But it would be preferable if the ejabberd binary installer is complete :) so I'll report tomorrow. Once an updated installer is published, I'll add a comment here.

The updated binary installers that include the 'odbc' library were uploaded.

Syndicate content