The Problem (TL;DR)
For reasons that I won’t get into right now
, my system needs to use two Erlang nodes in the same machine, one running OTP24 and the other running OTP28. That, in itself, is not a big deal, but here are the kickers:
- That server must use TLS for Erlang distribution.
- The connection must be started from the OTP28 node (i.e., this is the node that has to ping the other one).
As you might have guessed, that doesn’t work and I want to know why ![]()
Context
Let me show you what I tried so far…
I have a file called inet_tls_short_name.config with the following contents:
[
{server,
[
{verify, verify_peer} ,
{depth, 0} ,
{certfile, "elbrujohalcon.cer"} ,
{keyfile, "elbrujohalcon.key"} ,
{cacertfile, "pca.cer"} ,
{dhfile, "dhparam.pem"}
]
},
{client,
[
{verify, verify_peer} ,
{depth, 0} ,
{certfile, "elbrujohalcon.cer"} ,
{keyfile, "elbrujohalcon.key"} ,
{cacertfile, "pca.cer"} ,
{dhfile, "dhparam.pem"}
]
}
].
Trying without TLS
So, without TLS everything works as expected on both sides (I disconnected both nodes before each run so they didn’t know each other when I run net_adm:ping(…) in them…
OTP28 node
Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Eshell V16.0.2 (press Ctrl+G to abort, type help(). for help)
(brujo28@elbrujohalcon)1> net_adm:ping('brujo24@elbrujohalcon').
pong
OTP24 node
Erlang/OTP 24 [erts-12.3.2.17] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]
Eshell V12.3.2.17 (abort with ^G)
(brujo24@elbrujohalcon)1> net_adm:ping('brujo28@elbrujohalcon').
pong
Trying with TLS
This is what happens if try the same thing using TLS distribution. I’m showing you the command line arguments now so you can see how I used that file I showed above.
OTP28 node
[elbrujohalcon@elbrujohalcon ~]$ /…/erts-16.0.2/bin/erl -boot start_clean -sname brujo28 -setcookie cookie -proto_dist inet_tls -ssl_dist_optfile "inet_tls_short_name.config"
Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Eshell V16.0.2 (press Ctrl+G to abort, type help(). for help)
(brujo28@elbrujohalcon)1> net_adm:ping('brujo24@elbrujohalcon').
pang
OTP24 node
[elbrujohalcon@elbrujohalcon ~]$ /…/erts-12.3.2.17/bin/erl -boot start_clean -sname brujo24 -setcookie cookie -proto_dist inet_tls -ssl_dist_optfile "inet_tls_short_name.config"
Erlang/OTP 24 [erts-12.3.2.17] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]
Eshell V12.3.2.17 (abort with ^G)
(brujo24@elbrujohalcon)1> net_adm:ping('brujo28@elbrujohalcon').
pong
and, of course, if I then try on the OTP28 node…
(brujo28@elbrujohalcon)2> net_adm:ping('brujo24@elbrujohalcon').
pong
Conclusion
Something is preventing my OTP28 node to ping the OTP24 node when using TLS distribution. I don’t know what that is, and I don’t even know how to find information about what it is or what to do about it.
I need ideas ![]()
Thanks ![]()