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

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
belgoros
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
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
romenigld
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 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
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
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
albydarned
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
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement