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).

Merff

Merff

Set the PORT environment variable helped me.

ecly

ecly

Are you still seeing this issue or did you find a solution for your case?
I’ve been experiencing it for several weeks with 2.0.10 not using any system environment variables.
2x Received ‘pang’…, when starting the application after having stopped it. Complete fresh deploy/starts work fine.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
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
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
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
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
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

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
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
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
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement