qtheninja

qtheninja

Mix edeliver start production cookie mismatch help

The actual question is in bold/italics the below is just additional information that may help. Still new to elixir so trying to wrap my head around a full app lifecycle.

mix edeliver start production causes an error that says:

Received ‘pang’ from myapp@127.0.0.1!
▸ Possible reasons for this include:
▸ - The cookie is mismatched between us and the target node
▸ - We cannot establish a remote connection to the node
▸ Received ‘pang’ from myapp@127.0.0.1!
▸ Possible reasons for this include:
▸ - The cookie is mismatched between us and the target node
▸ - We cannot establish a remote connection to the node

I’m using:
elixir 1.7
{:edeliver, “~> 1.6”},
{:distillery, “~> 2.0”}

I’m using server: true in /config/prod.esx
thanks to: Phoenix deployed with edelivery not starting - #2 by idi527

Postgres, erlang and elixir are installed on the server. The build, production releases all seem to work (there are files in the folders). I can ssh into the server using my username@ipaddress and I have the ipaddress and username .deliver/config and config/prod.exs (url: [host: “ip”, port:80]

In --debug mode it goes through a lot of killing/checking and sleeping :

  • kill -0 13815

  • kill -0 13813

  • sleep 0.5

I’ve also tried on the server. bin/myapp start
It gives no response back

**So I’m guessing the remote connection is a response to not having the right erlang cookies? **

I haven’t been able to find much details on how to lay out the cookies so they match up. I saw a comment stating that they are autogenerated and you shouldn’t hardcode cookies into the system? Any suggestions, reading or ways to navigate this?

Other sources I’ve found that have helped some:
https://medium.com/@zek/deploy-early-and-often-deploying-phoenix-with-edeliver-and-distillery-part-one-5e91cac8d4bd

Most Liked

njwest

njwest

I am experiencing this problem with 2.0.10, Elixir 1.7 on Ubuntu 18.04

After mix edeliver deploy to, mix edeliver start [target] gives me a “pang”, but then when I try to start again, it tells me my server is already up and running…

JorisKok

JorisKok

I followed the docs and got the same :pang response after having my mix.exs like this:

def application, do: [
   applications: [:edeliver],
   mod: {Ankikorean.Application, []},
   extra_applications: [:logger, :runtime_tools]
]

After changing it to the following code it worked.

  def application do
    [
      mod: {Ankikorean.Application, []},
      extra_applications: [:logger, :runtime_tools, :edeliver]
    ]
  end
shamanime

shamanime

You can try hardcoding your PORT and any other environment variable that you need to set.

If the app starts, then you know this was the issue. If it doesn’t, it’s one less thing for you to worry about while you keep testing. You can come back and configure them dynamically later. I just noticed Distillery 2 added a few other ways to configure those (link).

Last Post!

zazaian

zazaian

Thanks @JorisKok for the reply here! I’ll have to give this a shot, I’ll let you know how it goes. Thanks again!

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54921 245
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
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49084 226
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
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
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement