huuro

huuro

Hello guys,
I have my app built up, and now I’m wondering, how can I run two instances (on two servers) of the distillery release and connect them into Elixir node-cluster.

I set up an application as this guy here → Cluster Phoenix with Docker
But, when I run HOST=172.31.56.165 PORT_SSL=4000 REPLACE_OS_VARS=true NODE_NAME=prod01@217.0.0.1 _build/prod/rel/myapp_phoenix/bin/myapp_phoenix foreground For first node and then
HOST=172.31.56.165 PORT_SSL=4000 REPLACE_OS_VARS=true NODE_NAME=prod02@127.0.0.1 _build/prod/rel/myapp_phoenix/bin/myapp_phoenix foreground for the second

IDK how to run Node.connect (or whatever, IDK even how to run the console, which will be running in same “context” as the apps)

And secondly, as far as I understand if I have those apps running like this, they are a standalone instances. In other words, they are not seeing each other in EVM, therefore I can’t for example broadcast in Phoenix channel from one to other(s). → so I need somehow to connect them.

I’m trying to do some POC on localhost, but then I want to run apps separately on docker.

I also tried an approach from Cris’s article here Running Elixir and Phoenix projects on a cluster of nodes - DockYard

to do something like elixir --name n1@127.0.0.1:4001 --erl "-config sys.config" PORT=4001 -S /path/to/release

But it’s not working (obviously), either.

Can anyone please, help me??
Thanks in advance.

First Post! Switch mode

huuro

huuro OP

Ok I guess that I’ve been wrong. If I try to do iex(n1@127.0.0.1)1> :net_adm.ping(String.to_atom("n2@127.0.0.1")) I’m getting :pong response. So they are seeing each other?

Now I thing I was dealing with problem which wasn’t there :smiley:

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement