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
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, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
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!
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
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”:
14:57:30.512 [warn] ...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
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
Other popular topics
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
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
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
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
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including.
What is Phoenix LiveV...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New







