Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ryanwinchester
Created September 5, 2018 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanwinchester/0b46edc99b3e2b2f71cd36428dc493cf to your computer and use it in GitHub Desktop.
Save ryanwinchester/0b46edc99b3e2b2f71cd36428dc493cf to your computer and use it in GitHub Desktop.
You can run observer locally for a remote node
#!/bin/sh
set -e
BEAM_PORT=32815
EPMD_PORT=4369
COOKIE='cookiestring'
ssh -f -o ExitOnForwardFailure=yes \
-L "$EPMD_PORT:localhost:$EPMD_PORT" \
-L "$BEAM_PORT:localhost:$BEAM_PORT" \
myapp@myhost.com \
sleep 10
iex --name debug@127.0.0.1 --cookie $COOKIE \
-S mix run -e 'Node.connect(:"my_app@127.0.0.1")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment