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
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 ![]()
Also Liked
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









