qtheninja

qtheninja

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

Showing Posts 1 to 10

Merff

Merff

Have the same error.
elixir 1.7
{:edeliver, “~> 1.4.3”},
{:distillery, “~> 2.0”}

shamanime

shamanime

Hey @qtheninja and @Merff.

Is is your first deploy? Have you deployed before and now this is happening?

The cookie is saved on rel/config.exs after you run release.init.

If you didn’t change it after you built your release, they should match up.

Please make sure your distillery version is 2.0.3, I had this same issue and all sorts of weird behaviors because distillery 2.0.2 didn’t include some needed files on the release package.

Merff

Merff

@shamanime hey! Yes, this is first deploy via distillery + edeliver. I did not change cookie. distillery version is 2.0.3, yes.

shamanime

shamanime

Ok then, if you didn’t change the cookie you’re probably receiving pang as a response because your application is failing to start.

Have you followed the instructions on the distillery phoenix walkthrough?

qtheninja

qtheninja OP

Same here.

1st deploy. No cookie changing. and I created a fresh no change phoenix app and used 2.0.3. Same problem.

I used this article for some guidance: https://medium.com/@zek/deploy-early-and-often-deploying-phoenix-with-edeliver-and-distillery-part-two-f361ef36aa10

As it wasn’t a 100% clear where with the distillery walkthrough to do some of these things (production server, local) but overall it looks pretty close to the walkthrough.

qtheninja

qtheninja OP

It looks on the server it is failing to start on the server. @shamanime not sure if you have any further suggestions at all.

I can do “PORT=4000 …builds/prod/so_on_and_so_on/bin/myapp foreground”

and it works. If I use “start” instead of foreground it just quietly fails as I cannot view the myIP:4000 site unless I hit foreground again.

I attempted to use foreground again out of curiosity and got this error.
Protocol ‘inet_tcp’: the name myApp@127.0.0.1 seems to be in use by another Erlang node

SO. It must have been running but not being up fully?

@Merff this may help you. I had to go into the “BUILD_AT” link and then keep diving until you get to bin. So I set it up as something like: PORT=4001 /tmp/edeliver/myapp/builds/_build/prod/rel/myapp/bin/myapp foreground

I’m not sure if this will help you at all.

pieterm

pieterm

I updated several projects to distillery > 2 and edeliver 1.6. Only one project has the issues as described above. The process of starting or stopping the application do work eventually, but only after outputting several times the Received ‘pang’ from myapp@127.0.0.1! line.

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? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews