docker-erlang-otp icon indicating copy to clipboard operation
docker-erlang-otp copied to clipboard

Step-by-step description of how to run the observer on OS X

Open futtetennista opened this issue 8 years ago • 7 comments
trafficstars

The steps described here didn't work for me and it took me quite a bit of fiddling and duckduckgoing around to make the observer work on my machine - I'm running OS X v10.12.3 (16D32). Here's a step-by-step description - mostly take from here - that can be added to the README if you feel it'll help people:

  • Make sure the version of the docker image of erlang is >= 19.2
  • Install XQuartz if not already installed: brew install xquartz (at the time of writing the latest version I installed is 2.7.11)
  • Run XQuartz
  • Update preferences 'Security' tab - turn on 'Allow connection from network clients'
  • Restart XQuartz and then check to see that it is listening on port 6000: lsof -i :6000
  • Get your local machine's IP: ip=$(ipconfig getifaddr en0) && echo "My IP is: " + $ip
  • In the XQuartz terminal run: xhost + xxx.xxx.xxx.xxx. The output should be something like: xxx.\ xxx.xxx.xxx being added to access control list
  • Run the docker container: docker run -it --rm -e DISPLAY=${ip}:0 -v /tmp/.X11-unix:/tmp/.X11-unix erlang

futtetennista avatar Apr 10 '17 18:04 futtetennista

possibly this need special attention; sorry, since I have re-installed Linux on the Mac hardware running natively, I no longer have the osx; will probably find another osx environment soon

c0b avatar Apr 14 '17 01:04 c0b

👍 for duckduckgoing 😄 . Just curious, does DISPLAY work for you with localhost:0 instead of the ip?

sdwolfz avatar Apr 14 '17 08:04 sdwolfz

No localhost doesn't work for me I need to pass the ip

On Fri, 14 Apr 2017, 10:10 Codruț Constantin Gușoi, < [email protected]> wrote:

👍 for duckduckgoing 😄 . Just curious, does DISPLAY work for you with localhost:0 instead of the ip?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/c0b/docker-erlang-otp/issues/41#issuecomment-294112918, or mute the thread https://github.com/notifications/unsubscribe-auth/AATuwyJ_p33fTE3-r9CEk7lhJatOLjYXks5rvynrgaJpZM4M5KbH .

futtetennista avatar Apr 14 '17 13:04 futtetennista

According to https://docs.docker.com/docker-for-mac/networking/, it looks like docker.for.mac.host.internal should always resolve to the host's IP address, but I haven't had a chance to try it yet.

marnen avatar Mar 04 '18 01:03 marnen

docker.for.mac.host.internal isn't working for me, but the special address 192.168.65.1 appears to be (and I don't need to add anything with xhost). Unfortunately, I'm having a (presumably unrelated) issue where the WX observer app ran once, but has hung every time since.

marnen avatar Mar 04 '18 06:03 marnen

@futtetennista It should be brew cask install xquartz (you missed cask)

drozzy avatar Mar 09 '18 20:03 drozzy

Never run observer on the Erlang VM which you are running work on - observer crashes all the time and frequently takes down the VM. What's safer is to start a distributed Erlang node, run observer on it, and connect to the VM you want to observe.

bryanhuntesl avatar Jun 08 '19 10:06 bryanhuntesl