[ejabberd] Mysql with 2.1.9

Richard Genthner rgenthner at symplicity.com
Tue Oct 4 00:37:46 MSD 2011


I'm having some issues getting the mysql stuff to work. I believe my settings are correct.

ERROR REPORT==== 2011-10-03 17:26:43 ===
E(<0.4414.0>:mod_pubsub_odbc:3633) : transaction return internal error: {aborted,
                                                                         {undef,
                                                                          [{node_pep,
                                                                            get_entity_subscriptions_for_send_last,
                                                                            ["pubsub.sendecho.in",
                                                                             {jid,
                                                                              "rgenthner",
                                                                              "sendecho.in",
                                                                              "baldr",
                                                                              "rgenthner",
                                                                              "sendecho.in",
                                                                              "baldr"}]},
                                                                           {mod_pubsub_odbc,
                                                                            node_call,
                                                                            3},
                                                                           {ejabberd_odbc,
                                                                            execute_bloc,
                                                                            1},
                                                                           {ejabberd_odbc,
                                                                            run_sql_cmd,
                                                                            4},
                                                                           {p1_fsm,
                                                                            handle_msg,
                                                                            10},
                                                                           {proc_lib,
                                                                            init_p_do_apply,
                                                                            3}]}}


Heres my config

%%%
%%%               ejabberd configuration file
%%%
%%%'
%%%.   =========
%%%'   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, 3}.

%%
%% watchdog_admins: Only useful for developers: if an ejabberd process
%% consumes a lot of memory, send live notifications to these XMPP
%% accounts.
%%
%%{watchdog_admins, ["rgenthner at sendecho.in"]}.


%%%.   ================
%%%'   SERVED HOSTNAMES

{hosts, ["localhost","sendecho.in"]}.

%%%.   ===============
%%%'   LISTENING PORTS
{listen,
 [

  {{5222,"10.120.99.243"}, ejabberd_c2s, [

			%%
			%% If TLS is compiled in and you installed a SSL
			%% certificate, specify the full path to the
			%% file and uncomment this line:
			%%
			{certfile, "/etc/ejabberd/star.sendechoin.pem"}, starttls,
			{access, c2s},
			{shaper, c2s_shaper},
			{max_stanza_size, 65536}
		       ]},

  {{5269,"10.120.99.243"}, ejabberd_s2s_in, [
			   {shaper, s2s_shaper},
			   {max_stanza_size, 131072}
			  ]},
  {{4560,"10.120.99.243"}, ejabberd_xmlrpc, [{maxsessions, 10}, {timeout, 5000}]},
  {{5280,"10.120.99.243"}, ejabberd_http, [
			 %%{request_handlers,
			 %% [
			 %%  {["pub", "archive"], mod_http_fileserver}
			 %% ]},
			 captcha,
			 http_bind,
			 http_poll,
			 %%register,
			 web_admin
			]}

 ]}.

%%%.   ==============
%%%'   AUTHENTICATION
{auth_method, odbc}.

%%
%% Authentication using LDAP
%%
{auth_method, ldap}.
%%
%% List of LDAP servers:
{ldap_servers, ["ldap.sendecho.in"]}.
%%
%% Encryption of connection to LDAP servers:
{ldap_encrypt, none}.
%%{ldap_encrypt, tls}.
%%
%% Port to connect to on LDAP servers:
{ldap_port, 389}.
%%{ldap_port, 636}.
%%
%% LDAP manager:
{ldap_rootdn, "cn=Directory Manager,dc=sendecho,dc=in"}.
%%
%% Password of LDAP manager:
{ldap_password, "******************************"}.
%%
%% Search base of LDAP directory:
{ldap_base, "ou=people,dc=sendecho,dc=in"}.
%%
%% LDAP attribute that holds user ID:
{ldap_uids, [{"uid", "%u"},{"sn","%u"}]}.
%%
%% LDAP filter:
{ldap_filter, "(objectClass=shadowAccount)"}.



%%%.   ==============
%%%'   DATABASE SETUP
%%
%% MySQL server:
%%
{odbc_server, {mysql, "mysqldb", "ejabberd", "ejabber", "******************"}}.

%%%.   ===============
%%%'   TRAFFIC SHAPERS

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

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

%%
%% This option specifies the maximum number of elements in the queue
%% of the FSM. Refer to the documentation for details.
%%
{max_fsm_queue, 1000}.


%%%.   ====================
%%%'   ACCESS CONTROL LISTS
{acl, admin, {user, "rgenthner","*"}}.


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

%%%.   ============
%%%'   ACCESS RULES

%% Maximum number of simultaneous sessions allowed for a single user:
{access, max_user_sessions, [{10, all}]}.

%% Maximum number of offline messages that users can have:
{access, max_user_offline_messages, [{5000, admin}, {100, 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 C2S connections, all users except admins use the "normal" shaper
{access, c2s_shaper, [{none, admin},
		      {normal, all}]}.

%% All S2S connections use the "fast" shaper
{access, s2s_shaper, [{fast, all}]}.

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

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

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

%% Only accounts of the local ejabberd server can create rooms:
{access, muc_create, [{allow, local}]}.

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

%% Only accounts on the local ejabberd server can create Pubsub nodes:
{access, pubsub_createnode, [{allow, local}]}.

%% In-band registration allows registration of any possible username.
%% To disable in-band registration, replace 'allow' with 'deny'.
{access, register, [{deny, all}]}.

{language, "en"}.

{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % recommends mod_adhoc
  {mod_blocking,[]}, % requires mod_privacy
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_disco,    []},
  %%{mod_echo,   [{host, "echo.localhost"}]},
  {mod_irc,      []},
  {mod_http_bind, []},
  {mod_http_fileserver, [
                         {docroot, "/var/www"},
                         {accesslog, "/var/log/ejabberd/access.log"}
                        ]},
  {mod_last_odbc,     []},
  {mod_muc,      [
		  %%{host, "conference. at HOST@"},
		  {access, muc},
		  {access_create, muc_create},
		  {access_persistent, muc_create},
		  {access_admin, muc_admin}
		 ]},
  {mod_muc_log,[]},
  {mod_offline_odbc,  [{access_max_user_messages, max_user_offline_messages}]},
  {mod_ping,     []},
  {mod_pres_counter,[{count, 5}, {interval, 60}]},
  {mod_privacy_odbc,  []},
  {mod_private_odbc,  []},
  %%{mod_proxy65,[]},
  {mod_pubsub_odbc,   [
		  {access_createnode, pubsub_createnode},
		  {ignore_pep_from_offline, true}, % reduces resource comsumption, but XEP incompliant
		  %%{ignore_pep_from_offline, false},  % XEP compliant, but increases resource comsumption
		  {last_item_cache, false},
		  {plugins, ["flat", "hometree", "pep"]}  % pep requires mod_caps
		 ]},
  {mod_register, [
		  {welcome_message, {"Welcome!",
				     "Hi.\nWelcome to this XMPP server."}},
		  {ip_access, [{allow, "127.0.0.0/8"},
			       {deny, "0.0.0.0/0"}]},
		  {access, register}
		 ]},
  {mod_roster_odbc,   [{versioning, true}, {store_current_id, false}]},
  {mod_service_log,[]},
  {mod_shared_roster,[]},
  {mod_shared_roster_ldap, [
	{ldap_base,"dc=sendecho,dc=in"},
	{ldap_rfilter, "(objectClass=posixGroup)"},
	{ldap_filter, ""},
	{ldap_gfilter,"(&(objectClass=posixGroup)(businessCategory=jabber-group)(cn=%g))"},
	{ldap_groupdesc, "description"},
	{ldap_memberattr,"memberUid"},
	{ldap_memberattr_format, "%u"},
	{ldap_ufilter, "(&(objectClass=inetOrgPerson)(businessCategory=jabber)(uid=%u))"},
	{ldap_userdesc,"cn"}
  ]},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_vcard_odbc,    []},
  {mod_version,  []},
  {mod_webpresence, []}
 ]}.




More information about the ejabberd mailing list