Connect to shortname node from longname node

Hi guys,

I’d like connect to a shortname node from my local longname node. Both are running on different machines (same network).

I couldn’t using net_adm:ping/1.
Is there any other way, documented or not?

Thanks

2 Likes

Right, you can not do this. Straight from the docs :

A node with a long node name cannot communicate with a node with a short node name.

https://www.erlang.org/doc/reference_manual/distributed.html

2 Likes

There is no documented (and therefore supported) way to do so.
Here is code pointer.

It is however still possible if you’re really determined… :smiley: For that you’d need to make an “Alternative Distribution Carrier” that does not enforce long/short names convention.

2 Likes

Thanks @max-au I will give the Alternative Dist Carrier a try.

1 Like

This looks like a pretty tedious and hard thing to do, easy to get very wrong, and which requires changes in both nodes… which raises the question, why do you want to do that, anyway? I mean, why not simply make the shortname node use long names?

6 Likes