n1c0
Hello,
I am trying to connect the AMQP client to RabbitMQ server over TLSv1.3 and I am facing the following issue:
iex> AMQP.Connection.open([host: "playground.mydomain.net", port: "10001", username: "toto", password: "tata", ssl_options: [versions: [:"tlsv1.3"]]])
[12:36:38.655] - []
[supervisor: {#PID<0.707.0>, :amqp_connection_sup}, started: [pid: #PID<0.709.0>, name: :connection, mfargs: {:amqp_gen_connection, :start_link, [#PID<0.708.0>, {:amqp_params_network, "toto", {:plaintext, "tata"}, "/", 'playground.mydomain.net', 10001, 0, 0, 10, 50000, [server_name_indication: 'playground.mydomain.net', versions: [:"tlsv1.3"]], [&:amqp_auth_mechanisms.plain/3, &:amqp_auth_mechanisms.amqplain/3], [], []}]}, restart_type: :intrinsic, shutdown: :brutal_kill, child_type: :worker]]
when i try to use TLSv1.2, it works fine
iex> AMQP.Connection.open([host: "playground.mydomain.net", port: "10001", username: "toto", password: "tata", ssl_options: [versions: [:"tlsv1.2"]]])
...
{:ok, %AMQP.Connection{pid: #PID<0.693.0>}}
I am running the following versions for Elixir/Erlang:
Erlang/OTP 23 [erts-11.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Elixir 1.10.4 (compiled with Erlang/OTP 23)
RabbitMQ server TLS is done via a TLS terminating proxy, so i enabled/disabled the TLSv1.2/TLSv1.3 for each attempt, they are not working both at the same time. The certs are Let’s Encrypt issued.
The same termination proxy handles :hackney as an HTTP TLSv1.3 client without any issue.
Any idea on what is going on ?
Thanks for your help
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
voltone
It’s hard to say, because the error message you are quoting only says that a supervisor repeatedly failed to start the
:amqp_gen_connectionGenServer. I can’t tell what error, if any, was triggered during the TLS handshake.What happens when you try to connect with
:ssldirectly, e.g.:ssl.connect('playground.mydomain.net', 10001, server_name_indication: 'playground.mydomain.net', versions: [:"tlsv1.3"])? That may not be exactly what:amqp_gen_connectionis trying to do, as it might set its own additional ssl options, but it might give us a clue…n1c0
Hi Bram, thanks for your quick reply once again!
I manage to connect:
I tried to look into the AMQP library code a bit and it relies upon the
amqp_clientErlang package, i see from the docs The amqp_client application in theamqp_connectionmodule that the ssl_options are the ones fromssl:connect/2function, so I don’t understand what’s going on…voltone
It probably adds some options of its own. Instead of trying to reverse engineer the options from the code, it might be easier to just trace the call to
:ssl.connect:The output should tell us exactly what ssl options were set, and also whether the handshake succeeds or not. It is possible the TLS handshake is not the issue, but rather something in a higher protocol layer that somehow is impacted by the TLS version.
n1c0
Here’s what I get
voltone
Ah, so there we have it:
{versions,[]}. Looks like the AMQP or amqp_client library filters the version list, and you’re left with an empty list. I don’t have time to go through the code right now, but if you search for “TLSv1.2” in both projects you may find something. Maybe there’s already an update or PR to add it…n1c0
Found why it returns an empty list…the FIXME was never fixed…although we have OTP23 released…
in
rabbit_commonpkg, in the filerabbit_ssl_options.erlvoltone
They had to wait a little longer, I guess: you don’t want to enable TLS 1.3 before
:sslversion 10.0, which means OTP 23.0. Even 9.6.2.2, the latest:sslversion on the 22.3 branch, has interop issues.In Mint we ended up selecting the default versions by checking the supported protocol versions, but then removing TLS 1.3 pre-23 (here). Still, it lets the caller override it and enable any version. Would be nice if
rabbit_commonwould make this filter:sslapp version dependent too.