landric

landric

Mismatch between "edeliver version production" and "Application.spec" post-deploy

I’m running into a strange issue with an edeliver (1.8.0) / Distillery (2.1.1) / Phoenix (1.5.3) application where after running

mix edeliver build release
mix edeliver deploy release to production
mix edeliver restart production

… to my remote server, my app reverts to running and serving an older version of my app.

This most obviously manifests itself by serving old static assets. But also appears not just to be a static asset issue. Running code from the console also has old behavior.

Note that running mix edeliver upgrade production does not exhibit the same behavior, and correctly upgrades to the new version.

I would love some help figuring out where to look next! Thanks y’all.

$ mix edeliver version production

EDELIVER MY_APP WITH VERSION COMMAND

-----> getting release versions from production servers

production node: 0

  user    : my_remote_username
  host    : my.server.ip.address
  path    : /home/my_remote_username/app_release
  response: '1.0.3+882-20200819-020104-prod' [...this is the expected current version...]

[...two other nodes report same version...]

VERSION DONE!

$ mix edeliver build release

BUILDING RELEASE OF MY_APP APP ON BUILD HOST

-----> Authorizing hosts
[...]
-----> Copying release 1.0.3+882-20200819-021103-prod to remote release store 
[... still 1.0.3 but new timestamp...]

RELEASE BUILD OF [ MYAPP ] WAS SUCCESSFUL!

$ mix edeliver deploy release to production

DEPLOYING RELEASE OF MY_APP APP TO PRODUCTION HOSTS

-----> Authorizing hosts
[...]
-----> Selecting release

Found 32 different versions to deploy.
Versions:
 [...old versions...]
 1.0.0+862-20200818-040404-prod  [... this version is noteworthy... spoiler alert...]
 [...more intermediary versions...]
 1.0.3+882-20200819-021103-prod
Enter Version:

$ 1.0.3+882-20200819-021103-prod

DEPLOYED RELEASE TO PRODUCTION!

$ mix edeliver restart production

EDELIVER [MY_APP] WITH RESTART COMMAND

-----> restarting production servers

[... all three nodes report restart...]

RESTART DONE!

$ mix edeliver version production

EDELIVER MY_APP WITH VERSION COMMAND

-----> getting release versions from production servers


production node: 2

  user    : my_remote_username
  host    : 142.93.187.55
  path    : /home/my_remote_username/app_release
  response: '1.0.3+882-20200819-021103-prod'

[... two other nodes report same version...]

VERSION DONE!

$ ssh -t my_remote_username@my.remote.ip.addres " ~/app_release/my_app/bin/my_app remote_console"

Erlang/OTP 23 [erts-11.0.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(my_app@my.remote.ip.address)1> Application.spec(:my_app, :vsn)

'1.0.0+862-20200818-040404-prod'

[... what? Why this old version?]

First Post!

mcostasilva

mcostasilva

I’ve had that issue for a while now, var/start_erl.data (in deployment directory) has the wrong version for some reason which causes restarts and cold starts to use the wrong application version.
More informations here:
https://github.com/edeliver/edeliver/issues/314

Removing var/start_erl.data before restarting has been working for me, until it’s properly fixed in distillery.

Where Next?

Popular in Questions Top

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
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
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New

We're in Beta

About us Mission Statement