wfgilman

wfgilman

Remsh Cookie Format: Connection attempt from disallowed node

I’m trying to connect to a remote node but the request keeps getting rejected. The error is: “Connection attempt from disallowed node”. I understand this means the cookie is invalid, i.e. doesn’t match the running node.

When I SSH to the remote machine and run cat vm.args I see:

## Name of the node
-name myapp@127.0.0.1

## Cookie for distributed erlang
-setcookie JGpXR9PPNYgMLhMii#3VktVMUAb7dRU3G3VdLsLYXk6t

When I start a session on the remote machine, this cookie shows up as:

$: iex sname will --cookie JGpXR9PPNYgMLhMii#3VktVMUAb7dRU3G3VdLsLYXk6t
Interactive Elixir (1.5.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(will@iex_test)1> :erlang.get_cookie()
:"JGpXR9PPNYgMLhMii#3VktVMUAb7dRU3G3VdLsLYXk6t"

No matter how I tried to represent the cookie I get this error: {cookie}, '{cookie}', "{cookie}", :"{cookie}".

I’m deploying the application inside a Docker container. My cookie is exported as an environment variable and I’m wondering if it’s getting set in a different format when grabbed by System.get_env("COOKIE") in the Docker container than when it’s set from the shell.

Marked As Solved

NobbZ

NobbZ

http://erlang.org/doc/man/erl.html:

-args_file FileName

[…] A comment begins with a # character and continues until the next end of line character. Backslash (\) is used as quoting character. […]

(emphasis mine)

Please try:

## Cookie for distributed erlang
-setcookie JGpXR9PPNYgMLhMii\#3VktVMUAb7dRU3G3VdLsLYXk6t

Alternatively: Avoid the usage of # and use another cookie :slight_smile:

Also Liked

OvermindDL1

OvermindDL1

Are you trying to connect remotely, or are you connecting locally over SSH? Remotely is not allowed since it is 127.0.0.1 in this specific example.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
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
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
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
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

We're in Beta

About us Mission Statement