mgwidmann
Running local observer against a remote Docker
Having a lot of trouble getting this to work with a local Docker instance… I am trying to basically do the following:
- Run
docker-compose up(on my machine or a remote) - Start a local
iexand start:observer - Use the observer gui to connect to the remote host
I have figured out I need to do the following (but theres likely more I’m missing)
- Add
:runtime_toolsto the:extra_applicationssection of mymix.exsfile. - Expose the epmd port 4369 (maybe? I read somewhere it doesn’t allow external connections)
- Set the cookie and name of the app
I cannot get a Node.ping/1 from my local to the docker instance to go through. Connecting from within the docker instance works fine but it doesnt have the display necessary to run observer (and I don’t want to forward it because I plan to use this against a remote docker in prod and I dont want the observer gui included). What am I missing?
Here are some of the resources I’ve come across (none of which have been any help)
Most Liked
kaashyapan
This has been a lifesaver
https://github.com/chazsconi/connect-remote-elixir-docker
mgwidmann
Yeah so I changed the epmd port in my docker instance so it wouldn’t conflict with the one running on my local machine by setting the environment variable ERL_EPMD_PORT to 43699 instead of the default 4369. But it sounds like I need to expose the port in which erlang distribution connects through. When I connect to the docker instance and run epmd -names it outputs a random port value, how can I set that to a specific range that I can then expose through docker?
matiso
The reason it doesn’t work is because epmd will only listen on the loopback interface. When connecting from your machine, docker binds the exposed port over the bridge interface, and epmd rejects it because of that.
So far I haven’t found a working solution, but I’m on it. Will report back if I get it running.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








