by
clemens
(01.10.2024)
Login to Erlang node run with systemd using remote shell
tl;dr
I wanted to login into a running node using a remote shell today, but always got this error:
Could not contact remote node my_app@hostname, reason: :nodedown.
Even though the node was up. Turns out we need to source all the environment variables first:
set -a
source environment.env
set +a
We are running our nodes using systemd, and in order to not having to specify all the environment variables in the systemd file, we’ve moved all the environment variables into a custom file that is sourced by the systemd file:
EnvironmentFile=/some/path/environment.env
Turns out we also set the RELEASE_COOKIE
in that file, so obviously we need to source that value
before we can remote connect to the running shell. Though the error message of :nodedown
is not
really helpfull either, to be honest