Cannot cluster elixir - nxdomain failure when finding discovery service

I’m setting up a background worker cluster in Elixir.

This is exactly the same code as the main service (which is clustered and running fine)

Same configs with the exception of turning off the web server through an env var.

When it’s trying to discover the services with the same name in the cluster (using libcluster) it fails with a :nxdomain error.

Within libcluster this resolves to

discovery = System.get_env("RENDER_DISCOVERY_SERVICE") |> String.to_charlist()
:inet_res.getbyname(discovery, :a)

When I run this on my existing service everything is fine. Running this on my new “Background worker” instance, it cannot find it.

Any help?

Hey Dan,
Can you email support@render.com as we’re going to need to get more details here to understand what’s going on - just a link to this community post and we can link the two conversations together,

John B