Skip to content

Commit

Permalink
Merge pull request #4169 from esl/update-epgsql
Browse files Browse the repository at this point in the history
Update epgsql to fix an issue with Erlang/OTP 26

Apparently epgsql fails to connect without TLS on Erlang/OTP 26. This is fixed in 4.7.1.

Errors with 4.7.0:

when=2023-11-16T07:43:36.255641+00:00 level=error what=rdbms_connection_attempt_error pid=<0.740.0> at=mongoose_rdbms:connect/4:899 sleep_for=1 backend=pgsql error={error,sock_closed}
when=2023-11-16T07:43:36.256737+00:00 level=error reason=sock_closed pid=<0.741.0> at=gen_server:error_info/8:1373 client_info=undefined last_message={tcp_closed,#Port<0.8>} state="{state,gen_tcp,undefined,<<>>,undefined,on_message,undefined,{[],[]},undefined,undefined,undefined,undefined,[],information_redacted,[],undefined,undefined,undefined,undefined,#{port => 5432,host => \"localhost\",codecs => [{mongoose_rdbms_pgsql_codec_boolean,[]}],database => \"ejabberd\"}}" log= name=<0.741.0> label={gen_server,terminate}
when=2023-11-16T07:43:36.256933+00:00 level=error pid=<0.741.0> at=proc_lib:crash_report/4:584 report="[[{initial_call,{epgsql_sock,init,['Argument__1']}},{pid,<0.741.0>},{registered_name,[]},{error_info,{exit,sock_closed,[{gen_server,handle_common_reply,8,[{file,\"gen_server.erl\"},{line,1208}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,241}]}]}},{ancestors,['wpool_pool-mongoose_wpool$rdbms$global$default-1','wpool_pool-mongoose_wpool$rdbms$global$default-process-sup','mongoose_wpool$rdbms$global$default',mongoose_wpool_rdbms_sup,mongoose_wpool_sup,ejabberd_sup,<0.340.0>]},{message_queue_len,0},{messages,[]},{links,[<0.740.0>]},{dictionary,[]},{trap_exit,false},{status,running},{heap_size,6772},{stack_size,28},{reductions,20292}],[]]" label={proc_lib,crash}
08:43:36.259 [error] gen_server <0.741.0> terminated with reason: sock_closed

No such errors with 4.7.1: it started cleanly.

Same results when calling epgsql:connect/1 manually.

Change in 4.7.1 most likely fixing the issue: https://github.com/epgsql/epgsql/pull/284/files#diff-bee3ee44dca8eaa3ab72727b8d11c695f2ae4dcf0a0534fc51323d0aaa1a3a9f

Note for the future: maybe test databases without TLS as well.
  • Loading branch information
NelsonVides authored Nov 16, 2023
2 parents 64bf216 + 0e66783 commit 503f565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
%%% Outgoing pools
{cqerl, {git, "https://github.com/esl/cqerl.git", {branch, "master"}}},
{mysql, "1.8.0"},
{epgsql, "4.7.0"},
{epgsql, "4.7.1"},
{eodbc, "0.2.0"},
{tirerl, "1.2.0"},
{amqp_client, "3.12.6"},
Expand Down
6 changes: 3 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{git,"http://github.com/basho/eper.git",
{ref,"fc165bf4072ecb9ce5648aab86db2baad12122f5"}},
2},
{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.7.0">>},0},
{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.7.1">>},0},
{<<"eredis">>,{pkg,<<"eredis">>,<<"1.7.0">>},0},
{<<"erl_csv">>,{pkg,<<"erl_csv">>,<<"0.3.1">>},0},
{<<"erlcloud">>,{pkg,<<"erlcloud">>,<<"3.6.5">>},0},
Expand Down Expand Up @@ -143,7 +143,7 @@
{<<"credentials_obfuscation">>, <<"34E18B126B3AEFD6E8143776FBE1CECEEA6792307C99AC5EE8687911F048CFD7">>},
{<<"eini">>, <<"FCC3CBD49BBDD9A1D9735C7365DAFFCD84481CCE81E6CB80537883AA44AC4895">>},
{<<"eodbc">>, <<"81AC713AE657FC4F67FEA210AE6D4575DDD7003C96953363908EA35E80F33F22">>},
{<<"epgsql">>, <<"98361A63E49AE14DF57CBDA8495058D42ABD3A316F822D1F990A40259026FE5E">>},
{<<"epgsql">>, <<"D4E47CAE46C18C8AFA88E34D59A9B4BAE16368D7CE1EB3DA24FA755EB28393EB">>},
{<<"eredis">>, <<"7A9B2B51ECDE73AF3399B344C6C7FA5141E6C77DF5FACE86E41E8365A1E5B08F">>},
{<<"erl_csv">>, <<"5AD1BB8093D198191384F2E96EB879B08B23F14E5F6FAD8D80BDC3EB623DE8DA">>},
{<<"erlcloud">>, <<"75B93168BF6F9CD4573B261D8F83FD2C89F7809AFEAAADABFA39ECE3F75F3055">>},
Expand Down Expand Up @@ -206,7 +206,7 @@
{<<"credentials_obfuscation">>, <<"738ACE0ED5545D2710D3F7383906FC6F6B582D019036E5269C4DBD85DBCED566">>},
{<<"eini">>, <<"DA64AE8DB7C2F502E6F20CDF44CD3D9BE364412B87FF49FEBF282540F673DFCB">>},
{<<"eodbc">>, <<"ACF72A61349AFD535306F036B8A17C45FA095E039F7C0211E671CCCBD709A8C8">>},
{<<"epgsql">>, <<"90B0145D302AB133D957EA46A884E6E37E847E6E47DEAF93104314D2AD8CB5BB">>},
{<<"epgsql">>, <<"B6D86B7DC42C8555B1D4E20880E5099D6D6D053148000E188E548F98E4E01836">>},
{<<"eredis">>, <<"A49E7B11A2E1DF91EC3DA565DBD1A9530C95A5AC03127D3810D735F9EABF6F2E">>},
{<<"erl_csv">>, <<"21186276E59258F6F35F1CA2ECDFA995508B2E0055D502DCA1DCD09E3231F445">>},
{<<"erlcloud">>, <<"9E482E6B1C956A649AE878CBE46494BC36E6CAFA1C677B30158C0ED4BAD789E9">>},
Expand Down

0 comments on commit 503f565

Please sign in to comment.