Libcluster on render.com -- lookup against *-discovery failed nxdomain

Has anyone successfully deployed a clustered Phoenix 1.7 app on render.com recently? I’m having trouble getting it working and their support hasn’t responded any of the channels I’ve used to try and get help.

Here’s my situation –

I’m on Elixir 1.14.3/OTP 25.2 and running Phoenix 1.7.0-rc2,and libcluster 3.3.2.

I’m trying to stand up an elixir cluster by following the example here: Deploy a Distributed Elixir Cluster | Render.

I’m getting an error on deploy: [error] [libcluster:render] lookup against [app-name]-discovery failed: :nxdomain

I found someone with a (possibly) similar issue here, but the response was to take the issue offline: Cannot cluster elixir - nxdomain failure when finding discovery service

Any advice or tips would be much appreciated!

1 Like

Does it work on your local machine?

Yes, I was able to get clustering working locally. Have you had this experience before on render?

I don’t use render. I just got clustering working locally in dev, then in production via Docker. Eventually I decided against using it altogether.

With the help of an engineer at Render, I was able to sort out this issue. Here’s a link to the thread on the Render forum for posterity: Phoenix/Elixir -- [error] [libcluster:render] lookup against *-discovery failed nxdomain - Render Examples - Render

The TLDR:

The issue was on my end. I was using the bin/app_name start without setting the PHX_SERVER=true env var. I should have been using the bin/server command to start the app, which sets that env var automatically.

Here’s my fork of the render example clustering app, running in clustered mode on phoenx 1.7.0.rc-2 for anyone who may find it useful: GitHub - ian-darby/elixir_cluster_render_example: Distributed Elixir Cluster on Render with libcluster and Mix Releases

3 Likes