user20230119
Can I ignore these TDS TLS tcp_closed error logs on Azure?
Does anyone know why I’m getting these tcp_closed errors or if I can ignore them? The errors are logged less frequently if I set the pool_size to 1 instead of 10. Otherwise, the tcp_closed errors are logged multiple times per minute forever.
It’s just a new Phoenix app with the Repo configured to a SQL Server on Azure SQL. It’s running in a Docker container on Azure Web App or Web Service for Linux.
ELIXIR_VERSION=1.14.5
OTP_VERSION=25.3.2.5
DEBIAN_VERSION=bullseye-20230612-slim
config :app_name, AppName.Repo,
username: "username",
password: "password",
hostname: "hostname.database.windows.net",
database: "PhoenixDemo",
ssl: :required,
ssl_opts: [
cacerts: :public_key.cacerts_get(),
customize_hostname_check: [
# match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
# match_fun: fn arg1, arg2 ->
# dbg
# true
# end
match_fun: fn _, _ -> true end
],
# verify_fun: {&:ssl_verify_hostname.verify_fun/3, []},
verify: :verify_peer
],
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10
2023-08-27T11:00:31.165568384Z 11:00:31.165 [error] GenServer #PID<0.7281.0> terminating
2023-08-27T11:00:31.165607985Z ** (stop) :tcp_closed
2023-08-27T11:00:31.165614385Z Last message: {:tcp_closed, #Port<0.1783>}
2023-08-27T11:00:44.382799422Z 11:00:44.382 [error] GenServer #PID<0.7294.0> terminating
2023-08-27T11:00:44.382851424Z ** (stop) :tcp_closed
2023-08-27T11:00:44.382857724Z Last message: {:tcp_closed, #Port<0.1787>}
2023-08-27T11:00:50.868232946Z 11:00:50.867 [error] GenServer #PID<0.7306.0> terminating
2023-08-27T11:00:50.868293847Z ** (stop) :tcp_closed
2023-08-27T11:00:50.868302347Z Last message: {:tcp_closed, #Port<0.1791>}
2023-08-27T11:00:55.510507526Z 11:00:55.509 [error] GenServer #PID<0.7318.0> terminating
2023-08-27T11:00:55.510555327Z ** (stop) :tcp_closed
2023-08-27T11:00:55.510560527Z Last message: {:tcp_closed, #Port<0.1795>}
I get this if I :sys.trace
2023-08-28T04:42:49.047272402Z: [INFO] ** (stop) :tcp_closed
2023-08-28T04:42:49.047283902Z: [INFO] Last message: {:tcp_closed, #Port<0.34294>}
2023-08-28T04:42:49.053868256Z: [INFO] *DBG* <0.282.3> got {'EXIT',<0.283.3>,
2023-08-28T04:42:49.053900657Z: [INFO] {{badmatch,nil},
2023-08-28T04:42:49.053906857Z: [INFO] [{'Elixir.Tds.Tls','assert_connected!',1,
2023-08-28T04:42:49.053911557Z: [INFO] [{file,"lib/tds/tls.ex"},{line,86}]},
2023-08-28T04:42:49.053916558Z: [INFO] {'Elixir.Tds.Tls',send,2,
2023-08-28T04:42:49.053921158Z: [INFO] [{file,"lib/tds/tls.ex"},{line,41}]},
2023-08-28T04:42:49.053925458Z: [INFO] {tls_sender,send_tls_alert,2,
2023-08-28T04:42:49.053929858Z: [INFO] [{file,"tls_sender.erl"},{line,489}]},
2023-08-28T04:42:49.053934358Z: [INFO] {tls_sender,connection,3,
2023-08-28T04:42:49.053938858Z: [INFO] [{file,"tls_sender.erl"},{line,277}]},
2023-08-28T04:42:49.053959159Z: [INFO] {gen_statem,loop_state_callback,11,
2023-08-28T04:42:49.053963759Z: [INFO] [{file,"gen_statem.erl"},{line,1426}]},
2023-08-28T04:42:49.053968459Z: [INFO] {proc_lib,init_p_do_apply,3,
2023-08-28T04:42:49.053973059Z: [INFO] [{file,"proc_lib.erl"},{line,240}]}]}}
2023-08-28T04:42:49.053977759Z: [INFO] *DBG* <0.282.3> new state {state,
2023-08-28T04:42:49.053981959Z: [INFO] {<0.282.3>,tls_dyn_connection_sup},
2023-08-28T04:42:49.053986259Z: [INFO] one_for_all,
2023-08-28T04:42:49.053990459Z: [INFO] {[receiver],
2023-08-28T04:42:49.053994659Z: [INFO] #{receiver =>
2023-08-28T04:42:49.053998859Z: [INFO] {child,<0.284.3>,receiver,
2023-08-28T04:42:49.054003560Z: [INFO] {ssl_gen_statem,start_link,undefined},
2023-08-28T04:42:49.054008560Z: [INFO] temporary,true,5000,worker,
2023-08-28T04:42:49.054013260Z: [INFO] [ssl_gen_statem,tls_connection,
2023-08-28T04:42:49.054017960Z: [INFO] tls_connection_1_3]}}},
2023-08-28T04:42:49.054023060Z: [INFO] undefined,0,3600,[],0,any_significant,
2023-08-28T04:42:49.054027860Z: [INFO] tls_dyn_connection_sup,[]}
2023-08-28T04:42:49.054032760Z: [INFO] *DBG* <0.282.3> got {'EXIT',<0.284.3>,{shutdown,normal}}
2023-08-28T04:42:50.308597299Z: [INFO] 04:42:50.308 [error] GenServer #PID<0.264.3> terminating
2023-08-28T04:42:50.308645800Z: [INFO] ** (stop) :tcp_closed
2023-08-28T04:42:50.308653600Z: [INFO] Last message: {:tcp_closed, #Port<0.34293>}
2023-08-28T04:42:50.315401459Z: [INFO] *DBG* <0.277.3> got {'EXIT',<0.278.3>,
2023-08-28T04:42:50.315452760Z: [INFO] {{badmatch,nil},
2023-08-28T04:42:50.315460460Z: [INFO] [{'Elixir.Tds.Tls','assert_connected!',1,
2023-08-28T04:42:50.315465160Z: [INFO] [{file,"lib/tds/tls.ex"},{line,86}]},
2023-08-28T04:42:50.315470260Z: [INFO] {'Elixir.Tds.Tls',send,2,
2023-08-28T04:42:50.315475360Z: [INFO] [{file,"lib/tds/tls.ex"},{line,41}]},
2023-08-28T04:42:50.315480460Z: [INFO] {tls_sender,send_tls_alert,2,
2023-08-28T04:42:50.315484861Z: [INFO] [{file,"tls_sender.erl"},{line,489}]},
2023-08-28T04:42:50.315489961Z: [INFO] {tls_sender,connection,3,
2023-08-28T04:42:50.315494761Z: [INFO] [{file,"tls_sender.erl"},{line,277}]},
2023-08-28T04:42:50.315499561Z: [INFO] {gen_statem,loop_state_callback,11,
2023-08-28T04:42:50.315518161Z: [INFO] [{file,"gen_statem.erl"},{line,1426}]},
2023-08-28T04:42:50.315522561Z: [INFO] {proc_lib,init_p_do_apply,3,
2023-08-28T04:42:50.315526662Z: [INFO] [{file,"proc_lib.erl"},{line,240}]}]}}
2023-08-28T04:42:50.315539562Z: [INFO] *DBG* <0.277.3> new state {state,
2023-08-28T04:42:50.315546362Z: [INFO] {<0.277.3>,tls_dyn_connection_sup},
2023-08-28T04:42:50.315549562Z: [INFO] one_for_all,
2023-08-28T04:42:50.315552462Z: [INFO] {[receiver],
2023-08-28T04:42:50.315555262Z: [INFO] #{receiver =>
2023-08-28T04:42:50.315558262Z: [INFO] {child,<0.279.3>,receiver,
2023-08-28T04:42:50.315561262Z: [INFO] {ssl_gen_statem,start_link,undefined},
2023-08-28T04:42:50.315564362Z: [INFO] temporary,true,5000,worker,
2023-08-28T04:42:50.315567362Z: [INFO] [ssl_gen_statem,tls_connection,
2023-08-28T04:42:50.315570363Z: [INFO] tls_connection_1_3]}}},
2023-08-28T04:42:50.315573363Z: [INFO] undefined,0,3600,[],0,any_significant,
2023-08-28T04:42:50.315576163Z: [INFO] tls_dyn_connection_sup,[]}
2023-08-28T04:42:50.315579563Z: [INFO] *DBG* <0.277.3> got {'EXIT',<0.279.3>,{shutdown,normal}}
2023-08-28T04:42:53.071126125Z: [INFO] 04:42:53.070 [error] GenServer #PID<0.309.3> terminating
Logger.configure(level: :debug, truncate: :infinity) in iex
2023-08-28T05:43:46.619701740Z 05:43:46.603 [error] GenServer #PID<0.3123.0> terminating
2023-08-28T05:43:46.619757642Z ** (stop) :tcp_closed
2023-08-28T05:43:46.619767042Z Last message: {:tcp_closed, #Port<0.350>}
2023-08-28T05:43:46.619783042Z State: %Tds.Tls{socket: #Port<0.350>, ssl_opts: [cacerts: [{:cert, <<48, 130, 3, 148, 48, 130,
%Tds.Tls{
socket: Port<0.124>,
ssl_opts: [cacerts:
[{:cert, <<48, 130, 3, 148, 48, 130, 2, 124, 160, 3, 2, 1, 2, 2, 10, 49, 245, 228, 98, 12, 108, 88, 237, 214, 216, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 103, 49, 11, ...>>],
customize_hostname_check: [match_fun: Function<41.3316493/2 in :erl_eval.expr/6>],
verify_fun: {&:ssl_verify_hostname.verify_fun/3, []},
verify: :verify_peer,
active: false,
cb_info: {Tds.Tls, :tcp, :tcp_closed, :tcp_error}
],
owner_pid: PID<0.2478.0>, handshake?: false, buffer: nil
}
Marked As Solved
user20230119
My local container and Azure container connect to Azure SQL Server differently that TDS or DBConnection doesn’t know how to handle. I have updates to the issue in another topic.
Popular in Questions
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
Hey guys.
I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Background
Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
I have a list say
x = ["23gh", "56kh", "97mh"]
I would like to pass each element to Val in each iteration.
Say, in iteration 1 -------...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Hi all
I want to have a unix time, from the current time plus 1 hour.
DateTime.now + 1 hour
How to get it in elixir?
Thanks
New
In AR this is so simple
@articles = current_user.articles
How to do in Ecto?
def index(conn, _params) do
current_user = conn.assig...
New
Other popular topics
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
New







