apr

apr

Remote Observer Connection Issues

Hi,

I recently migrated from distillery to mix release. While on distillery, I had setup my release such that I was able to debug the remote production node with observer. After migrating to mix release, I find that whenever I try to connect to the remote node via observer (it shows up in the observer Nodes drop down menu), I get this error: Error occurred on remote node and the following error message in the console: [error] [node: :"production_node@127.0.0.1", call: {:observer_backend, :sys_info, []}, reason: {:badrpc, :nodedown}]

I have all the dependencies installed on the release (observer, wx and runtime_tools), so I am not sure why I am seeing this issue. Furthermore, it is weird that it worked on distillery and is giving me issues now. Anyone have any ideas?

Thanks!

Marked As Solved

vfsoraki

vfsoraki

I had the exact same issue. I fixed it but then another problem occurred.
To fix, check

  • You have the following in env.sh[.eex]. Note that using short names won’t work, or I couldn’t get it to work. Use long names.
export RELEASE_DISTRIBUTION=name
export RELEASE_NODE=<%= @release.name %>@127.0.0.1
  • Restrict the port used by node to a specified one, e.g. adding -kernel inet_dist_listen_min 60606 inet_dist_listen_max 60606 to ELIXIR_ERL_OPTIONS in env.sh[.eex].

  • Forward ports like ssh -L 4369:127.0.0.1:4369 -L 60606:127.0.0.1:60606 nodehost. Note you shouldn’t have epmd running in your system, and you have to use the remote one. To make sure you are not running epmd locally, run epmd -kill before opening ssh session.

  • Start IEx shell like iex --hidden --cookie 'yourcookie' --name local@127.0.0.1

Now when I run Node.connect :"distname@127.0.0.1" I get true and nodes connect. But when I do :observer.start locally and select the remote node in Nodes menu, I get the following error:

16:22:06.248 [error] [node: :"distname@127.0.0.1", call: {:observer_backend, :sys_info, []}, reason: {:badrpc, {:EXIT, {:undef, [{:observer_backend, :sys_info, [], []}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}}}]

Then I found about :runtime_tools which contains :observer_backend. See Troubleshooting in Tracing and observing your remote node « Plataformatec Blog.

After this, it works like a charm!

Also Liked

apr

apr

Thanks for replying. I am tunneling via ssh and setting the same cookie in both places. I had the same setup previously when releasing vis Distillery as well when it did work, so it not working when releasing via Mix makes me suspect that maybe I am not packaging some dependency correctly (esp since the remote production node is discoverable locally)

steven7

steven7

I am having an exact same issue while migration from Distillery to Elixir 1.9 Mix Release, I would also appreciate if anyone can shed some light on this.

Last Post!

apr

apr

Adding these two lines did the trick! Thanks a lot @vfsoraki :smiley:

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
jerry
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
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40082 209
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement