-
Notifications
You must be signed in to change notification settings - Fork 28
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
Error when running LocalCluster.start/0
#7
Comments
Are you seeing this when running tests? I've seen these kinds of issues before if you have firewall issues that are stopping epmd from opening the ports it needs. You can try running |
@keathley yes, after running Having some other issues now, with every
But then this is probably not that crazy. I have zero experience with multiple nodes, we are using Cachex as a cache layer in our project, but we are planning a massive scale. For that purpose we wanted to do a test with several nodes running the app, to anticipate having to scale like that. |
@keathley nevermind, I got around it, I don't need any Phoenix related tests for this, so I just start the LocalCluster from my test file. Then after that I can just pass the nodes to Cachex and it seems to work! |
Glad you got it working. Not sure what operating system you're using but on macos you typically need to run iex with distribution and click a prompt to allow epmd to open port connections. After that things work. If you only run tests then it doesn't present the prompt (or presents it so quickly that you don't notice it). In any case, glad it's working. |
@keathley I see this same error from a cold machine boot and I'm looking for some suggestions about what I could do to avoid running iex 1x to ensure
Note: this isn't life ending and my workaround is mostly fine. I'm just curious to learn about alternatives :) Full working example you need to see the exact failure (or if anyone who follows is interested) |
Generally when you see this error its because epmd isn't starting or hasn't started. I mostly see this in CI or other linux envs. My solution is to explicitly start |
@keathley that worked perfectly! Thanks for the quick reply Chris! |
I ran into this and figured out that the coc-elixir language server was preventing the node from coming up. was getting this in running the tests:
╰─ iex -S mix
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe]
Interactive Elixir (1.9.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> LocalCluster.start()
11:19:30.286 [info] Protocol 'inet_tcp': register/listen error: econnrefused
{:error,
{{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}},
{:child, :undefined, :net_sup_dynamic,
{:erl_distribution, :start_link, [[:"manager@127.0.0.1"], false]},
:permanent, 1000, :supervisor, [:erl_distribution]}}}
iex(2)>
debugger to ensure the gold node can come up
I found an existing beam process and killed it
after that the mix tests ran. But of course, it killed my language server:
I don't see anything that seems like it would prevent the LocalCluster for coming up (other than the fact that the language server is likely coming up first and the language server must be securing whatever is connecting on inet_tcp. Could we have both the language server and LocalCluster both running if we shared an erlang cookie to connect?. I also hope it might help someone that runs into the same stack trace and can't figure out how to get the test running, as the conflict seems pretty far from the act of running the tests. |
When running
LocalCluster.start/0
I get the following error:I followed the getting started guide, other then that I have a pretty simple phoenix app with some other deps.
This is my Elixir and Erlang/OTP version:
Any clue?
The text was updated successfully, but these errors were encountered: