DougReeder

DougReeder

Identify source of log message "Cannot get connection id for node" & debugging approach

In a project where none of the original developers are available, the central component is a Phoenix server named “reticulum” or “ret” for short. The old environment is a Kubernetes server, and I’m porting it to run using docker compose. There’s only one container running the Phoenix server. It’s currently running on elixir 1.16-otp-25 and erlang 25.3, and the dependencies are very old. (Yes, we plan to update both, but we have more acute problems currently.)

In the log, when the app is idle, I’m seeing this message all the time, with no apparent correlation with other log messages, which I don’t see in the log of the version running in Kubernetes:

[error] 

** Cannot get connection id for node :ret@reticulum

Grepping the source files for our code and the dependencies doesn’t find anything that can definitely be connected with the log message. JetBrains’ Junie LLM says

the message format `[error] ** Cannot get connection id for node :ret@reticulum` strongly
suggests it's coming from an Erlang process or an Elixir GenServer.

What should I be looking at to track down and deal with what’s happening here?

Marked As Solved

DougReeder

DougReeder

I don’t know that I fully understand what’s going on, but when I changed from “Peerage.Via.Dns” to “Peerage.Via.Udp”, the warning went away. I then changed it back to “Peerage.Via.Dns” and renamed the service from “reticulum” to “ret”, and the warning also went away. :-S

The file in question is

import Config

import_config "prod.exs"

config :peerage, log_results: true, via: Peerage.Via.Dns, dns_name: "foo.bar", app_name: "foo"

config :ret, RetWeb.Router, secure?: false

config :sentry,
  environment_name: :turkey,
  json_library: Poison,
  included_environments: [:turkey],
  tags: %{
    env: "turkey"
  }

so it’s not clear to me where it’s getting the service name “ret” from.

Currently there’s only a single Phoenix node, but there may have been more than one in the original incarnation.

Thanks for your help!

Also Liked

jstimps

jstimps

The error appears to come from libcluster.

https://github.com/search?q=repo%3Abitwalker%2Flibcluster+cannot+get+connection+id&type=issues

Unfortunately I can’t provide more guidance as I’ve never used this library. I hope this provides a lead for you though.

Edit: for some reason I had to escape the url because the generated link was not displaying the correct issue query. Apologies to the mods.

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement