grufino
Remote connection to elixir IEx through ssh port forwarding fails only for IEx (not for erl)
Hello! I am trying to build a script to connect to a remote machine through ssh port forwarding, then run IEx using remsh and that port from localhost.
What is very strange is that I can successfully connect (and confirm that by loading all my modules) through erl and even run observer seeing everything that’s going on the other server, but not through iex, using the same parameters, this is bugging my head, can someone help?
ssh command:
ssh -N -L $port:localhost:$port -L 4369:localhost:4369 my_app@$machine &
in this case port is the internal epmd port, example:
epmd: up and running on port 4369 with data:
name my_app at port 31747
port = 31747
and machine is just the hostname, something like: qa.company_name.com
commands that work:
erl -name debug@127.0.0.1 -setcookie $secret_cookie -hidden -run observer
erl -name "debug@127.0.0.1" -setcookie "$secret_cookie" -remsh "my_app@127.0.0.1"
execution:
Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]
Eshell V10.1.1 (abort with ^G)
(my_app@127.0.0.1)1>
command that doesn’t work:
iex --name "debug@127.0.0.1" --cookie "$secret_cookie" --remsh "my_app@127.0.0.1"
Error message:
Could not contact remote node my_app@127.0.0.1, reason: :nodedown. Aborting...
Popular in Questions
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
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
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
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
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> someth...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Other popular topics
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
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
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New







