0
votes

my ejabberd server is constantly crashing and it is somewhat related to ODBC module but I am not able to understand the issue. Below are the logs. Can anyone help me interpret? I have copy pasted a few messages below.

=ERROR REPORT==== 14-Oct-2015::00:27:51 === ** State machine <0.27422.5> terminating ** Last message in was {'$gen_sync_event', {<0.27896.5>,#Ref<0.0.10.246367>}, {sql_cmd, {sql_query,<<"SELECT 1;">>}, {1444,782471,512104}}} ** When State == session_established ** Data == {state,<0.27423.5>,odbc,30000,<<"abchost.com">>,1000, {0,{[],[]}}} ** Reason for termination = ** {function_clause,[{odbc,sql_query, [<0.27423.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"}, {line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"}, {line,374}]}, {p1_fsm,handle_msg,10, [{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}

and

00:27:51.573 [error] CRASH REPORT Process <0.27434.5> with 0 neighbours exited with reason: no function clause matching odbc:sql_query(<0.27435.5>, <<"SELECT 1;">>, 59000) line 183 in p1_fsm:terminate/8 line 760

and

00:27:53.965 [error] gen_fsm <0.27439.5> in state session_established terminated with reason: no function clause matching odbc:sql_query(<0.27442.5>, <<"SELECT 1;">>, 59000) line 183

and

=ERROR REPORT==== 14-Oct-2015::00:27:51 === ** Generic server <0.27435.5> terminating ** Last message in was {'DOWN',#Ref<0.0.10.239386>,process,<0.27434.5>, {function_clause, [{odbc,sql_query, [<0.27435.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"}, {line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"}, {line,374}]}, {p1_fsm,handle_msg,10, [{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}} ** When Server state == {state,#Port<0.2314388>,undefined,<0.27434.5>, undefined,on,false,false,off,connected, undefined,0, [#Port<0.2314379>,#Port<0.2314376>], #Port<0.2314386>,#Port<0.2314366>} ** Reason for termination == ** {stopped, {'EXIT',<0.27434.5>, {function_clause, [{odbc,sql_query, [<0.27435.5>,<<"SELECT 1;">>,59000], [{file,"odbc.erl"},{line,183}]}, {ejabberd_odbc,sql_query_internal,1, [{file,"src/ejabberd_odbc.erl"},{line,468}]}, {ejabberd_odbc,run_sql_cmd,4, [{file,"src/ejabberd_odbc.erl"},{line,374}]}, {p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,237}]}]}}}

and

00:27:51.552 [error] Supervisor odbc_sup had child [] started with {odbc,start_link_sup,undefined} at <0.27432.5> exit with reason {stopped,{'EXIT',<0.27429.5>,{function_clause,[{odbc,sql_query,[<0.27432.5>,<<"SELECT 1;">>,59000],[{file,"odbc.erl"},{line,183}]},{ejabberd_odbc,sql_query_internal,1,[{file,"src/ejabberd_odbc.erl"},{line,468}]},{ejabberd_odbc,run_sql_cmd,4,[{file,"src/ejabberd_odbc.erl"},{line,374}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}}} in context child_terminated

1
try and format your code better.Evan Carslake

1 Answers

0
votes

I think you are referring to a bug that has already been fixed in ejabberd master branch: https://github.com/processone/ejabberd/commit/7d99484859df7c33a73da92d84b5cb5bd27a244e