Open eliotk opened 5 years ago
Yeah, this is because many of the commands don't use the vm.args
file directly, because it doesn't apply to them but only the running node (which is why start/foreground/console work), attach only works because it bypasses networking entirely and connects to via domain socket. We would need to specifically handle the TLS config vars from vm.args
and pass them as extra options to erl
/erlexec
.
Steps to reproduce
./bin/app_name start
command, observe app launches successfully./bin/app_name ping
and observe that it fails withReceived 'pang' from [app_name]!
stop
,remote_console
,rpc
commands also fail w/ node not foundInterestingly,
./bin/app_name attach
works and initializes a usable iex session. Once that session is established, it's possible to verify that the clustering communication is working between two launched application nodes (confirming tls configuration is working correctly).If you remove just the TLS configuration lines from vm.args, the app starts successfully and then those commands work again.
Perhaps it has something to do w/ how the cli commands are being run outside of the full application context?
What I've also tried is to set the same TLS configuration variables using the ELIXIR_ERL_OPTIONS env var which is used for erlang runtime options in distillery's elixir call when running the commands (https://github.com/bitwalker/distillery/blob/49d88194ad5f100239fa146bb2c649988f6b399f/priv/libexec/erts.sh#L169). I've set that env variable like this, mirroring the vm.args TLS config:
You can see when calling ping w/
DEBUG_BOOT=true
that those flags are properly passed into the erlang call:Description of issue
What are the expected results?
When using distillery cli commands for a running application with TLS configuration options set in vm.args,
ping
stop
rpc
(and maybe others) should work against the running app and not fail. (those commands work fine for same app without the TLS config)What version of Distillery?
2.0.12
OS: CentOS Erlang: 10.2.3 (OTP 21.2.2) Elixir: 1.8.0
rel/config.exs
, as it is often my first troubleshooting question, and you'll save us both time :)Portion of vm.args that breaks those commands:
Thanks for any and all thoughts and help w/ this!