bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.97k stars 398 forks source link

Windows release with set include_erts: true fails with unusable runtime error #572

Closed PaoloLaurenti closed 5 years ago

PaoloLaurenti commented 6 years ago

Steps to reproduce

Description of issue

use Mix.Releases.Config,

This sets the default release built by mix release

default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()

For a full list of config options for both releases

and environments, visit https://hexdocs.pm/distillery/configuration.html

You may define one or more environments in this file,

an environment's settings will override those of a release

when building in that environment, this combination of release

and environment configuration is called a profile

environment :dev do

If you are running Phoenix, you should make sure that

server: true is set and the code reloader is disabled,

even in dev mode.

It is recommended that you build with MIX_ENV=prod and pass

the --env flag to Distillery explicitly if you want to use

dev mode.

set dev_mode: true set include_erts: true set cookie: :"" end

environment :prod do set include_erts: true set include_src: false plugin Releases.Plugin.LinkConfig end

You may define one or more releases in this file.

If you have not set a default release, or selected one

when running mix release, the first release in the file

will be used by default

release :marconi do set version: current_version(:marconi) set applications: [ :runtime_tools ] end

bitwalker commented 6 years ago

It doesn't necessarily mean it is looking for a local installation - can you confirm what machine and OS you are building the release on and what machine and OS you are deploying to? This error may also occur when the build and target machines differ, and the bundled erl cannot be used.

PaoloLaurenti commented 6 years ago

The OS of the building machine was Windows Server 2016. I tried to deploy the same release to another Windows Server 2016 machine and to a machine with Windows 10 Pro . The results were the same with both machines.

I had no problems with previous version of Distillery (1.5.2)

I was able to put in place a workaround in order to start the release on both machines. These are the changes I've done: