bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.96k stars 397 forks source link

Application not starting on Windows #540

Closed fmooreRC closed 5 years ago

fmooreRC commented 5 years ago

Steps to reproduce

The build completes successfully, but when I try to run the application on the Windows server, it results in an error. I followed the walkthrough documentation here. I've tried using different versions of Distillery and ended up with different results.

Verbose Logs

Distillery 2.0.8

C:\opt\app> bin/app start
{“init terminating in do_boot”,{‘cannot get bootfile’,‘.boot’}}
init terminating in do_boot ({cannot get bootfile,.boot})

Crash dump is being written to: erl_crash.dump...done
Files\erl10.0.1\bin\erl.exe”“==“” was unexpected at this time.

Distillery 2.0.10

C:\opt\app> bin/app start
eq was unexpected at this time.

Description of issue

Build is occurring on Mac OS X Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace] Elixir 1.6.5 (compiled with OTP 20)

Release is being deployed to Windows Server 2014: Erlang/OTP 21 [erts-10.0.1] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] Elixir 1.7.3 (compiled with Erlang/OTP 19)

use Mix.Releases.Config,

environment :dev_server do set include_erts: "../erl10.0.1" set include_src: false set cookie: :redacted end

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


- Is there documentation that says one thing, but Distillery does
  another? If so, please link the doc here so it can be updated if
  it's a documentation issue, or so that the fix can be based around
  what's documented.
- If this is a runtime configuration issue, please also provide your config file 
  (with any sensitive information stripped of course). This is almost
  always necessary to understand why some configuration may not be working.

If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly,
as I will have to ask you for all of these things anyway. Help me help you!
fdbeirao commented 5 years ago

I just ran into this exact same issue on Windows 10 Professional, distillery,2.0.10,e9f1f1d3f4a89996a3e1a555872feed8a3a73e3d10b51886941382d29ca58f99,hexpm.

To work around it I manually manipulated the _build/prod/rel/{app}/bin/{app}.bat and in line 15, I changed if %ERRORLEVEL% eq 0 ( to if %ERRORLEVEL% equ 0 (

I hope this helps someone and maybe the issue can be fixed :)

Keep up the awesome work. Kudos.

beardedeagle commented 5 years ago

@fdbeirao you could submit a pr to fix

bitwalker commented 5 years ago

Fixed via #541