Inspect a remote system with observer

I have been developing a system using Vagrant. I can ssh to the machine and interact with the system through the iex in the console. However I would like to be able to use tools with a GUI.

I was hoping it would just be a case of enabling X-forwarding but I have not been able to make it work. These are the two reference sources I have started from. One ssh generic and one vagrant specific.

The example project I am trying to run this is here.

I have tried adding this line to my Vagrantfile

config.ssh.forward_x11 = true

Bash commands to get to error.

vagrant up
vagrant ssh

# In guest box

iex(1)> :observer.start
[error] WX ERROR: SMP emulator required (start with erl -smp)
  [{:wxe_server, :start, 1, [file: 'wxe_server.erl', line: 65]},
   {:wx, :new, 1, [file: 'wx.erl', line: 115]},
   {:observer_wx, :init, 1, [file: 'observer_wx.erl', line: 104]},
   {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 355]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}

Uhh, that is unexpected, your erlang build does not start in smp mode, is it built with it at all?

Instead of trying to run observer on the remote node I would highly recommend just having a local computer remote session into the remote node. Then you can run observer locally and you’re good to go.

1 Like

So I never got this working.

@benwilson512 thanks for your suggestion and that definitely would work, however for my purposes I’m trying to avoid having elixir/erlang installed on the host.

What do you mean on the host? I was referring to your development computer.

Did you try starting your shell with ELIXIR_ERL_OPTIONS="-smp enable" iex?

Yes that worked as long as I also included in my Vagrantfile.

config.ssh.forward_x11 = true