Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SayHello GenServer never (re)started on count3 node? #260

Open
Bentheburrito opened this issue May 26, 2023 · 0 comments
Open

SayHello GenServer never (re)started on count3 node? #260

Bentheburrito opened this issue May 26, 2023 · 0 comments

Comments

@Bentheburrito
Copy link

Hello, I hope I'm not doing something silly to produce this weird behavior, but I noticed while exploring the HelloWorld example that the count3@127.0.0.1 node will never (re)start the SayHello GenServer process. The following is what I get when trying to fetch the count from SayHello when only count3@127.0.0.1 is up:

iex(count3@127.0.0.1)2> HelloWorld.SayHello.how_many?
** (exit) exited in: GenServer.call({:via, Horde.Registry, {HelloWorld.HelloRegistry, HelloWorld.SayHello}}, :how_many?, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.12.3) lib/gen_server.ex:1014: GenServer.call/3

It doesn't seem to matter what order I start/stop the nodes, the GenServer is never moved to count3. As long as another node is online, the SayHello GenServer is started (as I've confirmed in :observer) and HelloWorld.SayHello.how_many? returns the count as expected on every node. I'm starting the nodes as recommended in the documentation (iex --name countX@127.0.0.1 --cookie asdf -S mix). Could this be an odd bug that you can reproduce or (more likely) am I doing something dumb?

P.S. I also tried adding a fourth node into the mix just in case it was some weird issue with the last node/host listed. I added :"count4@127.0.0.1" to HelloWorld.Application.*_members/0 and config.exs, but I still experience the same behavior with count3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant